summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Cahill <michael.cahill@mongodb.com>2015-10-09 17:25:27 +1100
committerAlex Gorrod <alexander.gorrod@mongodb.com>2016-08-03 02:36:32 +0000
commita5c67bdec9d3e3eb9de529186cfaa0014d998871 (patch)
tree5b6a78e883b6483a7d5eee9f6c0157d094a9dc97
parent1607e9204c3be422adcb293cfdc64a567c5c9987 (diff)
downloadmongodb-3.0.13.tar.gz
WT-2139 At read-uncommitted isolation, keep the same ID pinned while cursors are positioned.mongodb-3.0.13
-rw-r--r--src/include/txn.i11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/include/txn.i b/src/include/txn.i
index d7d958e801e..4cf6653d988 100644
--- a/src/include/txn.i
+++ b/src/include/txn.i
@@ -457,13 +457,10 @@ __wt_txn_cursor_op(WT_SESSION_IMPL *session)
* further forward, so that once a read-uncommitted cursor is
* positioned on a value, it can't be freed.
*/
- if (txn->isolation == WT_ISO_READ_UNCOMMITTED &&
- !F_ISSET(txn, WT_TXN_HAS_ID) &&
- WT_TXNID_LT(txn_state->snap_min, txn_global->last_running))
- txn_state->snap_min = txn_global->last_running;
-
- if (txn->isolation != WT_ISO_READ_UNCOMMITTED &&
- !F_ISSET(txn, WT_TXN_HAS_SNAPSHOT))
+ if (txn->isolation == WT_ISO_READ_UNCOMMITTED) {
+ if (txn_state->snap_min == WT_TXN_NONE)
+ txn_state->snap_min = txn_global->last_running;
+ } else if (!F_ISSET(txn, WT_TXN_HAS_SNAPSHOT))
__wt_txn_get_snapshot(session);
}