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

Ensure that comparing resharding requested zones with the authoritative tags is protected by concurrency control

    • ALL
    • v5.0
    • Sharding EMEA 2021-05-31, Sharding EMEA 2021-11-01
    • 2

      As of now, it's possible that the contents of config.tags can be changed in-between the time at which config.tags is queried, and when the final set of requested zones is written to the temporary collection. There are a couple of concurrency constraints that can be used, one which seems necessary, and the other which may be necessary but would require additional thought.

      1. It will be necessary to safeguard allowing zone operations (any operations that takes _kZoneOpLock) such that when the collection entry's allowMigrations flag is set to false, zone operations cannot be completed either. This brings up a few questions you might want to answer:
        1. Is the name allowMigrations okay to use for zone operations?
        2. Is it okay to piggyback off this flag instead of creating a new flag?
      2. Also consider taking the _kZoneOpLock while querying config.tags. From back-of-the-napkin thinking, it seems like if the config.tags query comes after setting the collection entry's flag, then taking this lock won't be necessary.

            Assignee:
            kaloian.manassiev@mongodb.com Kaloian Manassiev
            Reporter:
            blake.oler@mongodb.com Blake Oler
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: