Commit 14e85fde authored by Leif Walsh's avatar Leif Walsh Committed by Yoni Fogel

adding a comment in preparation for the code review tomorrow

git-svn-id: file:///svn/toku/tokudb@40240 c7de825b-a66e-492c-adef-691d508d4ae1
parent f7180e1f
......@@ -176,6 +176,9 @@ hot_update_status(BRTNODE UU(child),
return;
}
// If we've just split a node, HOT needs another chance to decide which
// one to flush into. This gives it a chance to do that, and update the
// keys it maintains.
static int
hot_pick_child_after_split(struct brt_header *h,
BRTNODE parent,
......@@ -188,6 +191,10 @@ hot_pick_child_after_split(struct brt_header *h,
assert(childnum == childnuma || childnum == childnumb);
hot_update_flusher_keys(parent, childnum, flusher);
if (parent->height == 1) {
// We don't want to recurse into a leaf node, but if we return
// anything valid, brt_split_child will try to go there, so we
// return -1 to allow brt_split_child to have its default
// behavior, which will be to stop recursing.
childnum = -1;
}
return childnum;
......
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