Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-31191

Store the collection UUIDs in the CatalogCache

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.6.0-rc1
    • Component/s: Replication, Sharding
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Sprint:
      Repl 2017-10-02, Repl 2017-10-23

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              nathan.myers Nathan Myers
              Reporter:
              tess.avitabile Tess Avitabile
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: