The checkpoint thread reads at the stable timestamp to evaluate the amount of oplog necessary for rollback. If a checkpoint is taken during server startup or after a rollback when we are reconstructing prepared transactions, it may be possible to hit an assertion like this in WiredTiger:
WT_SESSION.prepare_transaction: __txn_assert_after_reads, 516: prepare timestamp (1623940678, 408) must be greater than the latest active read timestamp (1623940808, 102) : Invalid argument
We have only seen this problem reproduce on the code coverage builder, which is extremely slow, and no users have seen this. This has also only been reproduced on 4.4, but it seems like it should affect every version from 4.2 to 5.1.
A workaround may be to take a global X lock while reconstructing prepared transactions to conflict with the checkpoint thread.
- is related to
-
SERVER-39679 Add callback to replication when storage takes a checkpoint to learn of the maximum oplog truncation timestamp
- Closed