Commit e3976159 authored by Yoni Fogel's avatar Yoni Fogel

[t:5067] Closes #5067 Strengthen garbage_collection_debug

git-svn-id: file:///svn/toku/tokudb@44755 c7de825b-a66e-492c-adef-691d508d4ae1
parent 9d1ae7d5
......@@ -136,7 +136,8 @@ verify_snapshot_system(TXN_MANAGER txn_manager UU()) {
// Only committed entries have return a youngest.
invariant(youngest == TXNID_NONE);
}
else if (youngest != TXNID_NONE) {
else {
invariant(youngest != TXNID_NONE);
// A committed entry might have been read-only, in which case it won't return anything.
// This snapshot reads 'live_xid' so it's youngest cannot be older than snapshot_xid.
invariant(youngest >= snapshot_xid);
......@@ -586,7 +587,7 @@ void toku_txn_manager_finish_txn(TXN_MANAGER txn_manager, TOKUTXN txn) {
r = toku_omt_delete_at(txn_manager->live_root_txns, idx);
invariant_zero(r);
if (txn->begin_was_logged) {
if (txn->begin_was_logged || garbage_collection_debug) {
if (!is_snapshot) {
// If it's a snapshot, we already calculated index_in_snapshot_txnids.
// Otherwise, calculate it now.
......
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