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

Use wt_err instead of wt_errx for corruption messages

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: WT3.2.0, 4.1.11
    • Component/s: None
    • Labels:
    • Story Points:
      3
    • Sprint:
      Storage Engines 2019-04-22

      Description

      In log/log.c__wt_log_scan and btree/bt_handle.c:__wt_btree_tree_open on an error, we try to give the user a helpful message. Those messages use wt_errx. Both files only print those messages when an error has occurred, so ret is known to be non-zero and both have already called wt_err with the return value and printed an initial message.

      This can lead to some confusion in reading MongoDB logs and MongoDB does have different code paths based on whether or not the error value in the error handler is zero or non-zero. When reading the logs we see one message with an error number and then three messages with an error of 0. That can lead someone to believe the error was lost, overwritten or something.

      Both wt_errx and wt_err call the exact same lower function, just with 0 or the given error value respectively. Both WiredTiger functions noted should use wt_err instead and continue to provide same ret to those messages so that the error handling callback and the log messages that result continue to show the same error.

        Attachments

          Activity

            People

            Assignee:
            alex.cameron Alex Cameron (Inactive)
            Reporter:
            sue.loverso Susan LoVerso
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: