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

Ensure that the secondary being stepped up in stopReplicationAndEnforceNewPrimaryToCatchUp is not stale

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.2.0-rc0, 7.0.5
    • Affects Version/s: None
    • Component/s: None
    • None
    • Replication
    • Fully Compatible
    • ALL
    • v7.1, v7.0, v6.0, v5.0
    • Repl 2023-10-16, Repl 2023-10-30
    • 5

      In the function stopReplicationAndEnforceNewPrimaryToCatchUp() still has the problem listed in SERVER-59796.

      We need to make sure that the secondaries are actually caught up (which may be impossible, since the primary's PrimaryOnlyService may write at any point meaning the secondaries won't be caught up), or we need to make the "candidate secondary", the secondary that is passed in to the function to be made the new primary, ahead of the other secondary so that it wins the election.

      One way I can think of performing the latter idea is to stop replication on the other secondaries and not on the candidate secondary. We can then perform a write on the primary and make sure that it has reached the candidate secondary. This will ensure that the candidate secondary is more up-to-date than any other secondary, and then it can win the election.

            Assignee:
            vishnu.kaushik@mongodb.com Vishnu Kaushik
            Reporter:
            vishnu.kaushik@mongodb.com Vishnu Kaushik
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: