wiredtiger/wiredtiger.github.com — Issue #45: salvage and verify need to cope with sector 0 and the configuration string
Author: wiredtiger
Created: 2012-01-31 15:28:16+00:00
State: open

Verify needs to verify sector 0 and the configuration string. This task is waiting on the schema layer changes to validate configuration strings, and changing the verify API so it's passed a file name, not a BTREE reference.

Salvage needs to handle a corrupted sector 0 and/or a corrupted configuration string. It's not an issue if the root or free-list addr/size pairs are corrupted, but salvage has to deal with the configuration string. Salvage should (optionally?) take a configuration string as an argument, or find a replacement configuration string somewhere else; if the configuration string itself is corrupted, salvage isn't going to be able to get the file back (assuming something like or a specialized comparison function, or Huffman encoding, which requires a frequency table in order to compare keys).

Alternatively, the Btree code could store a copy of the configuration string in the file somewhere, or a copy of the configuration string could be stored in the table-of-tables, or in a separate file (.conf?).

I'm leaning toward putting a copy in the table-of-tables, myself -- then the salvage code can request it from there, and compare it with what it finds in the file.