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

Catalog change while allocating snapshot to reconstruct a prepared transaction with a prepare timestamp older than the stable timestamp crashes node

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Storage Execution
    • Fully Compatible
    • ALL
    • v8.0
    • Execution Team 2024-07-08, Execution Team 2024-07-22, Execution Team 2024-08-05, Execution Team 2024-08-19, Execution Team 2024-09-02, Execution Team 2024-09-16
    • 200

      When we are applying a prepared transaction and are in recovery or initial sync, we set roundUpPrepareTimestamps to true on the recovery unit.

      Then, when we go to unstash the transaction resources and start the transaction, we call _setReadSnapshot. There, if we see the catalog has changed while we were allocating the storage snapshot, we abandon the snapshot.

      Abandoning the snapshot instructs the recovery unit to close the transaction, which resets the value of _roundUpPreparedTimestamps to kNoRound.

      Then, when we go to prepare the transaction with the timestamp behind stable, we find the round-up setting is unexpectedly not set, which causes WiredTiger to invariant. (As of SERVER-86763 we invariant a bit sooner because we added an assertion earlier on to try to help diagnose this case.)

      We should fix this to ensure that we preserve this setting.

            Assignee:
            wei.hu@mongodb.com Wei Hu
            Reporter:
            kaitlin.mahar@mongodb.com Kaitlin Mahar
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved: