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

Restore the in-memory transaction table as part of replication recovery.

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Replication
    • Fully Compatible
    • Repl 2025-03-03, Repl 2025-03-17, Repl 2025-03-31
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      High-level workflow:

      1. Find the last txnTable noop oplog entry (T1) before stableOpTime (T2). This could be non-existent if we have never written down a noop.
      2. Scan oplog in (T1, T2], to restore the in-memory transaction table upto stable opTime T2.
      3. As part of the normal replication recovery which applies oplog entries (T2, truncateAfterPoint], restore the in-memory transaction table to latest.

      Notes:

      1. Maybe it's possible to record the opTime of the last txnTable noop oplog entry before stableOpTime in a local collection to accelerate the first step.
      2. Clean shutdown should write a noop right before shutdown so that we don't need to apply any oplog entry during startup. This should be handled either in this ticket orĀ SERVER-100343.

            Assignee:
            m.maher@mongodb.com Moustafa Maher
            Reporter:
            wenbin.zhu@mongodb.com Wenbin Zhu
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: