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

Prevent initial sync from fasserting when shutting down replication coordinator

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 5.3.0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Fully Compatible
    • ALL
    • v5.2
    • 18

      It seems we recently added functionality to shut down the initial sync early during the step down process. As a result, initial sync now shuts down before the replication coordinator shuts down. As part of shutting down the replication coordinator, we set the _inShutdown flag to true. Since this flag is no longer set to true before initial sync returns, we will never enter this if statement and we instead fassert in initial sync if an error happens in initial sync while shutting down.

      To resolve this, we should either check the _inTerminalShutdown flag as part of initial sync shutdown, or we should set _inShutdown flag as part of the early initial sync exit. I'm more in favor of the first option, since it seems there is precedence for it.

            Assignee:
            xuerui.fa@mongodb.com Xuerui Fa
            Reporter:
            xuerui.fa@mongodb.com Xuerui Fa
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: