-
Type:
Task
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Checkpoints, Timestamps
-
None
-
Storage Engines - Transactions
-
None
-
None
Issue Summary
There is uncertainty regarding the correct initialization value for checkpoint_timestamp in the WiredTiger connection layer. The current implementation initializes it to 0, but there is concern about whether it should be set to 0 or WT_TS_MAX, especially given that WT_TS_MAX is considered an invalid value in some contexts. Additionally, it was noted that oldest_timestamp should also be initialized in the same location for consistency.
Context
- The relevant code is in conn_layered.c#L878.
- There is a documentation section describing timestamp semantics at arch-timestamp.dox#L133-L139.
- The documentation notes an inconsistency:
A value that is current and has not been overwritten or deleted has no stop time. This is represented with WT_TS_NONE in durable_stop_ts but WT_TS_MAX in stop_ts, and WT_TS_MAX in stop_txn.
- There is confusion about the use of WT_TS_NONE versus WT_TS_MAX for indicating validity and the appropriate initialization value.
Proposed Solution
- Clarify whether checkpoint_timestamp (and oldest_timestamp) should be initialized to 0, WT_TS_NONE, or WT_TS_MAX.
- Update the code to ensure consistent and correct initialization.
- Revise the documentation at arch-timestamp.dox to reflect the correct semantics and resolve the noted inconsistency.
This ticket was generated by AI from a Slack thread.