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

Set _canAcceptNonLocalWrites at the end of signalDrainComplete()

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.5.13
    • Affects Version/s: None
    • Component/s: Replication
    • None
    • Fully Compatible
    • 0

      In signalDrainComplete(), _canAcceptNonLocalWrites should be the last thing to do after writing down the "new primary" no-op and enabling balancer, which matches users' expectation.

      Since balancer initialization needs to write to admin database, we need to introduce an RAII type AllowWritesBlock and a flag as a decoration of operation context to allow non-local writes even if the node is not primary.

            Assignee:
            matthew.russotto@mongodb.com Matthew Russotto
            Reporter:
            siyuan.zhou@mongodb.com Siyuan Zhou
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: