- /* In a read txn, there is a data race here. Make sure our
- * last_pg/next_pg are up to date.
- */
- lastpg2 = env->me_metas[txn->mt_toggle]->mm_last_pg+1;
- if (lastpg2 != txn->mt_next_pgno) {
- txn->mt_next_pgno = lastpg2;
- /* When this situation occurs, the txnid will certainly also
- * be out of date. But as noted before, we don't care about having
- * up to date read txn IDs.
- */
- }
+
+ /* Moved to here to avoid a data race in read TXNs */
+ txn->mt_next_pgno = env->me_metas[txn->mt_toggle]->mm_last_pg+1;
+