summaryrefslogtreecommitdiff
path: root/src/reconcile/rec_track.c
diff options
context:
space:
mode:
authorMichael Cahill <michael.cahill@mongodb.com>2015-11-24 16:05:25 +1100
committerMichael Cahill <michael.cahill@mongodb.com>2015-11-24 16:05:25 +1100
commit0ba1737427565b679ea6a8dd43c4ca175dd3f613 (patch)
tree1985908af2639307f59a8a2b64a852709270cfff /src/reconcile/rec_track.c
parent2cf57a6fbfc220c704b5138bf3e71a439beedcaa (diff)
downloadmongo-0ba1737427565b679ea6a8dd43c4ca175dd3f613.tar.gz
WT-2237 Have threads publish unique transaction IDs so that updates always become visible immediately on commit.
Previously, WiredTiger avoided locking in the transaction subsystem by having threads race to allocate transaction IDs. Only one thread wins the race, but losing threads could temporarily leave a transaction ID published in the global state table. If the winning thread completed its transaction quickly enough, its changes may not become visible immediately to readers (until the losing threads have woken up and allocated a new ID). This change separates ID allocation from the notion of a shared "current" value. Every thread gets a unique transaction ID, and spins to update the current value.
Diffstat (limited to 'src/reconcile/rec_track.c')
-rw-r--r--src/reconcile/rec_track.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/reconcile/rec_track.c b/src/reconcile/rec_track.c
index 5d8870dc5ae..18ed5c6b551 100644
--- a/src/reconcile/rec_track.c
+++ b/src/reconcile/rec_track.c
@@ -820,7 +820,7 @@ __wt_ovfl_txnc_add(WT_SESSION_IMPL *session, WT_PAGE *page,
txnc->value_offset = WT_PTRDIFF32(p, txnc);
txnc->value_size = WT_STORE_SIZE(value_size);
memcpy(p, value, value_size);
- txnc->current = __wt_txn_new_id(session);
+ txnc->current = __wt_txn_id_alloc(session, false);
__wt_cache_page_inmem_incr(
session, page, WT_OVFL_SIZE(txnc, WT_OVFL_TXNC));