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

Update term on startup based on replica set config's term

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

      During startup, we currently check the term from the last oplog entry in our oplog and our last vote document to determine what term we should set in memory. We should also check the term from the replica set config as well to make sure we are setting the term to be the latest value from all three sources.

      Otherwise, we could find ourselves in a scenario where the config's term is larger than the term we store in memory, causing us to fail a future reconfig. This can actually cause the node to fassert if the reconfig was an automatic reconfig after the node wins an election.

            Assignee:
            samy.lanka@mongodb.com Samyukta Lanka
            Reporter:
            samy.lanka@mongodb.com Samyukta Lanka
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              None
              None
              None
              None