[SERVER-58271] Stop forcing collection version refreshes in chunk manager targeter Created: 05/Jul/21 Updated: 29/Oct/23 Resolved: 07/Jul/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | 5.0.0-rc7 |
| Fix Version/s: | 5.0.2, 5.1.0-rc0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Tommaso Tocci | Assignee: | Tommaso Tocci |
| 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
|
||||||||||||||||
| Sprint: | Sharding EMEA 2021-06-28, Sharding EMEA 2021-07-12 | ||||||||||||||||
| Participants: | |||||||||||||||||
| Description |
|
When we received a StaleDbVersion error during a batchWrite, in the ChunkManagerTargeter we locally decide if we need to refresh based on some version comparision and if this is the case we force a full refresh of the cached entry. If multiple cuncurrent batchWrite operations hit the same StaleShardVersion they will all force a full refresh of the catalog without any kind of synchronization, causing several refreshes of the cached database metadata when actually only one is required. When receiving a StaleShardVersion the ChunkManagerTargeter should only call CatalogCache::invalidateShardOrEntireCollectionEntryForShardedCollection() and expect that on the next CatalogCache lookup it will receive the refreshed metadata. In this new approach if we receive several StaleShardVersion concurrently with the same db version we will only perform one refresh. |
| 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 [ 21/Jul/21 ] |
|
Author: {'name': 'Tommaso Tocci', 'email': 'tommaso.tocci@mongodb.com', 'username': 'toto-dev'}Message: (cherry picked from commit 8f42e5e827aa2a39ab7fe8345b124d5c115f840e) |
| Comment by Githook User [ 07/Jul/21 ] |
|
Author: {'name': 'Tommaso Tocci', 'email': 'tommaso.tocci@mongodb.com', 'username': 'toto-dev'}Message: |