Commit 9494eef8 authored by Rich Prohaska's avatar Rich Prohaska Committed by Yoni Fogel

#3710 enable full hash verification only if SLOW is defined closes[t:3710]

git-svn-id: file:///svn/toku/tokudb@32763 c7de825b-a66e-492c-adef-691d508d4ae1
parent 44062af0
...@@ -249,17 +249,19 @@ static u_int32_t compute_child_fullhash (CACHEFILE cf, BRTNODE node, int childnu ...@@ -249,17 +249,19 @@ static u_int32_t compute_child_fullhash (CACHEFILE cf, BRTNODE node, int childnu
assert(node->height>0 && childnum<node->n_children); assert(node->height>0 && childnum<node->n_children);
switch (BP_HAVE_FULLHASH(node, childnum)) { switch (BP_HAVE_FULLHASH(node, childnum)) {
case TRUE: case TRUE:
{ {
assert(BP_FULLHASH(node, childnum)==toku_cachetable_hash(cf, BP_BLOCKNUM(node, childnum))); #ifdef SLOW
return BP_FULLHASH(node, childnum); assert(BP_FULLHASH(node, childnum)==toku_cachetable_hash(cf, BP_BLOCKNUM(node, childnum)));
} #endif
case FALSE: return BP_FULLHASH(node, childnum);
{ }
case FALSE:
{
u_int32_t child_fullhash = toku_cachetable_hash(cf, BP_BLOCKNUM(node, childnum)); u_int32_t child_fullhash = toku_cachetable_hash(cf, BP_BLOCKNUM(node, childnum));
BP_HAVE_FULLHASH(node, childnum) = TRUE; BP_HAVE_FULLHASH(node, childnum) = TRUE;
BP_FULLHASH(node, childnum) = child_fullhash; BP_FULLHASH(node, childnum) = child_fullhash;
return child_fullhash; return child_fullhash;
} }
} }
abort(); return 0; abort(); return 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