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

Adding WT_ERR_ASSERT and WT_RET_ASSERT macros

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

      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@mongodb.com Luke Pearson
            Reporter:
            vamsi.krishna@mongodb.com Vamsi Boyapati
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: