summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Cahill <michael.cahill@mongodb.com>2015-08-26 14:14:51 +1000
committerMichael Cahill <michael.cahill@mongodb.com>2015-08-26 14:14:51 +1000
commit0d76fcd0976a55385d68ae5d5d389147f641976b (patch)
tree9379c75fc73f540174e8cfd692f2b3798c5efb6d
parent52feb5b11555f1b9535063388db45d540cf168ea (diff)
downloadmongo-0d76fcd0976a55385d68ae5d5d389147f641976b.tar.gz
SERVER-20008 Acquire the handle list lock when clearing walks to avoid a race with sweep.
(cherry picked from commit 33f5597916964a6b4956bccac15644b0d61bbb36)
-rw-r--r--src/evict/evict_lru.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/evict/evict_lru.c b/src/evict/evict_lru.c
index 550c5518891..ebd13d81403 100644
--- a/src/evict/evict_lru.c
+++ b/src/evict/evict_lru.c
@@ -175,7 +175,9 @@ __evict_server(void *arg)
* otherwise we can block applications evicting large pages.
*/
if (!F_ISSET(cache, WT_CACHE_STUCK)) {
- WT_ERR(__evict_clear_all_walks(session));
+ WT_WITH_DHANDLE_LOCK(session,
+ ret = __evict_clear_all_walks(session));
+ WT_ERR(ret);
/* Next time we wake up, reverse the sweep direction. */
cache->flags ^= WT_CACHE_WALK_REVERSE;