Commit af406a04 authored by Zardosht Kasheff's avatar Zardosht Kasheff Committed by Yoni Fogel
Browse files

[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 0744a285
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -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;