Skip to content

Commit

Permalink
Merge pull request #1924 from wiredtiger/snapshot-txn-cache-check
Browse files Browse the repository at this point in the history
Move eviction outside transactions.
  • Loading branch information
michaelcahill committed May 1, 2015
2 parents 0c9dc60 + 4d85241 commit 0e74e29
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/include/txn.i
Expand Up @@ -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);
}

Expand Down

0 comments on commit 0e74e29

Please sign in to comment.