From 5d61a71b5e73ceba6d066669949e8e6353b66c07 Mon Sep 17 00:00:00 2001 From: Michael Cahill Date: Thu, 30 Apr 2015 11:54:47 +1000 Subject: [PATCH 1/2] Move eviction outside transactions. refs WT-1912 --- src/include/txn.i | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/include/txn.i b/src/include/txn.i index 4141d829f1d..38e6d202dd9 100644 --- a/src/include/txn.i +++ b/src/include/txn.i @@ -222,6 +222,12 @@ __wt_txn_begin(WT_SESSION_IMPL *session, const char *cfg[]) if (txn->isolation == TXN_ISO_SNAPSHOT) { if (session->ncursors > 0) WT_RET(__wt_session_copy_values(session)); + + /* + * We're about to allocate a snapshot: if we need to block for + * eviction, it's better to do it beforehand. + */ + WT_RET(__wt_cache_full_check(session)); __wt_txn_refresh(session, 1); } From 4d852419e8027b5e731398777bf5e24c16f57eeb Mon Sep 17 00:00:00 2001 From: Michael Cahill Date: Thu, 30 Apr 2015 12:12:01 +1000 Subject: [PATCH 2/2] whitespace --- src/include/txn.i | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/include/txn.i b/src/include/txn.i index 38e6d202dd9..4df421517f3 100644 --- a/src/include/txn.i +++ b/src/include/txn.i @@ -223,10 +223,10 @@ __wt_txn_begin(WT_SESSION_IMPL *session, const char *cfg[]) if (session->ncursors > 0) WT_RET(__wt_session_copy_values(session)); - /* - * We're about to allocate a snapshot: if we need to block for - * eviction, it's better to do it beforehand. - */ + /* + * We're about to allocate a snapshot: if we need to block for + * eviction, it's better to do it beforehand. + */ WT_RET(__wt_cache_full_check(session)); __wt_txn_refresh(session, 1); }