Commit 66b56b6b authored by Zardosht Kasheff's avatar Zardosht Kasheff Committed by Yoni Fogel

[t:4874], make toku_brtheader_remove_txn_ref still depend on the ydb lock....

[t:4874], make toku_brtheader_remove_txn_ref still depend on the ydb lock. Holding the header lock while trying to close leads to deadlocks. Need to rethink how to get close during toku_brtheader_remove_txn_ref working

git-svn-id: file:///svn/toku/tokudb@43437 c7de825b-a66e-492c-adef-691d508d4ae1
parent 2fae14ff
...@@ -861,6 +861,9 @@ toku_brtheader_remove_txn_ref(struct brt_header* h, TOKUTXN txn) { ...@@ -861,6 +861,9 @@ toku_brtheader_remove_txn_ref(struct brt_header* h, TOKUTXN txn) {
assert(txnv_again == txn); assert(txnv_again == txn);
r = toku_omt_delete_at(h->txns, index); r = toku_omt_delete_at(h->txns, index);
assert(r==0); assert(r==0);
// TODO: (Zardosht) figure out how to properly do this
// below this unlock, are depending on ydb lock
toku_brtheader_unlock(h);
if (!toku_brt_header_needed(h)) { if (!toku_brt_header_needed(h)) {
//Close immediately. //Close immediately.
// I have no idea how this error string business works // I have no idea how this error string business works
...@@ -868,6 +871,5 @@ toku_brtheader_remove_txn_ref(struct brt_header* h, TOKUTXN txn) { ...@@ -868,6 +871,5 @@ toku_brtheader_remove_txn_ref(struct brt_header* h, TOKUTXN txn) {
r = toku_remove_brtheader(h, &error_string, false, ZERO_LSN); r = toku_remove_brtheader(h, &error_string, false, ZERO_LSN);
lazy_assert_zero(r); lazy_assert_zero(r);
} }
toku_brtheader_unlock(h);
} }
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