When investigating WT-13353, I tried to use the wt_verify.py with the dump_pages option and it failed with:
Traceback (most recent call last): File "wt_verify/wt_verify.py", line 635, in <module> main() File "wt_verify/wt_verify.py", line 599, in main parsed_data = parse_dump_pages() ^^^^^^^^^^^^^^^^^^ File "wt_verify/wt_verify.py", line 249, in parse_dump_pages line = parse_node(f, line, output, chkpt_info, root_addr, is_root_node) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "wt_verify/wt_verify.py", line 136, in parse_node node.update(parse_metadata(line)) # remove metadata symbol ^^^^^^^^^^^^^^^^^^^^ File "wt_verify/wt_verify.py", line 114, in parse_metadata if value[0] == "[" and value[-1] == "]": ~~~~~^^^
In parse_metadata, we do:
[key, value] = x.split(": ", 1) if value[0] == "[" and value[-1] == "]":
However, it is possible to have a field with no value, i.e. rec_state in the example below:
> disk_img: 0x117ae0800 | dsk_mem_size: 28282 | write_gen: 338 | entries: 27 | state: clean | flags: [keys-built, disk-alloc] | rec_state: | page_state: 0 | page_mem_size: 29042