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

Investigate how to handle prepare conflicts with a key adjacent to a truncation range

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Truncate
    • Storage Engines
    • 8
    • StorEng - Refinement Pipeline

      This ticket is a follow on from WT-13186 which has removed bounded cursor support when positioning cursors. It is also related to WT-12539 which first addressed this issue.

      If a database contains the following keys

      1 (committed)
      2 (committed)
      10 (prepared)
      11 (committed)

      and a truncate call is made on the range 2-9 WiredTiger will position the stop cursor on key 10 and return a prepare conflict, even though 10 is outside the truncation range.

      We initially addressed this by using bounded cursors when positioning the stop cursor, however bounded cursors are not supported on history store cursors which the calling code must also support. As such we've removed these changes in WT-13186 and need to identify an alternate solution moving forward.

      WiredTiger's existing behaviour allows prepare conflicts in the case above as the truncate contract doesn't guarantee a prepare conflict must come from a prepared updated inside the range, only that if we encounter a prepare conflict during truncate operations that we will report it.

      This causes some issues for our RTS model which assumes prepared conflicts come from strictly inside the truncate range.

      The scope of this ticket is to confirm whether we limit truncate prepare conflicts to keys strictly inside the truncation range - and update the source code - or maintain the existing behaviour and update the RTS model to support it.

            Assignee:
            backlog-server-storage-engines [DO NOT USE] Backlog - Storage Engines Team
            Reporter:
            andrew.morton@mongodb.com Andrew Morton
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: