summaryrefslogtreecommitdiff
path: root/src/btree
diff options
context:
space:
mode:
authorKeith Bostic <keith@wiredtiger.com>2016-03-06 13:59:17 -0500
committerKeith Bostic <keith@wiredtiger.com>2016-03-06 13:59:17 -0500
commit0d847085452e889a58b2a0c72cd821754406a101 (patch)
tree56e1cc08698c49a2a9668880a9b958cb78914eda /src/btree
parent2147fac6813949cf33b7e430db0c213736ee8d8a (diff)
downloadmongo-0d847085452e889a58b2a0c72cd821754406a101.tar.gz
WT-2391: De-prioritize eviction from indexes
Add a comment.
Diffstat (limited to 'src/btree')
-rw-r--r--src/btree/bt_read.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/btree/bt_read.c b/src/btree/bt_read.c
index 7cd2d9458df..3070716631f 100644
--- a/src/btree/bt_read.c
+++ b/src/btree/bt_read.c
@@ -486,6 +486,15 @@ __wt_page_in_func(WT_SESSION_IMPL *session, WT_REF *ref, uint32_t flags
WT_RET(__wt_cache_eviction_check(
session, 1, NULL));
WT_RET(__page_read(session, ref));
+
+ /*
+ * If configured to not trash the cache, leave the page
+ * generation unset, we'll set it before returning to
+ * the oldest read generation, so the page is forcibly
+ * evicted as soon as possible. We don't do that set
+ * here because we don't want to evict the page before
+ * we "acquire" it.
+ */
evict_soon = LF_ISSET(WT_READ_WONT_NEED) ||
F_ISSET(session, WT_SESSION_NO_CACHE);
continue;