Creating a new API end macro to increment a statistic on error

XMLWordPrintableJSON

    • Type: New Feature
    • Resolution: Fixed
    • Priority: Major - P3
    • WT11.0.0, 6.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Storage - Ra 2022-05-30
    • 5

      Summary
      When wiredtiger returns an error code from the API we should consider incrementing a statistic which is specific to that error code. E.g. when wiredtiger returns EINVAL we increment wiredtiger_einval_returned. Obviously it would be difficult to do this for every error code so we'll also have a catch all increment.

      This should help with diagnosing certain bugs when there is FTDC but no core dump. An example is the error seen in WT-9130 where an insert failed but with no obvious cause.

      A discussion is needed to validate the usefulness of this feature, and the implementation isn't clear yet but I suspect we could add a hook into API_END_RET, it may also have a small performance impact as it would add N comparisons to the exit of the API depending on how many statistics we chose to create. Possibly we should only compile with HAVE_DIAGNOSTIC.

      • Testing
        Perf testing, functional python testing.

              Assignee:
              Luke Pearson
              Reporter:
              Luke Pearson
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: