Commit 60d43a6d authored by Rich Prohaska's avatar Rich Prohaska Committed by Yoni Fogel

fix cachetable unpin and remove refs[t:2507]

git-svn-id: file:///svn/toku/tokudb@19264 c7de825b-a66e-492c-adef-691d508d4ae1
parent 4c7d34d0
......@@ -1898,12 +1898,14 @@ int toku_cachetable_unpin_and_remove (CACHEFILE cachefile, CACHEKEY key) {
//pointers. We need to let the checkpoint thread finish up with
//this pair.
assert(rwlock_blocked_writers(&p->rwlock)==1); //Only one checkpoint thread.
// If anyone is waiting on write lock, let them finish.
cachetable_unlock(ct);
struct workqueue cq;
workqueue_init(&cq);
p->cq = &cq;
// If anyone is waiting on write lock, let them finish.
cachetable_unlock(ct);
WORKITEM wi = 0;
r = workqueue_deq(&cq, &wi, 1);
//Writer is now done.
......
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