Priority: Major - P3
Affects Version/s: None
Fix Version/s: Backlog
We need to restore the history store value in case of a prepared rollback. If that races with checkpointing the history store, it may lead to data loss. Here's the scenario:
Eviction writes a prepared update to the disk and the previous version U1 to the history store.
Checkpoint visits that data store page and since it is clean, it keeps it as it is. Therefore, the prepared update is on the data store in that checkpoint.
We decide to rollback that prepared update. We restore U1 from the history store to the update chain and then remove it from the history store.
Checkpoint now checkpoints the history store and U1 is now absent from the history store so it is not included.
The system crashes and we start from the previous checkpoint. Rollback to stable removes the prepared update on the data store but it can't find U1 in the history store to restore. We now lose the data.