Commit 52dd11a5 authored by Yoni Fogel's avatar Yoni Fogel

closes #5367 Fix problem where nodes in omt are marked stale, the node is...

closes #5367 Fix problem where nodes in omt are marked stale, the node is evicted and read again and not marked stale ever again

git-svn-id: file:///svn/toku/tokudb@46947 c7de825b-a66e-492c-adef-691d508d4ae1
parent 4407c947
......@@ -3823,7 +3823,6 @@ do_bn_apply_cmd(FT_HANDLE t, BASEMENTNODE bn, FTNODE ancestor, int childnum, str
const XIDS xids = (XIDS) &entry->xids_s;
bytevec key = xids_get_end_of_array(xids);
bytevec val = (uint8_t*)key + entry->keylen;
entry->is_fresh = false;
DBT hk;
toku_fill_dbt(&hk, key, keylen);
......@@ -3841,6 +3840,11 @@ do_bn_apply_cmd(FT_HANDLE t, BASEMENTNODE bn, FTNODE ancestor, int childnum, str
} else {
STATUS_VALUE(FT_MSN_DISCARDS)++;
}
// We must always mark entry as stale since it has been marked
// (using omt::iterate_and_mark_range)
// It is possible to call do_bn_apply_cmd even when it won't apply the message because
// the node containing it could have been evicted and brought back in.
entry->is_fresh = false;
}
struct iterate_do_bn_apply_cmd_extra {
......
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