Adding WT_ERR_ASSERT and WT_RET_ASSERT macros

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Major - P3
    • 4.2.1, WT3.2.1, 4.3.1
    • Affects Version/s: None
    • Component/s: None
    • None
    • Storage Engines 2019-08-26
    • 3

      It is better to have a reason string to WT_ASSERT, similar to WT_ERR_MSG to improve diagnosability.

      Sometimes it is not very clear for the assertion reason.  

      one example is https://github.com/mongodb/mongo/blob/e9753b56fe3f7e5c3e783f31d3ed5fe7afb8f641/src/third_party/wiredtiger/src/txn/txn.c#L1083

      Instead of forcing every WT_ASSERT to accept a "reason", we can have a new construct WT_ASSERT_MSG which accepts assert condition and asserting reason.

            Assignee:
            Luke Pearson
            Reporter:
            Vamsi Boyapati
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: