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

WiredTiger salvage=true should handle corrupt history store files

    • Type: Icon: Improvement Improvement
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None

      On an existing data directory, mongod --repair fails to start if the WiredTigerHS.wt file is corrupt:

      > rm /data/db/WiredTigerHS.wt
      > touch /data/db/WiredTigerHS.wt
      > mongod
      2020-06-30T11:59:28.050-04:00 E  STORAGE  [initandlisten] WiredTiger error{"error":-31802,"message":"[1593532768:49968][26695:0x7f552031b1c0], file:WiredTigerHS.wt, hs_access: __desc_read, 345: File WiredTigerHS.wt is smaller than allocation size; file size=0, alloc size=4096: WT_ERROR: non-specific WiredTiger error"}
      ...
      2020-06-30T11:59:28.985-04:00 W  STORAGE  [initandlisten] WiredTiger metadata corruption detected
      2020-06-30T11:59:28.985-04:00 W  STORAGE  [initandlisten] Attempting to salvage WiredTiger metadata
      2020-06-30T11:59:29.481-04:00 E  STORAGE  [initandlisten] WiredTiger error{"error":-31802,"message":"[1593532769:481861][26695:0x7f552031b1c0], file:WiredTigerHS.wt, hs_access: __desc_read, 345: File WiredTigerHS.wt is smaller than allocation size; file size=0, alloc size=4096: WT_ERROR: non-specific WiredTiger error"}
      2020-06-30T11:59:29.483-04:00 E  STORAGE  [initandlisten] WiredTiger error{"error":-31802,"message":"[1593532769:483436][26695:0x7f552031b1c0], file:WiredTigerHS.wt, WT_SESSION.salvage: __desc_read, 345: File WiredTigerHS.wt is smaller than allocation size; file size=0, alloc size=4096: WT_ERROR: non-specific WiredTiger error"}
      2020-06-30T11:59:29.510-04:00 F  STORAGE  [initandlisten] Failed to salvage WiredTiger metadata{"details":"-31809: WT_TRY_SALVAGE: database corruption detected"}
      2020-06-30T11:59:29.510-04:00 F  -        [initandlisten] Fatal assertion{"msgid":50947,"file":"src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp","line":862}
      

      WT salvage should be resilient to this scenario such that MongoDB can still start up.

            Assignee:
            backlog-server-storage-engines [DO NOT USE] Backlog - Storage Engines Team
            Reporter:
            louis.williams@mongodb.com Louis Williams
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: