summaryrefslogtreecommitdiff
path: root/src/btree/bt_evict.c
diff options
context:
space:
mode:
authorMichael Cahill <mjc@wiredtiger.com>2014-07-03 15:14:47 +1000
committerMichael Cahill <mjc@wiredtiger.com>2014-07-03 15:14:47 +1000
commit6c86f7056cea8dae30141815f40674bb9fac32ea (patch)
tree8f49e39e7417891c49418d6f43516bb4a70ee4c5 /src/btree/bt_evict.c
parente0544a0de95d17b00f3f89f5c0194edb0237baf0 (diff)
parentfe2e1eae6a8ac56bc472a9f29728f339a9e8c84c (diff)
downloadmongo-6c86f7056cea8dae30141815f40674bb9fac32ea.tar.gz
Merge pull request #1099 from wiredtiger/evict-in-server
Revert change to not evict in the server thread if application threads wait
Diffstat (limited to 'src/btree/bt_evict.c')
-rw-r--r--src/btree/bt_evict.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/btree/bt_evict.c b/src/btree/bt_evict.c
index de96b2357bc..0f1e1c34ce4 100644
--- a/src/btree/bt_evict.c
+++ b/src/btree/bt_evict.c
@@ -669,14 +669,13 @@ __evict_lru(WT_SESSION_IMPL *session, uint32_t flags)
/*
* The eviction server thread doesn't do any actual eviction if there
- * are eviction workers running or application threads are waiting
- * for candidates to evict.
+ * are eviction workers running.
*/
- if (cache->eviction_workers > 0 ||
- __wt_cond_has_waiters(session, cache->evict_waiter_cond)) {
+ WT_RET(__wt_cond_signal(session, cache->evict_waiter_cond));
+
+ if (cache->eviction_workers > 0) {
WT_STAT_FAST_CONN_INCR(
session, cache_eviction_server_not_evicting);
- WT_RET(__wt_cond_signal(session, cache->evict_waiter_cond));
/*
* Give other threads a chance to access the queue before
* gathering more candidates.
@@ -686,6 +685,7 @@ __evict_lru(WT_SESSION_IMPL *session, uint32_t flags)
WT_STAT_FAST_CONN_INCR(session, cache_eviction_server_evicting);
WT_RET(__evict_lru_pages(session, 0));
}
+
return (0);
}