-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Sharding
-
Fully Compatible
-
0
Following the addition of collection uuids in config.chunks documents, it is possible to get rid of the ns field as long as there is no downgrade.
- Amend
SERVER-52767downgrade/upgrade hooks to add/remove ns to the documents Change ChunkType::NS queries currently targeting by namespace to target by (namespace || uuid) && epoch in order to ensure chunk operations compatibility during downgrade/upgrade (nss || uuid) and to be sure to don't pick chunks from a recreated collection following a rename (&& epoch)Change the CatalogCacheLoader to read config.chunks with a snapshot read concern at the clusterTime the previous read to config.collections returned.- In the ConfigServerCatalogCacheLoader, when reading config.chunks, pass a hint to enforce the use of either the 'ns_1_lasmod_1' or 'uuid_1_lastmod_1' index to ensure that config.chunks has a format consistent with what we inferred from the previous read to config.collections.
- If at the time of reading the config.collections we find that in has a 'timestamp', then we will target the chunks by 'collectionUUID'. Otherwise, we will keep targeting the chunks by 'ns'.
Testing:
- Add a unit test into initial_split_policy_test.cpp to assert that either namespace either UUID is present in the chunks document
- Add unit tests around the new query logic
- causes
-
SERVER-54345 Check for leftover data on shard collection is using namespace, but there is no namespace in config.chunks
- Closed
-
SERVER-56761 Catalog cache of performance tests still based on namespace instead of UUID
- Closed
- depends on
-
SERVER-54102 Noop write for afterClusterTime/atClusterTime needs to target primary
- Closed
-
SERVER-54167 configOpTime can become ahead of VectorClock::clusterTime
- Closed
-
SERVER-52767 Handle collectionUUID in config.chunks on upgrade/downgrade
- Closed
- is depended on by
-
SERVER-53106 Preserve chunks entries upon sharded collection rename
- Closed
- related to
-
SERVER-54579 Complete TODO listed in SERVER-53105
- Closed