[SERVER-54948] Calling `shardCollection` after `enableSharding` from a different MongoS is not causally consistent Created: 04/Mar/21 Updated: 29/Oct/23 Resolved: 26/Jul/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | None |
| Fix Version/s: | 5.0.2, 5.1.0-rc0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Kaloian Manassiev | Assignee: | Pierlauro Sciarelli |
| 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: |
v5.0
|
||||||||||||
| Sprint: | Sharding EMEA 2021-07-26 | ||||||||||||
| Participants: | |||||||||||||
| Description |
|
The enableSharding operation just enables the sharded:true bit on the entry for a specific database, but doesn't bump the database version, nor involves the database primary. This means that calling enableSharding from one MongoS and then performing shardCollection through another may cause the DB Primary executing the shardCollection procedure to not see the field enabled and fail the operation. This used to work when shardCollection executed on the config server, because it was always the primary, but now that it runs on the DB Primary, this is no longer guaranteed. |
| Comments |
| Comment by Vivian Ge (Inactive) [ 06/Oct/21 ] |
|
Updating the fixversion since branching activities occurred yesterday. This ticket will be in rc0 when it’s been triggered. For more active release information, please keep an eye on #server-release. Thank you! |
| Comment by Githook User [ 27/Jul/21 ] |
|
Author: {'name': 'Pierlauro Sciarelli', 'email': 'pierlauro.sciarelli@mongodb.com', 'username': 'pierlauro'}Message: |
| Comment by Githook User [ 26/Jul/21 ] |
|
Author: {'name': 'Pierlauro Sciarelli', 'email': 'pierlauro.sciarelli@mongodb.com', 'username': 'pierlauro'}Message: |
| Comment by Pierlauro Sciarelli [ 13/Jul/21 ] |
|
This has unintentionally been fixed under |