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

Ensure shards' persisted collection cache picks up collection UUIDs after setFCV=4.0

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.7.4
    • Affects Version/s: None
    • Component/s: Sharding
    • None
    • Fully Compatible
    • v3.6
    • Sharding 2018-04-09, Sharding 2018-04-23

      FCV 3.4->3.6 has no schema upgrade process for config.cache.collections.

      config.cache.collections was added to shards as part of the safe secondary reads project, which didn't require an upgrade process, and safely started persisting routing metadata as soon as the v3.6 binary cluster started up. However, UUIDs were added to config.cache.collections to address replication change streams needs. I believe that a config config.collections schema upgrade process was added, but no one thought to add an upgrade process for shards.

      So, ShardServerCatalogCacheLoader will happily persist config.cache.collections from the start. Then setFCV(3.6) happens, and config.cache.collections won't get the UUID until the shard refreshes NEW chunks for that collection.

      The ShardServerCatalogCacheLoader won't schedule a persisted update unless new chunks are received from the config server, per this bit of code. That was added to improve secondary availability because every primary persistence task sets flags that block metadata reads, and might even prompt forcing the secondary to refresh if we got around to that (I forget).

      Consider the in-memory UUID values in the upgrade process. ChunkManager is probably fine because it gets recreated/updated every CatalogCache refresh. Unsure if we have any other in-memory UUIDs fields that must get set on upgrade.

            Assignee:
            esha.maharishi@mongodb.com Esha Maharishi (Inactive)
            Reporter:
            dianna.hohensee@mongodb.com Dianna Hohensee (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: