ExportXMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • WT12.0.0, 9.1.0-rc0
    • Affects Version/s: None
    • Component/s: Compaction
    • None
    • Storage Engines - Persistence
    • 616.389
    • StorEng - Defined Pipeline
    • None

      __wt_block_compact_start() mutates two pieces of WT_BLOCK state before it can still fail. When it does fail, neither is rolled back, and no caller compensates. The file is then permanently unavailable for compaction and permanently stuck in first-fit allocation mode for the lifetime of the WT_BLOCK handle.

      Affected code:
      if (block->compact_session_id != WT_SESSION_ID_INVALID)
      WT_RET_MSG(session, EBUSY,
      "Compaction already happening on data handle %s by session %" PRIu32, block->name,
      session->id);

      /* Switch to first-fit allocation. */
      __wti_block_configure_first_fit(block, true);
      .....
      ....

      if (session == S2C(session)->background_compact.session)
           WT_ERR(__wt_background_compact_start(session));   ----- / can fail /

      return (0);

            Assignee:
            Albert Song
            Reporter:
            y yz (EXT)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: