-
Type:
Task
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: Cache and Eviction
-
None
-
Storage Engines, Storage Engines - Transactions
-
SE Transactions - 2025-06-06
-
3
-
0
-
v8.1, v8.0
There is an existing stat that gets incremented whenever we roll back the oldest transaction running in the system. Currently it doesn't tell exactly whether it is rolled back due to it being the oldest transaction or its transaction snapshot being the oldest transaction.
/* * Check if either the transaction's ID or its pinned ID is equal to the oldest transaction ID. */ if (__wt_atomic_loadv64(&txn_shared->id) == global_oldest || __wt_atomic_loadv64(&txn_shared->pinned_id) == global_oldest) { WT_RET_SUB( session, WT_ROLLBACK, WT_OLDEST_FOR_EVICTION, WT_TXN_ROLLBACK_REASON_OLDEST_FOR_EVICTION); }
Separate the above conditions and track the stats based on the condition. Reuse the existing stat txn_rollback_oldest_pinned whenever the session transaction ID txn_shared->id is the oldest, and add another stat for the snapshot txn_shared->pinned_id being the oldest.