summaryrefslogtreecommitdiff
path: root/src/evict/evict_page.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/evict/evict_page.c')
-rw-r--r--src/evict/evict_page.c39
1 files changed, 24 insertions, 15 deletions
diff --git a/src/evict/evict_page.c b/src/evict/evict_page.c
index fe08916b24c..9fb6c5e396a 100644
--- a/src/evict/evict_page.c
+++ b/src/evict/evict_page.c
@@ -314,23 +314,32 @@ __evict_review(
}
/* Check if the page can be evicted. */
- if (!exclusive && !__wt_page_can_evict(session, page, 0))
- return (EBUSY);
-
- /*
- * Check for an append-only workload needing an in-memory split.
- *
- * We can't do this earlier because in-memory splits require exclusive
- * access, and we can't split if a checkpoint is in progress because
- * the checkpoint could be walking the parent page.
- *
- * If an in-memory split completes, the page stays in memory and the
- * tree is left in the desired state: avoid the usual cleanup.
- */
if (!exclusive) {
- WT_RET(__wt_split_insert(session, ref, inmem_splitp));
+ /*
+ * Update the oldest ID to avoid wasted effort should it have
+ * fallen behind current.
+ */
+ if (__wt_page_is_modified(page))
+ __wt_txn_update_oldest(session, true);
+
+ if (!__wt_page_can_evict(session, page, 0, inmem_splitp))
+ return (EBUSY);
+
+ /*
+ * Check for an append-only workload needing an in-memory
+ * split.
+ *
+ * We can't do this earlier because in-memory splits require
+ * exclusive access, and we can't split if a checkpoint is in
+ * progress because the checkpoint could be walking the parent
+ * page.
+ *
+ * If an in-memory split completes, the page stays in memory
+ * and the tree is left in the desired state: avoid the usual
+ * cleanup.
+ */
if (*inmem_splitp)
- return (0);
+ return (__wt_split_insert(session, ref, inmem_splitp));
}
/*