Commit 2e7835e6 authored by Yoni Fogel's avatar Yoni Fogel

Closes #1868 A parent can prelock a table, and then the child, or vice versa without crashing.

This does not add any performance optimizations

git-svn-id: file:///svn/toku/tokudb@13337 c7de825b-a66e-492c-adef-691d508d4ae1
parent bf03fe85
......@@ -4881,7 +4881,8 @@ int
toku_brt_note_table_lock (BRT brt, TOKUTXN txn)
{
if (brt->h->txnid_that_created_or_locked_when_empty != toku_txn_get_txnid(txn) &&
brt_is_empty(brt, toku_txn_logger(txn))) {
brt_is_empty(brt, toku_txn_logger(txn)) &&
brt->h->txnid_that_created_or_locked_when_empty == 0) {
assert(brt->h->txnid_that_created_or_locked_when_empty == 0);
brt->h->txnid_that_created_or_locked_when_empty = toku_txn_get_txnid(txn);
int r = toku_txn_note_brt(txn, brt);
......
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