Assert that pages are written in the same checkpoint in which they are reconciled

    • Storage Engines, Storage Engines - Persistence
    • None
    • None

      We should (re-)introduce an assertion into the disagg block manager to ensure that pages are written out in the same checkpoint in which they are reconciled. This would ensure that (1) there are no race conditions, and (2) we do not evict pages when not supposed to.

      We would essentially like to re-introduce the following assertion, which was removed from the code as a part of deprecating checkpoint IDs:

      WT_ACQUIRE_READ(checkpoint_id, conn->disaggregated_storage.global_checkpoint_id);
      WT_ASSERT_ALWAYS(session, checkpoint_id == block_meta->checkpoint_id,
       "The page checkpoint id doesn't match the current checkpoint id");
      

      Perhaps we could leverage last_checkpoint_meta_lsn for this purpose, as it delineates between checkpoints. We could pass this LSN when the page is reconciled, and then check it again in __wti_block_disagg_write_internal.

              Assignee:
              [DO NOT USE] Backlog - Storage Engines Team
              Reporter:
              Peter Macko
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: