-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Critical - P2
-
Affects Version/s: None
-
Component/s: Transactions
-
Storage Engines
-
StorEng - Defined Pipeline
In __wt_txn_pinned_timestamp, we may read the global pinned_timestamp multiple times and causing the value to deviate.
*pinned_tsp = pinned_ts = txn_global->pinned_timestamp;
/*
* The read of checkpoint timestamp needs to be carefully ordered: it needs to be after we have
* read the pinned timestamp and the checkpoint generation, otherwise, we may read earlier
* checkpoint timestamp before the checkpoint generation that is read resulting more data being
* pinned. If a checkpoint is starting and we have to use the checkpoint timestamp, we take the
* minimum of it with the oldest timestamp, which is what we want.
*/
WT_ACQUIRE_BARRIER();
checkpoint_ts = txn_global->checkpoint_timestamp;
if (checkpoint_ts != WT_TS_NONE && checkpoint_ts < pinned_ts)
*pinned_tsp = checkpoint_ts;
*pinned_tsp and pinned_ts may store different values causing us to not set the *pinned_tsp to checkpoint_ts.
This is potentially a data corruption issue.