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

XMLWordPrintableJSON

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

      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
            Reporter:
            Alexander Gorrod
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: