Browse Source

refs #5768, some changes

git-svn-id: file:///svn/toku/tokudb@50866 c7de825b-a66e-492c-adef-691d508d4ae1
pull/73/head
Zardosht Kasheff 13 years ago
committed by Yoni Fogel
parent
commit
b2c3b99c81
  1. 6
      ft/ft-ops.cc
  2. 6
      src/tests/stat64-root-changes.cc

6
ft/ft-ops.cc

@ -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;

6
src/tests/stat64-root-changes.cc

@ -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

Loading…
Cancel
Save