[SERVER-54874] Ensure reading of consistent config.collections and config.chunks when refreshing the CatalogCache Created: 02/Mar/21 Updated: 29/Oct/23 Resolved: 15/Mar/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | None |
| Fix Version/s: | 4.9.0 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Jordi Serra Torrens | Assignee: | Jordi Serra Torrens |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | PM-234-Catalog-Work, sharding-csrs-stepdown-also | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||||||
| Sprint: | Sharding 2021-03-22 | ||||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||||
| Linked BF Score: | 126 | ||||||||||||||||||||||||||||
| Description |
|
Currently, when the ConfigServerCatalogCache refreshes, it first issues a majority read on config.collections and after that it issues a second majority read on config.chunks Because of this, the collection metadata we read from config.collections may not be consistent with the chunks (and thus collection version) we read from config.chunks. To address this we need to ensure that we read config.collections and config.chunks 'as a package'. To do so, we can use an aggregation pipeline on config.collections that has a $lookUp stage from config.chunks, and attach a snapshot read concern. |
| Comments |
| Comment by Githook User [ 15/Mar/21 ] |
|
Author: {'name': 'Jordi Serra Torrens', 'email': 'jordi.serra-torrens@mongodb.com', 'username': 'jordist'}Message: (cherry picked from commit 538cb2ff982aab2a60c4f3ab53eb1ba6d1acfeb9) |
| Comment by Githook User [ 09/Mar/21 ] |
|
Author: {'name': 'Jordi Serra Torrens', 'email': 'jordi.serra-torrens@mongodb.com', 'username': 'jordist'}Message: Revert " This reverts commit dc009c5a8d484f6a0db2f357274e14e30ea9f476. |
| Comment by Githook User [ 08/Mar/21 ] |
|
Author: {'name': 'Jordi Serra Torrens', 'email': 'jordi.serra-torrens@mongodb.com', 'username': 'jordist'}Message: |