Commit 2ae96c70 authored by Leif Walsh's avatar Leif Walsh Committed by Yoni Fogel

refs #5798 update cachetable-clock-eviction to reflect new probabilistic eviction strategy

git-svn-id: file:///svn/toku/tokudb@51472 c7de825b-a66e-492c-adef-691d508d4ae1
parent 7e154676
......@@ -26,7 +26,7 @@ flush (CACHEFILE f __attribute__((__unused__)),
) {
/* Do nothing */
if (check_flush && !keep) {
if (verbose) { printf("FLUSH: %d write_me %d\n", (int)k.b, w); }
if (verbose) { printf("FLUSH: %d write_me %d expected %d\n", (int)k.b, w, expected_flushed_key); }
assert(flush_may_occur);
assert(!w);
assert(expected_flushed_key == (int)k.b);
......@@ -89,13 +89,12 @@ cachetable_test (void) {
}
flush_may_occur = true;
expected_flushed_key = 4;
toku_cachetable_put(f1, make_blocknum(5), 5, NULL, make_pair_attr(4), wc, put_callback_nop);
toku_cachetable_put(f1, make_blocknum(5), 5, NULL, make_pair_attr(1), wc, put_callback_nop);
ct->ev.signal_eviction_thread();
usleep(1*1024*1024);
flush_may_occur = true;
expected_flushed_key = 5;
r = toku_test_cachetable_unpin(f1, make_blocknum(5), 5, CACHETABLE_CLEAN, make_pair_attr(4));
r = toku_test_cachetable_unpin(f1, make_blocknum(5), 5, CACHETABLE_CLEAN, make_pair_attr(2));
ct->ev.signal_eviction_thread();
usleep(1*1024*1024);
......
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