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

[v4.4] Ensure that _shouldSetStableTimestamp gets restored to true if replSetInitiate fails

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.2.18, 4.4.10
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Fully Compatible
    • ALL
    • v4.2, v4.0
    • Repl 2021-08-23, Repl 2021-09-06, Repl 2021-09-20, Repl 2021-10-04

      It's possible for us to enter a state where _shouldSetStableTimestamp inadvertently gets set to false forever. This can only happen if the client incorrectly used replSetInitiate, but the side effects can cause us to never set the stableTimestamp, even if we are a healthy secondary.

      This code is specific to eMRC=false, so we can remove the code in 5.0+ but will have to backport a different fix to previous versions.

      This case should be reproducible with eMRC=false by:

      • Starting a new node and running replSetInitiate with an invalid config, which would fail processReplSetInitiate after setting _shouldSetStableTimestamp to false.
      • Add this node to an existing cluster. After going through initial sync, we should observe that this new node never advances its stableTS.
      • If we restart the node, we should observe that it enters initial sync again.

            Assignee:
            lingzhi.deng@mongodb.com Lingzhi Deng
            Reporter:
            pavithra.vetriselvan@mongodb.com Pavithra Vetriselvan
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: