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

refs #5802, fix some math

git-svn-id: file:///svn/toku/tokudb@51192 c7de825b-a66e-492c-adef-691d508d4ae1
parent 97d8311d
...@@ -3767,7 +3767,7 @@ bool evictor::run_eviction_on_pair(PAIR curr_in_clock) { ...@@ -3767,7 +3767,7 @@ bool evictor::run_eviction_on_pair(PAIR curr_in_clock) {
curr_in_clock->count--; curr_in_clock->count--;
} else { } else {
// generate a random number between 0 and 2^16 // generate a random number between 0 and 2^16
assert(size_current < ((int64_t)1<<48)); // to protect against possible overflows assert(size_current < (1LL<<48)); // to protect against possible overflows
int32_t rnd = myrandom_r(&m_random_data) % (1<<16); int32_t rnd = myrandom_r(&m_random_data) % (1<<16);
// The if-statement below will be true with probability of // The if-statement below will be true with probability of
// curr_size/(average size of PAIR in cachetable) // curr_size/(average size of PAIR in cachetable)
......
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