summaryrefslogtreecommitdiff
path: root/src/include/txn.i
diff options
context:
space:
mode:
authorMichael Cahill <michael.cahill@wiredtiger.com>2015-01-14 09:09:33 +1100
committerMichael Cahill <michael.cahill@wiredtiger.com>2015-01-14 09:09:33 +1100
commitd56476de123cd7c5bfced2ee50072dd5156a7ad8 (patch)
tree849962ffefb1976e45168d9b3eeaad4f21fdc600 /src/include/txn.i
parenta02d92f9a546d6c326958cd24c2a0276e9bf72ee (diff)
parentcc5b59d0397b8535c2c5c528ca68c626617b4fd7 (diff)
downloadmongodb-2.8-rc5.tar.gz
Merge branch 'develop' into mongodb-2.8mongodb-2.8-rc5
Diffstat (limited to 'src/include/txn.i')
-rw-r--r--src/include/txn.i10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/include/txn.i b/src/include/txn.i
index 745a8f75a99..656181790ed 100644
--- a/src/include/txn.i
+++ b/src/include/txn.i
@@ -227,6 +227,16 @@ __wt_txn_id_check(WT_SESSION_IMPL *session)
txn = &session->txn;
WT_ASSERT(session, F_ISSET(txn, TXN_RUNNING));
+
+ /*
+ * If there is no transaction active in this thread and we haven't
+ * checked if the cache is full, do it now. If we have to block for
+ * eviction, this is the best time to do it.
+ */
+ if (F_ISSET(txn, TXN_RUNNING) &&
+ !F_ISSET(txn, TXN_HAS_ID) && !F_ISSET(txn, TXN_HAS_SNAPSHOT))
+ WT_RET(__wt_cache_full_check(session));
+
if (!F_ISSET(txn, TXN_HAS_ID)) {
conn = S2C(session);
txn_global = &conn->txn_global;