There is a class of potential bugs in WiredTiger where the content of the metadata table may be in an invalid state if a hard-crash occurs at just the wrong time. A possible way to add testing of those cases (which is generally difficult) would be to create a test that:
- Does a schema operation (or set of schema operations).
- Has logging enabled.
- Do:
while (log_file_not_empty) { ./wt list -v echo "verify the content of the output" ./wt log_truncate <MAX_LSN - 1> # I made this up - AFAIK it doesn't currently exist. }
A set of interesting schema operations includes:
- Creating a simple table.
- Creating a table with column groups.
- Creating an LSM tree with more than one chunk.
- Doing a create then a rename operation.
- Doing a create then a drop operation.