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

Add stat when rec_state is 0 to fix wt_verify.py parsing failure

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • WT11.3.0, 8.1.0-rc0
    • Affects Version/s: None
    • Component/s: Tools
    • Storage Engines
    • 3
    • 2024-08-06 - Withholding Tax

      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
      

        1. wt_output_file.txt
          1.29 MB
          Etienne Petrel

            Assignee:
            zunyi.liu@mongodb.com Zunyi Liu
            Reporter:
            etienne.petrel@mongodb.com Etienne Petrel
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: