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
    • Labels:
    • 5
    • Storage - Ra 2022-05-30

      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.

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