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

Add an error return macro that skips codes but doesn't clear them

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • WT10.0.0, 4.4.0-rc2, 4.7.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • 5
    • Storage Engines 2020-03-23, Storage Engines 2020-04-06, Storage - Tora 2020-04-20

      We have a lot of macros to manage error handling. One is WT_ERR_NOTFOUND_OK/WT_RET_NOTFOUND_OK (there are corollaries for other error returns as well). Those macros clear the value of ret that is being ignored - there are cases where follow on code would like to make a decision based on the error code. We could add new macros that don't clear the expected error.

       

      Example code:

      https://github.com/wiredtiger/wiredtiger/blame/develop/src/history/hs.c#L837

       

      If that code doesn't match the problem described any longer, look for ret = __wt_hs_cursor

            Assignee:
            keith.smith@mongodb.com Keith Smith
            Reporter:
            alexander.gorrod@mongodb.com Alexander Gorrod
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: