Commit 52bf3d42 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 e1cc1e68
...@@ -26,7 +26,7 @@ flush (CACHEFILE f __attribute__((__unused__)), ...@@ -26,7 +26,7 @@ flush (CACHEFILE f __attribute__((__unused__)),
) { ) {
/* Do nothing */ /* Do nothing */
if (check_flush && !keep) { 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(flush_may_occur);
assert(!w); assert(!w);
assert(expected_flushed_key == (int)k.b); assert(expected_flushed_key == (int)k.b);
...@@ -89,13 +89,12 @@ cachetable_test (void) { ...@@ -89,13 +89,12 @@ cachetable_test (void) {
} }
flush_may_occur = true; flush_may_occur = true;
expected_flushed_key = 4; 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(); ct->ev.signal_eviction_thread();
usleep(1*1024*1024); usleep(1*1024*1024);
flush_may_occur = true; flush_may_occur = true;
expected_flushed_key = 5; r = toku_test_cachetable_unpin(f1, make_blocknum(5), 5, CACHETABLE_CLEAN, make_pair_attr(2));
r = toku_test_cachetable_unpin(f1, make_blocknum(5), 5, CACHETABLE_CLEAN, make_pair_attr(4));
ct->ev.signal_eviction_thread(); ct->ev.signal_eviction_thread();
usleep(1*1024*1024); 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