YCSB wtperf - self.conversion_function(sum(vals) / len(vals)) - ZeroDivisionError: division by zer

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • WT12.0.0, 9.0.0-rc0
    • Affects Version/s: None
    • Component/s: Performance
    • None
    • Storage Engines - Foundations
    • 119.921
    • None
    • None

      When we merged WT-17514 (that was another hotfix) we introduced a new issue. 

      The root cause is in perf_stat_collection.py values = v is unconditional, so the last iteration of the loop always overwrites values, even with an empty list.

      Here's the exact scenario for read_ops and update_ops, which both have stat_files=['test.stat', 'workload.stat']:

      1. Iteration 1 (test.stat): stat is found _ v = [1234.0], values = None _ condition is False _ values = [1234.0] _
      2. Iteration 2 (workload.stat): file absent _ find_stat returns [] _ if v and values is False (because v is falsy) _ values = [] _ overwrites the good values with an empty list

      Then add_values([]) _ self.values = [] _ average([]) _ sum([]) / len([]) _ ZeroDivisionError.

            Assignee:
            Ivan Kochin
            Reporter:
            Ivan Kochin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: