summaryrefslogtreecommitdiff
path: root/src/include/txn.h
diff options
context:
space:
mode:
authorMichael Cahill <michael.cahill@wiredtiger.com>2014-04-03 21:42:33 +1100
committerMichael Cahill <michael.cahill@wiredtiger.com>2014-04-03 21:42:33 +1100
commit4aad05cbad1bae95e73c9c50674ab00bd5373177 (patch)
tree164c124d2383ca8ad40523f7371d02416d17c1ed /src/include/txn.h
parent3c6b862ff46d29016df9d30f16b28f7cae64f929 (diff)
downloadmongo-4aad05cbad1bae95e73c9c50674ab00bd5373177.tar.gz
Make sure we always publish a required transaction ID before looking at page structures. Otherwise, they can be freed from underneath us when a page splits.
Diffstat (limited to 'src/include/txn.h')
-rw-r--r--src/include/txn.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/include/txn.h b/src/include/txn.h
index 17e2c0c632e..857fa3c0e7b 100644
--- a/src/include/txn.h
+++ b/src/include/txn.h
@@ -21,6 +21,8 @@
#define TXNID_LT(t1, t2) \
((t1) != (t2) && TXNID_LE(t1, t2))
+#define WT_SESSION_TXN_STATE(s) (&S2C(s)->txn_global.states[(s)->id])
+
struct __wt_txn_state {
volatile uint64_t id;
volatile uint64_t snap_min;