Commit d23e5613 authored by Bradley C. Kuszmaul's avatar Bradley C. Kuszmaul Committed by Yoni Fogel

Candidate fix for #1447. Addresses #1447.

git-svn-id: file:///svn/toku/tokudb@9251 c7de825b-a66e-492c-adef-691d508d4ae1
parent a54a52f0
...@@ -304,9 +304,13 @@ toku_rollback_tablelock_on_empty_table (FILENUM filenum, TOKUTXN txn, YIELDF UU( ...@@ -304,9 +304,13 @@ toku_rollback_tablelock_on_empty_table (FILENUM filenum, TOKUTXN txn, YIELDF UU(
OMTVALUE brtv=NULL; OMTVALUE brtv=NULL;
r = toku_omt_find_zero(txn->open_brts, find_brt_from_filenum, &filenum, &brtv, NULL, NULL); r = toku_omt_find_zero(txn->open_brts, find_brt_from_filenum, &filenum, &brtv, NULL, NULL);
assert(r==0); // we cannot handle the case where the table is already closed... Is that an important case? If it is important, we could do something about it by creating a "truncate" message that propagates down the tree, removing everything. if (r==0) {
BRT brt = brtv; // If r!=0 it could be because we grabbed a log on an empty table that doesn't even exist, and we never put anything into it.
r = toku_brt_truncate(brt); // So, just don't do anything in this case.
BRT brt = brtv;
r = toku_brt_truncate(brt);
assert(r==0);
}
return toku_cachefile_close(&cf, toku_txn_logger(txn), 0); return toku_cachefile_close(&cf, toku_txn_logger(txn), 0);
} }
......
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