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

inReplicationRecovery flag recursive set/unset not well defined

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Replication
    • ALL

      In multiple places, we follow the same pattern of setting inReplicationRecovery, plus instantiating a scope guard to unset it. 

      Additionally, we recursively set the inReplicationRecovery flag, with each call having it's own scope guard to unset the flag. This means the inner scope guard is unsetting the flag while the parent expects the flag to still be set. (See FCBIS setting the flag and then recoverFromOplogAsStandalone calls recoverFromOplog, which also sets the flag).

      We should add a RAII type to avoid all this duplication, and ensure only the top level instance unsets the flag.

            Assignee:
            backlog-server-repl [DO NOT USE] Backlog - Replication Team
            Reporter:
            yujin.kang@mongodb.com Yujin Kang Park
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated: