Commit 09cf4397 authored by Christian Rober's avatar Christian Rober Committed by Yoni Fogel
Browse files

[t:4772] Checking in fix to main, preventing cleaner threads from incorrectly...

[t:4772] Checking in fix to main, preventing cleaner threads from incorrectly evicting recently basement nodes.

git-svn-id: file:///svn/toku/tokudb@42404 c7de825b-a66e-492c-adef-691d508d4ae1
parent db657df4
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -148,7 +148,12 @@ update_flush_status(BRTNODE child, int cascades) {
static void
maybe_destroy_child_blbs(BRTNODE node, BRTNODE child)
{
    if (child->height == 0 && !child->dirty) {
    // If the node is already fully in memory, as in upgrade, we don't
    // need to destroy the basement nodes because they are all equally
    // up to date.
    if (!is_entire_node_in_memory(child) && 
        child->height == 0 && 
        !child->dirty) {
        for (int i = 0; i < child->n_children; ++i) {
            if (BP_STATE(child, i) == PT_AVAIL &&
                node->max_msn_applied_to_node_on_disk.msn < BLB_MAX_MSN_APPLIED(child, i).msn) {
+1 −0
Original line number Diff line number Diff line
@@ -491,6 +491,7 @@ void destroy_basement_node (BASEMENTNODE bn);
void destroy_nonleaf_childinfo (NONLEAF_CHILDINFO nl);
void toku_destroy_brtnode_internals(BRTNODE node);
void toku_brtnode_free (BRTNODE *node);
bool is_entire_node_in_memory(BRTNODE node);
void toku_assert_entire_node_in_memory(BRTNODE node);
// FIXME needs toku prefix
void bring_node_fully_into_memory(BRTNODE node, struct brt_header* h);
+1 −1
Original line number Diff line number Diff line
@@ -227,7 +227,7 @@ toku_brt_header_suppress_rollbacks(struct brt_header *h, TOKUTXN txn) {
    h->root_that_created_or_locked_when_empty  = rootid;
}

static bool is_entire_node_in_memory(BRTNODE node) {
bool is_entire_node_in_memory(BRTNODE node) {
    for (int i = 0; i < node->n_children; i++) {
        if(BP_STATE(node,i) != PT_AVAIL) {
            return false;