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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.4.10, 4.2.18
    • Component/s: None
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Requested:
      v4.2, v4.0
    • Sprint:
      Repl 2021-08-23, Repl 2021-09-06, Repl 2021-09-20, Repl 2021-10-04
    • Case:

      Description

      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.

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: