ExportXMLWordPrintableJSON

    • Type: Task
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Timestamps, Transactions
    • None
    • Storage Engines - Transactions
    • 219.736
    • SE Transactions - 2026-12-18
    • None

      Problem

      With preserve_prepared enabled, __txn_validate_durable_timestamp rejects a prepared transaction whose durable timestamp is less than or equal to its prepare timestamp (added by WT-17377). In disaggregated storage this restriction is believed to be unnecessary.

      Rationale

      • A follower already rejects any prepare, commit or durable timestamp at or below the last picked-up checkpoint timestamp (__txn_check_follower_checkpoint_ts, WT-18878 for commit and durable, WT-18943 for prepare).
      • On the leader, the durable timestamp must be after the stable timestamp, and the leader's checkpoint timestamp does not exceed stable.
      • The stricter "durable timestamp strictly after the last checkpoint timestamp" assert for prepared-id transactions (WT-17459) is therefore subsumed.
      • These checks keep the timestamps away from the checkpoint boundary. They do not by themselves require durable to differ from prepare. The justification for removing the durable_ts <= prepare_timestamp check is that WT-17377 only states a general rationale (keeping the prepare and durable moments distinct), and no code was found that depends on the gap: with preserve_prepared a prepared cell is identified by its prepared id, not by a timestamp difference.

      Scope

      The check is not gated on disaggregated storage. It applies to any connection with preserve_prepared, and test_prepare50 covers it on a plain table: URI. Decide whether to remove it only for disaggregated storage or entirely.

      Proposed change

      • Remove (or gate off for disaggregated storage) the durable_ts <= prepare_timestamp check in src/txn/txn_timestamp.c.
      • Remove the redundant assert on the last checkpoint timestamp in __txn_set_durable_timestamp and update its comment.
      • Update test_prepare50 to match the new behaviour.
      • Change test/checkpoint to use the same timestamp for the prepare, commit and durable timestamps of a prepared transaction. The worker threads currently commit with durable at the prepare timestamp plus 2 (workers.c), and the prepare-discover thread uses durable at commit plus 1 (checkpointer.c).
      • Change test/format to use the same timestamp for prepare, commit and durable. The predictable-replay prepare timestamp selection (replay.c) currently picks a prepare timestamp strictly below the commit timestamp, and skips preparing when none is available, to satisfy the durable > prepare rule. Update that logic and its comment.

            Assignee:
            Dinujaya Rajakaruna
            Reporter:
            Chenhao Qu
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: