summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Bostic <keith.bostic@mongodb.com>2017-06-27 02:02:44 -0400
committerAlex Gorrod <alexander.gorrod@mongodb.com>2017-06-27 16:02:44 +1000
commitff10db881161bbd1bc23e40ac385ff0de18f68ff (patch)
tree3e3a15dde740ce0fd6532ad6d0b6d68a0c348f38
parent7127f4ad7484e6d03738bd78290f00d85cd4c24c (diff)
downloadmongo-ff10db881161bbd1bc23e40ac385ff0de18f68ff.tar.gz
WT-3393 Missing barrier when a WT_UPDATE structure is appended to list. (#3483)mongodb-3.5.10
When appending a new WT_UPDATE structure to a list, there should be a barrier to ensure the WT_UPDATE structure is fully initialized before it's appended to the list, it can be read by other threads as soon as it's linked.
-rw-r--r--src/reconcile/rec_write.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/reconcile/rec_write.c b/src/reconcile/rec_write.c
index a3b9edbaa84..a304dc54340 100644
--- a/src/reconcile/rec_write.c
+++ b/src/reconcile/rec_write.c
@@ -1507,7 +1507,7 @@ __rec_txn_read(WT_SESSION_IMPL *session, WT_RECONCILE *r,
append->txnid = WT_TXN_NONE;
for (upd = upd_list; upd->next != NULL; upd = upd->next)
;
- upd->next = append;
+ WT_PUBLISH(upd->next, append);
__wt_cache_page_inmem_incr(
session, page, WT_UPDATE_MEMSIZE(append));
}