[SERVER-33954] CatalogCache refresh methods are not causally consistent Created: 16/Mar/18 Updated: 29/Oct/23 Resolved: 05/Jun/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | 3.6.3, 3.7.3 |
| Fix Version/s: | 4.0.0-rc3, 4.1.1 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Janna Golden | Assignee: | Matthew Saltz (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | ShardingTechDebt, todo_in_code | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||||||||||||||||||
| Issue Links: |
|
||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||
| Backport Requested: |
v4.0, v3.6
|
||||||||||||||||||||||||
| Sprint: | Sharding 2018-04-09, Sharding 2018-04-23, Sharding 2018-05-07, Sharding 2018-05-21, Sharding 2018-06-04, Sharding 2018-06-18 | ||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||
| Linked BF Score: | 73 | ||||||||||||||||||||||||
| Description |
|
The CatalogCache refresh methods have a logic that will simply 'join' with an another thread if there is already another thread trying to refresh the same collection. This will cause the refresh to miss the changes that happened at Tn if the refresh method was called while an in-progress refresh started at Tn-1. Here's a concrete example based on the build failure: Original description:
|
| Comments |
| Comment by Githook User [ 05/Jun/18 ] |
|
Author: {'name': 'Matthew Saltz', 'email': 'matthew.saltz@mongodb.com'}Message: (cherry picked from commit b93fe0e61bf7e8bc96da2edeb66afa1b915b0b77) |
| Comment by Githook User [ 05/Jun/18 ] |
|
Author: {'name': 'Matthew Saltz', 'email': 'matthew.saltz@mongodb.com'}Message: |
| Comment by Githook User [ 26/Apr/18 ] |
|
Author: {'email': 'matthew.saltz@mongodb.com', 'name': 'Matthew Saltz'}Message: Revert " This reverts commit a000fcd684216a331356a3c1568ef7fa99ea4907. |
| Comment by Matthew Saltz (Inactive) [ 24/Apr/18 ] |
|
Note to self: After discussing with esha.maharishi and renctan, I need to go back and look at where getCollectionRoutingInfoWithRefresh to ensure it's not called anywhere that will be problematic for performance |
| Comment by Githook User [ 23/Apr/18 ] |
|
Author: {'email': 'matthew.saltz@mongodb.com', 'name': 'Matthew Saltz'}Message: |
| Comment by Randolph Tan [ 04/Apr/18 ] |
|
Attaching repro.diff and test.js that can easily reproduce this issue. |