-
Type: Bug
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
In __txn_fixup_prepared_update, we append the update fetched from the history store at the head of the update chain.
/* * There should be only one aborted prepared update in the list, append it after the new * update. */ if (cbt->ins != NULL) upd->next = cbt->ins->upd; else if (cbt->ref->page->modify != NULL && cbt->ref->page->modify->mod_row_update != NULL) upd->next = cbt->ref->page->modify->mod_row_update[cbt->slot]; WT_ASSERT(session, upd->next != NULL && upd->next->txnid == WT_TXN_ABORTED);
We may race with other sessions modifying the same key because the prepared update is now aborted.
Therefore, we should append the update fetched from the history store to the end of the aborted prepared update