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

The migration critical section does not need to stop reads

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.5.9
    • Affects Version/s: 3.0.15, 3.2.13, 3.4.4, 3.5.1
    • Component/s: Sharding
    • Labels:
      None
    • Fully Compatible
    • Sharding 2017-06-19
    • 0

      Currently when a shard is in the migration critical section it will block both read and write operation. The writes certainly need to be blocked to allow the last bits of the migration to be transferred, but there is no real need to block the reads.

      We could use the mode of the global lock to differentiate reads from writes.

      With this change the critical section stall would be only as long as the write on the config server is (instead of also including transferring the latest changes from donor to recipient).

      One thing which this may exacerbate is the length of the critical section if a large number of concurrent reads thrash the cache and cause the final batch of documents to take longer time to transfer.

            Assignee:
            kaloian.manassiev@mongodb.com Kaloian Manassiev
            Reporter:
            kaloian.manassiev@mongodb.com Kaloian Manassiev
            Votes:
            1 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated:
              Resolved: