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

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

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

      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@mongodb.com Luke Pearson
            Reporter:
            luke.pearson@mongodb.com Luke Pearson
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: