summaryrefslogtreecommitdiff
path: root/src/third_party/wiredtiger/src/include/txn.i
diff options
context:
space:
mode:
authorRamon Fernandez <ramon@mongodb.com>2016-08-09 07:14:21 -0400
committerRamon Fernandez <ramon@mongodb.com>2016-08-09 07:15:11 -0400
commit8b4de09ae263c3d46a9a931bf6edf368d7649637 (patch)
tree9ca868dc8c8427650e359e87929b94de4cc4711e /src/third_party/wiredtiger/src/include/txn.i
parentd776c88e3bb046c80e89beead4c6eafeb0b9719a (diff)
downloadmongo-8b4de09ae263c3d46a9a931bf6edf368d7649637.tar.gz
Import wiredtiger-wiredtiger-2.8.0-594-g34182ad.tar.gz from wiredtiger branch mongodb-3.4
ref: a9e9696..34182ad for: 3.3.11 WT-2688 configure --enable-python doesn't check for availability of swig WT-2811 Reconciliation asserts that transaction time has gone backwards WT-2812 Error when reconfiguring cache targets
Diffstat (limited to 'src/third_party/wiredtiger/src/include/txn.i')
-rw-r--r--src/third_party/wiredtiger/src/include/txn.i23
1 files changed, 10 insertions, 13 deletions
diff --git a/src/third_party/wiredtiger/src/include/txn.i b/src/third_party/wiredtiger/src/include/txn.i
index 8f0f49d9676..ffd319fd5c1 100644
--- a/src/third_party/wiredtiger/src/include/txn.i
+++ b/src/third_party/wiredtiger/src/include/txn.i
@@ -113,16 +113,14 @@ __wt_txn_oldest_id(WT_SESSION_IMPL *session)
/*
* Take a local copy of these IDs in case they are updated while we are
- * checking visibility. Only the generation needs to be carefully
- * ordered: if a checkpoint is starting and the generation is bumped,
- * we take the minimum of the other two IDs, which is what we want.
+ * checking visibility. The read of the transaction ID pinned by a
+ * checkpoint needs to be carefully ordered: if a checkpoint is
+ * starting and we have to start checking the pinned ID, we take the
+ * minimum of it with the oldest ID, which is what we want.
*/
oldest_id = txn_global->oldest_id;
- if (btree == NULL)
- include_checkpoint_txn = false;
- else
- WT_ORDERED_READ(
- include_checkpoint_txn, btree->include_checkpoint_txn);
+ include_checkpoint_txn = btree == NULL || btree->include_checkpoint_txn;
+ WT_READ_BARRIER();
checkpoint_pinned = txn_global->checkpoint_pinned;
/*
@@ -131,13 +129,12 @@ __wt_txn_oldest_id(WT_SESSION_IMPL *session)
* if they are only required for the checkpoint and it has already
* seen them.
*
- * If there is no active checkpoint, this session is doing the
- * checkpoint, or this handle is up to date with the active checkpoint
- * then it's safe to ignore the checkpoint ID in the visibility check.
+ * If there is no active checkpoint or this handle is up to date with
+ * the active checkpoint then it's safe to ignore the checkpoint ID in
+ * the visibility check.
*/
if (!include_checkpoint_txn || checkpoint_pinned == WT_TXN_NONE ||
- WT_TXNID_LT(oldest_id, checkpoint_pinned) ||
- WT_SESSION_IS_CHECKPOINT(session))
+ WT_TXNID_LT(oldest_id, checkpoint_pinned))
return (oldest_id);
return (checkpoint_pinned);