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.