Commit be0cae40 authored by Leif Walsh's avatar Leif Walsh Committed by Yoni Fogel

[t:3884] fix up test3884 so it passes valgrind (and re-enable that), and free...

[t:3884] fix up test3884 so it passes valgrind (and re-enable that), and free an extra childkey in brtleaf_split

git-svn-id: file:///svn/toku/tokudb@34129 c7de825b-a66e-492c-adef-691d508d4ae1
parent 551f369b
......@@ -1369,6 +1369,11 @@ brtleaf_split (BRT t, BRTNODE node, BRTNODE *nodea, BRTNODE *nodeb, DBT *splitk,
node->totalchildkeylens -= toku_brt_pivot_key_len(node->childkeys[i+base_index]);
node->childkeys[i+base_index] = NULL;
}
if (split_on_boundary) {
// destroy the extra childkey between the nodes, we'll
// recreate it in splitk below
toku_free(node->childkeys[split_node]);
}
REALLOC_N(num_children_in_node, node->bp);
REALLOC_N(num_children_in_node-1, node->childkeys);
......
......@@ -159,10 +159,6 @@ check_brtloader-test-writer-errors-4: brtloader-test-writer-errors$(BINSUF)
check_brt-serialize-benchmark: brt-serialize-benchmark$(BINSUF)
./$< 92 200000
# test3884 doesn't work with valgrind yet, I need to resolve this
check_test3884: test3884$(BINSUF)
./$<
check_%: % $(PTHREAD_LOCAL)
$(VGRIND) ./$< $(VERBVERBOSE) $(EXTRA_ARGS) $(SUMMARIZE_CMD)
......
......@@ -105,22 +105,19 @@ test_main (int argc __attribute__((__unused__)), const char *argv[] __attribute_
// if we haven't done it right, we should hit the assert in the top of move_leafentries
brtleaf_split(brt, &sn, &nodea, &nodeb, &splitk, TRUE);
// r = toku_close_brt(brt, NULL); assert(r == 0);
// r = toku_cachetable_close(&ct); assert(r == 0);
toku_unpin_brtnode(brt, nodeb);
r = toku_close_brt(brt, NULL); assert(r == 0);
r = toku_cachetable_close(&ct); assert(r == 0);
if (splitk.data) {
toku_free(splitk.data);
}
toku_brtnode_free(&nodeb);
for (int i = 0; i < sn.n_children - 1; ++i) {
kv_pair_free(sn.childkeys[i]);
}
for (int i = 0; i < nelts / 2; ++i) {
toku_free(elts[i]);
}
for (int i = 0; i < sn.n_children; ++i) {
toku_omt_free_items(BLB_BUFFER(&sn, i));
destroy_basement_node(BLB(&sn, i));
}
toku_free(sn.bp);
......
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