Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-6228

Append the update fetched from the history store to the end of the chain

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      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

            Assignee:
            backlog-server-storage-engines [DO NOT USE] Backlog - Storage Engines Team
            Reporter:
            chenhao.qu@mongodb.com Chenhao Qu
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: