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

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

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • WT11.0.0, 6.1.0-rc0
    • None
    • None
    • 5
    • Storage - Ra 2022-05-30

    Description

      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.

      Attachments

        Activity

          People

            luke.pearson@mongodb.com Luke Pearson
            luke.pearson@mongodb.com Luke Pearson
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: