summaryrefslogtreecommitdiff
path: root/src/evict/evict_page.c
diff options
context:
space:
mode:
authorMichael Cahill <michael.cahill@mongodb.com>2016-12-09 13:19:07 +1100
committerMichael Cahill <michael.cahill@mongodb.com>2016-12-09 13:19:07 +1100
commit040e3d6f764c0fb626cb47fede54469f57d0c6e0 (patch)
tree5c36d94c709d7b8022d807ecf448f6a5bdcbcb93 /src/evict/evict_page.c
parent187707a5c18897fa0087b1abab695fb115de53b9 (diff)
parentca6eee06ffdacc8e191987e64b3791740dad21e1 (diff)
downloadmongo-040e3d6f764c0fb626cb47fede54469f57d0c6e0.tar.gz
Merge branch 'mongodb-3.4' into mongodb-3.2
Diffstat (limited to 'src/evict/evict_page.c')
-rw-r--r--src/evict/evict_page.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/evict/evict_page.c b/src/evict/evict_page.c
index 3d1557e027e..b15e1c1f26c 100644
--- a/src/evict/evict_page.c
+++ b/src/evict/evict_page.c
@@ -163,8 +163,19 @@ __wt_evict(WT_SESSION_IMPL *session, WT_REF *ref, bool closing)
*/
WT_ERR(__evict_page_clean_update(
session, ref, tree_dead || closing));
- else
- WT_ERR(__evict_page_dirty_update(session, ref, closing));
+ else {
+ /*
+ * The page is not being completely evicted: instead it is
+ * being split or replaced. In that case, don't increment the
+ * count of pages evicted, which we use to decide whether
+ * eviction is making progress. Repeatedly rewriting the same
+ * page isn't progress.
+ */
+ F_SET(session, WT_SESSION_IN_SPLIT);
+ ret = __evict_page_dirty_update(session, ref, closing);
+ F_CLR(session, WT_SESSION_IN_SPLIT);
+ WT_ERR(ret);
+ }
if (clean_page) {
WT_STAT_CONN_INCR(session, cache_eviction_clean);