Commit ef44c9a6 authored by Zardosht Kasheff's avatar Zardosht Kasheff Committed by Yoni Fogel

refs #5768, some changes

git-svn-id: file:///svn/toku/tokudb@50866 c7de825b-a66e-492c-adef-691d508d4ae1
parent 7ff640e0
......@@ -814,13 +814,13 @@ void toku_ftnode_flush_callback (
assert(ftnode->thisnodename.b==nodename.b);
int height = ftnode->height;
if (write_me) {
if (height == 0 && !is_clone) {
ftnode_update_disk_stats(ftnode, h, for_checkpoint);
}
toku_assert_entire_node_in_memory(ftnode);
if (height == 0) {
ft_leaf_run_gc(ftnode, h);
}
if (height == 0 && !is_clone) {
ftnode_update_disk_stats(ftnode, h, for_checkpoint);
}
int r = toku_serialize_ftnode_to(fd, ftnode->thisnodename, ftnode, ndd, !is_clone, h, for_checkpoint);
assert_zero(r);
ftnode->layout_version_read_from_disk = FT_LAYOUT_VERSION;
......
......@@ -111,9 +111,9 @@ run_test (void) {
r = txn->commit(txn, 0); CKERR(r);
r = db->stat64(db, NULL, &s); CKERR(r);
// garbage collection is not happening here yet, so
// the number of keys should be 1
assert(s.bt_nkeys == 1 && s.bt_dsize == 0);
// garbage collection has happened in db->close, so
// the number of keys should be 0
assert(s.bt_nkeys == 0 && s.bt_dsize == 0);
}
// verify update of non-existing key inserts a row
......
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