[SERVER-41480] Increment collection major version on chunk splits/merges Created: 03/Jun/19 Updated: 29/Oct/23 Resolved: 22/Jul/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | None |
| Fix Version/s: | 3.6.15, 4.0.13, 4.3.1, 4.2.2 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Matthew Saltz (Inactive) | Assignee: | Matthew Saltz (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||
| Backport Requested: |
v4.2, v4.0, v3.6
|
||||||||||||||||||||
| Sprint: | Sharding 2019-07-01, Sharding 2019-07-15, Sharding 2019-07-29 | ||||||||||||||||||||
| Participants: | |||||||||||||||||||||
| Case: | (copied to CRM) | ||||||||||||||||||||
| Description |
|
On 3.6 and 4.0, we only increment the collection minor version when a chunk is split or merged. The original reasoning for this was to prevent unnecessary routing table refreshes on the routers, which don't ordinarily need to know about chunk splits (since they don't change targeting information). However, when a chunk split operation fails in 3.6, we refresh the routing table on the shard. When the routing table is refreshed, any shard whose shard version is less than the collection version will then have its shard version bumped. This means that on all but one shard (the shard whose shard version is equal to the collection version), this means that subsequent requests to that shard will trigger a refresh on the router anyways. In other words, only incrementing the minor version was not achieving its goal anyways, so it's safe to increment the major version instead. In the case of autosplitting triggered by routers, this is important in the case where the shard being targeted for a split is also the shard whose shard version is equal to the collection version, because a failed chunk split will not cause routers to refresh, and they will simply continue trying to split the same chunk over and over again until something else causes them to refresh. |
| Comments |
| Comment by Githook User [ 21/Oct/19 ] |
|
Author: {'name': 'Matthew Saltz', 'username': 'saltzm', 'email': 'matthew.saltz@mongodb.com'}Message: (cherry picked from commit 790609ffb6bc1dac0a3c13d1898d5884e21a1b7a) |
| Comment by Githook User [ 21/Oct/19 ] |
|
Author: {'name': 'Matthew Saltz', 'username': 'saltzm', 'email': 'matthew.saltz@mongodb.com'}Message: (cherry picked from commit 790609ffb6bc1dac0a3c13d1898d5884e21a1b7a) |
| Comment by Githook User [ 13/Aug/19 ] |
|
Author: {'name': 'Matthew Saltz', 'email': 'matthew.saltz@mongodb.com', 'username': 'saltzm'}Message: (cherry picked from commit 790609ffb6bc1dac0a3c13d1898d5884e21a1b7a) |
| Comment by Githook User [ 22/Jul/19 ] |
|
Author: {'name': 'Matthew Saltz', 'username': 'saltzm', 'email': 'matthew.saltz@mongodb.com'}Message: |