Fix rewrite delta causing instantiate updates twice and wrong dirty leaf count

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • WT12.0.0
    • Affects Version/s: None
    • Component/s: Btree
    • None
    • Storage Engines, Storage Engines - Transactions
    • SE Transactions - 2025-11-07
    • 3

      If we have rewrite delta using a reconciliation, the updates need to be instantiated should have been done inside the rewrite code. No need to do it again. Doing it again triggers the following assert:

                  /*
                   * FIXME- WT-15619 and WT-15618: This key must have been overwritten by a delta. Don't
                   * instantiate it.
                   */
                  if (first_upd == NULL) {
                      WT_ERR(__page_inmem_update(session, value, &unpack, &upd, &size));
                      total_size += size;
      
                      /* Search the page and apply the modification. */
                      WT_ERR(__wt_row_search(&cbt, key, true, ref, true, NULL));
                      WT_ERR(__wt_row_modify(&cbt, key, NULL, &upd, WT_UPDATE_INVALID, true, true));
                      upd = NULL;
                  } else
                      WT_ASSERT(session, F_ISSET(first_upd, WT_UPDATE_RESTORED_FROM_DELTA));
      

      In addition, the rewrite code will also accidentally decrease the dirty leaf page count at the end of the reconciliation.

            Assignee:
            Chenhao Qu
            Reporter:
            Chenhao Qu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: