[SERVER-36959] _shardServerShardCollection should use afterOpTime when counting chunks on the config server Created: 31/Aug/18 Updated: 29/Oct/23 Resolved: 26/Sep/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | 4.0.2 |
| Fix Version/s: | 4.0.4, 4.1.4 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Matthew Saltz (Inactive) | Assignee: | Janna Golden |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | sharding-wfbf-day | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Operating System: | ALL | ||||||||
| Backport Requested: |
v4.0
|
||||||||
| Sprint: | Sharding 2018-10-08 | ||||||||
| Participants: | |||||||||
| Linked BF Score: | 16 | ||||||||
| Description |
|
When we shard a collection, _shardServerShardCollection runs a count command on the config.chunks collection to make sure there are no chunks already in the collection. But, right now, the count query uses readConcern local, which can cause a problem in the following scenario
We should use readAfterOpTime to do this count command so that even if we read from a config server secondary, we'll wait until previous operations have replicated. |
| Comments |
| Comment by Githook User [ 24/Oct/18 ] |
|
Author: {'name': 'jannaerin', 'email': 'golden.janna@gmail.com', 'username': 'jannaerin'}Message: (cherry picked from commit 9732cc2ec75ead567015db7e892091ac3ce2e35d) |
| Comment by Githook User [ 26/Sep/18 ] |
|
Author: {'name': 'jannaerin', 'email': 'golden.janna@gmail.com', 'username': 'jannaerin'}Message: |