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

Ensure that reshardingFields gets copied over from the enqueued to the persisted sharding metadata when combining CollAndChangedChunks structs

    • Fully Compatible
    • ALL
    • Sharding 2020-10-19

      Calling getChunksSince() on a shard enqueues metadata to be persisted to-disk after retrieving from the config server. The shard then re-fetches the shard's copy instead of preferring the config server's retrieved metadata.

      It's important to know that this enqueuing process is asynchronous, so it's not guaranteed that the enqueued metadata will be immediately persisted. In order to account for this, retrieving the shard's metadata checks both the queue and the persisted data.

      It's possible for the enqueued metadata to be half-applied while the persisted metadata was being read. In order to account for this, the retrieval logic replaces all of the overlapping chunks from persisted with the newer chunks from enqueued.

      It's possible that the enqueued metadata has the collection entry's reshardingFields filled out, while the persisted metadata does not have reshardingFields. As a side-effect of the metadata overlap correction, reshardingFields will be lost.

      This ticket is to simply copy/std::move reshardingFields from enqueued to persisted in this case.

            Assignee:
            janna.golden@mongodb.com Janna Golden
            Reporter:
            blake.oler@mongodb.com Blake Oler
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: