Set _canAcceptNonLocalWrites at the end of signalDrainComplete()

XMLWordPrintableJSON

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

      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
              Reporter:
              Siyuan Zhou
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: