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

Rollback-to-stable should detect a prepared transaction as an active transaction and fail

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • WT11.0.0, 5.3.0, 5.2.0-rc5
    • Affects Version/s: None
    • Component/s: None
    • None

      It seems that if you prepare a transaction, call rollback to stable (to before the prepare), then abort the prepared transaction, we assert/crash. The crash is "unable to locate update associated with a prepared operation: WT_NOTFOUND: item not found" and happens in __txn_search_uncommitted_op; it happens because the update associated with the transaction op has been aborted/removed by rollback to stable and is therefore not found by the cursor search in __wt_btcur_search_prepared.

      All of that is reasonably clear. It's not so clear what to do about it, so it seemed like a good idea to file the ticket so it can be discussed.

      I'm going to attach a simple reproducer.

            Assignee:
            keith.bostic@mongodb.com Keith Bostic (Inactive)
            Reporter:
            dholland+wt@sauclovia.org David Holland
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: