-
Type:
Task
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Storage Engines - Transactions
-
None
-
None
As part of WT-11972, we introduced snapshot "save/refresh/restore" helpers in txn.c for the eviction on application-thread path. Those helpers manually copy WT_TXN_SNAPSHOT fields into txn->backup_snapshot_data.
Parallel checkpoints need to do the same copy operation in __checkpoint_prepare to construct an immutable checkpoint snapshot for worker threads in WT-17043.
To avoid duplication we should introduce a small internal helper, e.g. __txn_snapshot_clone(session, src, dst, &array, &capacity, capacity_limit). Then use it for __checkpoint_prepare for the immutable checkpoint snapshot used by parallel checkpoint workers and in __wt_txn_snapshot_save_and_refresh / __wt_txn_snapshot_release_and_restore for the eviction application-thread snapshot backup/restore.