summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Cahill <michael.cahill@wiredtiger.com>2015-03-23 17:00:15 +1100
committerMichael Cahill <michael.cahill@wiredtiger.com>2015-03-23 17:00:15 +1100
commitf4616895f1ac35aaa50fc1a68e0c6dd9e0cf7717 (patch)
tree1c76dfc7b863d3cd0cb2327f7d53b76cde01d736 /src
parent1ecfe8b54d8b98f74e77fe3d15498bfe72351396 (diff)
downloadmongo-f4616895f1ac35aaa50fc1a68e0c6dd9e0cf7717.tar.gz
If a walk for pages to evict ends on a page requiring forced eviction, don't keep it pinned.
refs SERVER-16662, SERVER-17382
Diffstat (limited to 'src')
-rw-r--r--src/evict/evict_lru.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/evict/evict_lru.c b/src/evict/evict_lru.c
index 7471c83027a..2ebd699c579 100644
--- a/src/evict/evict_lru.c
+++ b/src/evict/evict_lru.c
@@ -1257,8 +1257,13 @@ fast: /* If the page can't be evicted, give up. */
/*
* If we happen to end up on the root page, clear it. We have to track
* hazard pointers, and the root page complicates that calculation.
+ *
+ * Also clear the walk if we land on a page requiring forced eviction.
+ * The eviction server may go to sleep, and we want this page evicted
+ * as quickly as possible.
*/
- if ((ref = btree->evict_ref) != NULL && __wt_ref_is_root(ref)) {
+ if ((ref = btree->evict_ref) != NULL && (__wt_ref_is_root(ref) ||
+ ref->page->read_gen == WT_READGEN_OLDEST)) {
btree->evict_ref = NULL;
__wt_page_release(session, ref, 0);
}