From b2c3b99c81438cdd542b146b764c56b5d5b9d959 Mon Sep 17 00:00:00 2001 From: Zardosht Kasheff <zardosht@tokutek.com> Date: Wed, 17 Apr 2013 00:01:22 -0400 Subject: [PATCH] refs #5768, some changes git-svn-id: file:///svn/toku/tokudb@50866 c7de825b-a66e-492c-adef-691d508d4ae1 --- ft/ft-ops.cc | 6 +++--- src/tests/stat64-root-changes.cc | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ft/ft-ops.cc b/ft/ft-ops.cc index 47ada85ea9..7764b532dd 100644 --- a/ft/ft-ops.cc +++ b/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; diff --git a/src/tests/stat64-root-changes.cc b/src/tests/stat64-root-changes.cc index 50de002272..6a5785b864 100644 --- a/src/tests/stat64-root-changes.cc +++ b/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 -- 2.30.9