Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-8753

Add tombstone when rolling back in-memory, prepared, reconciled updates

    • 8
    • Storage - Ra 2022-02-07, Storage - Ra 2022-02-21
    • v5.3, v5.0, v4.4, v4.2


      Identified in SERVER-62685.
      The attached replicator test_WT-8753.py performs the following scenario:
      With an in-memory WiredTiger

      1. Session 1 (S1) is created
      2. S1 begins a transaction T1
      3. T1 writes to key K1
      4. T1 is prepared
      5. A new session S2 is created, starts transaction T2 and fails to write to K1 due to a write conflict
      6. T2 is rolled back
      7. S2 is closed
      8. T1 is rolled back

      Steps 2-8 are then repeated in a loop.

      After 1088 iterations T1 will fail to write to K1 with a write conflict, even though there are no active transactions that have written to K1.

      This will not occur if:

      • WiredTiger is not in-memory
      • T2 does not attempt to write to K1
      • T1 is not prepared

      If an additional step 9 is added to the loop where a third session S3 is created and closed then the failure will still occur, but on a random iteration and not on loop 1088. S3 does not need to start or rollback a transaction for this to occur.

      Definition of Done

      Identify the cause of this issue and resolve it. The attached WT replicator no longer fails and the Mongo replicator from SERVER-62685 also no longer fails.

        1. test_WT-8753.py
          2 kB
          Andrew Morton

            andrew.morton@mongodb.com Andrew Morton
            andrew.morton@mongodb.com Andrew Morton
            0 Vote for this issue
            14 Start watching this issue