From 8b40b2f8051dd88044d1437d2fe483c5c92e72b5 Mon Sep 17 00:00:00 2001 From: Michael Cahill Date: Mon, 29 Aug 2016 22:21:44 +1000 Subject: WT-2869 Fix a performance regression on secondaries. (#2991) Don't try to repeatedly evict pages if the eviction state hasn't moved forwards. --- src/btree/bt_read.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/btree/bt_read.c') diff --git a/src/btree/bt_read.c b/src/btree/bt_read.c index fd9c371f8c3..b096fd432e9 100644 --- a/src/btree/bt_read.c +++ b/src/btree/bt_read.c @@ -327,6 +327,13 @@ __evict_force_check(WT_SESSION_IMPL *session, WT_REF *ref) if (__wt_hazard_count(session, page) > 1) return (false); + /* + * If we have already tried and the transaction state has not moved on, + * eviction is highly likely to fail. + */ + if (page->modify->last_oldest_id == __wt_txn_oldest_id(session)) + return (false); + if (page->memory_footprint < btree->maxmempage) return (__wt_leaf_page_can_split(session, page)); -- cgit v1.2.1