[SERVER-58266] Stop forcing database version refreshes in chunk manager targeter Created: 05/Jul/21 Updated: 29/Oct/23 Resolved: 05/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: | sharding | ||
| 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 | ||||||||||||
| 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 catalog cache. If multiple cuncurrent batchWrite operations hit the same StaleDbVersion they will all force a full refresh of the catalog without any kind of syncronization, causing several refresh of the cached database metadata when actually only one is required. When receiving a StaleDbVersion the ChunkManagerTargeter should only call CatalogCache::onStaleDbVersion() and expect that on the next CatalogCache lookup it will receive the refreshed metadata. In this new approach if we receive several staleDbVersion 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 [ 20/Jul/21 ] |
|
Author: {'name': 'Tommaso Tocci', 'email': 'tommaso.tocci@mongodb.com', 'username': 'toto-dev'}Message: (cherry picked from commit daf6c4c0e7b136529e2a6152b062946f1c50217f) |
| Comment by Githook User [ 05/Jul/21 ] |
|
Author: {'name': 'Tommaso Tocci', 'email': 'tommaso.tocci@mongodb.com', 'username': 'toto-dev'}Message: |
| Comment by Tommaso Tocci [ 05/Jul/21 ] |
|
Code Review: http://mongodbcr.appspot.com/797340001 |