diff options
author | Alex Gorrod <alexg@wiredtiger.com> | 2013-01-08 11:28:24 +1100 |
---|---|---|
committer | Alex Gorrod <alexg@wiredtiger.com> | 2013-01-08 11:28:24 +1100 |
commit | b11adf75193ed4bdb644bd921cdffa8d1770b443 (patch) | |
tree | a26fe0cd7358e6058da93915dc0cccca0367b237 | |
parent | f742f275772668684d03d9b7cb9244057197b872 (diff) | |
download | mongo-b11adf75193ed4bdb644bd921cdffa8d1770b443.tar.gz |
Fix forced eviction to continue if a page is unavailable.
-rw-r--r-- | src/btree/bt_evict.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/btree/bt_evict.c b/src/btree/bt_evict.c index fac306d9958..73452b19eb7 100644 --- a/src/btree/bt_evict.c +++ b/src/btree/bt_evict.c @@ -324,7 +324,16 @@ __evict_worker(WT_SESSION_IMPL *session) WT_RET(ret); if (F_ISSET(cache, WT_EVICT_FORCE_PASS)) { - WT_RET(__wt_evict_lru_page(session, 0)); + ret = __wt_evict_lru_page(session, 0); + /* + * Sometimes the page won't be available for eviction + * because there is a reader still holding a hazard + * reference. Give up in that case, the application + * thread can add it again. + */ + if (ret == EBUSY) + ret = 0; + WT_RET(ret); F_CLR(cache, WT_EVICT_FORCE_PASS); } /* |