-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Replication, Sharding
-
None
-
Fully Compatible
-
Repl 2017-10-02, Repl 2017-10-23
When you call CatalogCache::getCollectionRoutingInfo(), the result should include the collection UUID.
This is needed for the change streams project, so that when parsing the shard key from an insert entry, we can be sure we have the correct shard key for the collection according to its UUID. We wish to avoid errors where if a collection is dropped and recreated with a different shard key, we extract the wrong shard key from the insert entry.
This can be accomplished by including the UUID in the CollectionAndChangedChunks and copying it into the ChunkManager in refreshCollectionRoutingInfo().
On a primary, we populate CollectionAndChangedChunks in getChangedChunks(). We can copy the UUID from the CollectionType into the CollectionAndChangedChunks in that function.
On a secondary, we populate the CollectionAndChangedChunks from the shard server's config.collections collection in getPersistedMetadataSinceVersion(). Unfortunately, the shard server's config.collections collection does not include the UUID. In 3.8, we intend to have the _id be the UUID. However, for 3.6, we have approval from kaloian.manassiev and dianna.hohensee to add an extra optional field for the UUID.
- is depended on by
-
SERVER-30548 Remove ShardCollectionType::uuid field
- Closed
-
SERVER-31192 Get shard key into documentKey and resumeToken in changeStream 'insert' notification entries
- Closed
- is duplicated by
-
SERVER-31027 store UUID in routing table cache entries
- Closed
- related to
-
SERVER-31540 Change uses of boost::optional of UUID to UUID in the sharding codebase
- Closed
-
SERVER-31605 Un-blacklist cross-version UUID checks
- Closed