[SERVER-59694] Resharding Prohibited Commands Incorrectly Assumes Consistency In Config.Cache.Collections Collection Created: 31/Aug/21 Updated: 29/Oct/23 Resolved: 31/Aug/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | 5.0.0 |
| Fix Version/s: | 5.0.4, 5.1.0-rc0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Luis Osta (Inactive) | Assignee: | Luis Osta (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: |
v5.0
|
||||||||||||||||||||||
| Steps To Reproduce: |
|
||||||||||||||||||||||
| Sprint: | Sharding 2021-09-06 | ||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||
| Linked BF Score: | 151 | ||||||||||||||||||||||
| Story Points: | 1 | ||||||||||||||||||||||
| Description |
|
Background & Context It does this because it assumes either it will find the cached collection document where the `reshardingFields.state` property will be 'committing' or one of the other state values. However, unlike other collections, the internal `config.cache.collections` collection has no such consistency guarantees. So it's possible that in between an old document being deleted and the new one being inserted, that it will find nothing. In the ShardServerCatalogCacheLoader, the function that handles the refreshes to the `config.cache.collections` collection will first delete and then insert a new document in the case of an epoch change. Since Resharding utilizes epoc changes to invalidate the shard's cache of the collection information, there is a space of time between the delete and insertion of the document in the `config.cache.collections` collection, where the test can read an invalid state (no collection document). The test therefore is making an invalid assumption about the consistency that the `config.cache.collections` collection actually adheres to. Proposed Solution Such as:
|
| 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 [ 22/Sep/21 ] |
|
Author: {'name': 'Luis Osta', 'email': 'luis.osta@mongodb.com', 'username': 'LuisOsta'}Message: |
| Comment by Githook User [ 31/Aug/21 ] |
|
Author: {'name': 'Luis Osta', 'email': 'luis.osta@mongodb.com', 'username': 'LuisOsta'}Message: |