diff options
author | Ramon Fernandez <ramon.fernandez@mongodb.com> | 2015-08-19 11:07:33 -0400 |
---|---|---|
committer | Ramon Fernandez <ramon.fernandez@mongodb.com> | 2015-08-19 11:07:33 -0400 |
commit | f4e91feb3e03bfdb761588cfc324757a4631535f (patch) | |
tree | 3463e335ff84d6d1d66ba09dae52fac0e0144553 | |
parent | 4410586ebe21bcc281e14ee240bcad0fa1648efe (diff) | |
download | mongo-f4e91feb3e03bfdb761588cfc324757a4631535f.tar.gz |
Import wiredtiger-wiredtiger-mongodb-3.0.5-38-g1c2542f.tar.gz from wiredtiger branch mongodb-3.0
-rw-r--r-- | src/third_party/wiredtiger/src/evict/evict_lru.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/third_party/wiredtiger/src/evict/evict_lru.c b/src/third_party/wiredtiger/src/evict/evict_lru.c index 4d6e482b1d9..4cb29d4e1b9 100644 --- a/src/third_party/wiredtiger/src/evict/evict_lru.c +++ b/src/third_party/wiredtiger/src/evict/evict_lru.c @@ -614,7 +614,8 @@ __evict_request_walk_clear(WT_SESSION_IMPL *session) F_SET(session, WT_SESSION_CLEAR_EVICT_WALK); - while (btree->evict_ref != NULL && ret == 0) { + while (ret == 0 && (btree->evict_ref != NULL || + cache->evict_file_next == session->dhandle)) { F_SET(cache, WT_CACHE_CLEAR_WALKS); ret = __wt_cond_wait( session, cache->evict_waiter_cond, 100000); @@ -1055,6 +1056,9 @@ retry: while (slot < max_entries && ret == 0) { } if (incr) { + /* Remember the file we should visit first, next loop. */ + cache->evict_file_next = dhandle; + WT_ASSERT(session, dhandle->session_inuse > 0); (void)WT_ATOMIC_SUB4(dhandle->session_inuse, 1); incr = 0; @@ -1068,21 +1072,17 @@ retry: while (slot < max_entries && ret == 0) { /* * Walk the list of files a few times if we don't find enough pages. * Try two passes through all the files, give up when we have some - * candidates and we aren't finding more. Take care not to skip files - * on subsequent passes. + * candidates and we aren't finding more. */ if (!F_ISSET(cache, WT_CACHE_CLEAR_WALKS) && ret == 0 && slot < max_entries && (retries < 2 || (!LF_ISSET(WT_EVICT_PASS_WOULD_BLOCK) && retries < 10 && (slot == cache->evict_entries || slot > start_slot)))) { - cache->evict_file_next = NULL; start_slot = slot; ++retries; goto retry; } - /* Remember the file we should visit first, next loop. */ - cache->evict_file_next = dhandle; cache->evict_entries = slot; return (ret); } |