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

Unpin child before calling {{{brt_handle_maybe_reactive_child}}}, because...

Unpin child before calling {{{brt_handle_maybe_reactive_child}}}, because handling the reactive child may remove it from the hash table.  Addresses #1195.

git-svn-id: file:///svn/toku/tokudb.1195@7638 c7de825b-a66e-492c-adef-691d508d4ae1
parent bd0c64fe
......@@ -3259,16 +3259,17 @@ static int brt_search_child(BRT brt, BRTNODE node, int childnum, brt_search_t *s
// Even if r is reactive, we want to handle the maybe reactive child.
verify_local_fingerprint_nonleaf(node);
verify_local_fingerprint_nonleaf(childnode);
{
int rr = toku_unpin_brtnode(brt, childnode); // unpin the childnode before handling the reactive child (because that may make the childnode disappear.)
if (rr!=0) r = rr;
}
{
BOOL did_io = FALSE;
int rr = brt_handle_maybe_reactive_child(brt, node, childnum, child_re, &did_io, logger, did_react);
if (rr!=0) r = rr; // if we got an error, then return rr. Else we will return the r from brt_search_node().
}
{
int rr = toku_unpin_brtnode(brt, childnode);
if (rr!=0) r = rr;
}
*parent_re = get_nonleaf_reactivity(node);
verify_local_fingerprint_nonleaf(node);
......
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