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

[t:4657], update disk stats before rebalancing, because rebalancing wipes out...

[t:4657], update disk stats before rebalancing, because rebalancing wipes out deltas of basement nodes

git-svn-id: file:///svn/toku/tokudb@41749 c7de825b-a66e-492c-adef-691d508d4ae1
parent 95e78733
......@@ -681,6 +681,9 @@ void toku_brtnode_clone_callback(
//BRTNODE cloned_node = (BRTNODE)toku_xmalloc(sizeof(*BRTNODE));
memset(cloned_node, 0, sizeof(*cloned_node));
if (node->height == 0) {
// set header stats, must be done before rebalancing
brtnode_update_disk_stats(node, h, for_checkpoint);
// rebalance the leaf node
rebalance_brtnode_leaf(node, h->basementnodesize);
}
......@@ -713,10 +716,6 @@ void toku_brtnode_clone_callback(
// clone partition
brtnode_clone_partitions(node, cloned_node);
// set header stats
if (node->height == 0) {
brtnode_update_disk_stats(node, h, for_checkpoint);
}
// clear dirty bit
node->dirty = 0;
cloned_node->dirty = 0;
......
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