Commit 3836840e authored by Zardosht Kasheff's avatar Zardosht Kasheff Committed by Yoni Fogel

refs #5554, fix setting of oldest_referenced_xid by looking at snapshot_txnids OMT as well

git-svn-id: file:///svn/toku/tokudb@51928 c7de825b-a66e-492c-adef-691d508d4ae1
parent 954a994d
......@@ -270,13 +270,20 @@ static TXNID get_oldest_referenced_xid_unlocked(TXN_MANAGER txn_manager) {
// one live transaction
invariant_zero(r);
struct referenced_xid_tuple* tuple;
if (txn_manager->referenced_xids.size() > 0) {
struct referenced_xid_tuple* tuple;
r = txn_manager->referenced_xids.fetch(0, &tuple);
if (r == 0 && tuple->begin_id < oldest_referenced_xid) {
oldest_referenced_xid = tuple->begin_id;
}
}
if (txn_manager->snapshot_txnids.size() > 0) {
TXNID id;
r = txn_manager->snapshot_txnids.fetch(0, &id);
if (r == 0 && id < oldest_referenced_xid) {
oldest_referenced_xid = id;
}
}
return oldest_referenced_xid;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment