readonly open fails with WT_NOTFOUND when incomplete table metadata exists during recovery

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • WT12.0.0, 9.1.0-rc0
    • Affects Version/s: None
    • Component/s: Metadata
    • None
    • Environment:
      GCC 13, Ubuntu 24.04
    • Storage Engines - Transactions
    • 482.633
    • None
    • 1

      When a WiredTiger database is opened in read-only mode and the metadata contains an incomplete table entry (e.g., from an interrupted session.create that wrote the table key but not the colgroup or file entries), startup fails with WT_NOTFOUND. In __metadata_clean_incomplete_table (src/txn/txn_recover.c line 885) , after checking for missing colgroup or file metadata via WT_ERR_NOTFOUND_OK(..., true), ret retains WT_NOTFOUND; the read-only branch logs a warning and executes goto done, but done shares the same cleanup block as err and returns ret directly, propagating WT_NOTFOUND up through __recovery_file_scan to the caller, aborting the open, despite the code's clear intent to tolerate incomplete tables in read-only mode and succeed.

        1. after_fix_output.txt
          0.2 kB
        2. before_fix_output.txt
          1 kB

            Assignee:
            Unassigned
            Reporter:
            Tuna KARABACAK (EXT)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: