[SERVER-57102] Fixing invariants on ShardServerCatalogCacheLoader to consider different terms Created: 20/May/21 Updated: 29/Oct/23 Resolved: 25/May/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | None |
| Fix Version/s: | 4.0.25, 4.2.15, 4.4.7, 5.0.0-rc1, 5.1.0-rc0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Antonio Fuschetto | Assignee: | Antonio Fuschetto |
| 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: |
v5.0, v4.4, v4.2, v4.0
|
||||||||
| Sprint: | Sharding EMEA 2021-05-31 | ||||||||
| Participants: | |||||||||
| Description |
|
These two invariants of the ShardServerCatalogCacheLoader verify that the ChunkVersions of the last task is contiguous to the ChunkVersions of the new task. However these invariants are incomplete: they do not properly cover scenarios in which there are stepdowns/stepups. Note that when a new node is elected as primary it bumps its term. This is important because it changes how the minQueryVersion is computed: instead of looking at the in-memory list of tasks associated with the previous term (i.e., last time this node was primary) we end up taking as minQueryVersion whatever version is persisted on config.cache.chunks. However, when we add this new task to the list, the implementation does not consider the terms and ends up comparing versions that are not contiguous: the maxQueryVersion of the last task is different than the minQueryVersion of the new task. The proposed solution is to avoid comparing tasks of different terms. |
| 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 [ 28/May/21 ] |
|
Author: {'name': 'Antonio Fuschetto', 'email': 'antonio.fuschetto@mongodb.com', 'username': 'afuschetto'}Message: |
| Comment by Githook User [ 28/May/21 ] |
|
Author: {'name': 'Antonio Fuschetto', 'email': 'antonio.fuschetto@mongodb.com', 'username': 'afuschetto'}Message: |
| Comment by Githook User [ 28/May/21 ] |
|
Author: {'name': 'Antonio Fuschetto', 'email': 'antonio.fuschetto@mongodb.com', 'username': 'afuschetto'}Message: |
| Comment by Githook User [ 28/May/21 ] |
|
Author: {'name': 'Antonio Fuschetto', 'email': 'antonio.fuschetto@mongodb.com', 'username': 'afuschetto'}Message: |
| Comment by Githook User [ 25/May/21 ] |
|
Author: {'name': 'Antonio Fuschetto', 'email': 'antonio.fuschetto@mongodb.com', 'username': 'afuschetto'}Message: |