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

Capture message and error from WT_RET_MSG and WT_ERR_MSG

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • WT12.0.0, 8.1.0-rc0
    • Affects Version/s: None
    • Component/s: APIs
    • None
    • Storage Engines
    • 5
    • StorEng - 2025-01-21

      This ticket refers to the direct WT_RET_MSG and WT_ERR_MSG section within the technical design. After milestone 1, a basic API and structure should be created on the session structure. The work involved in this ticket is to update the WT_RET_MSG and WT_ERR_MSG macro to track the last error and error message that has occurred in the session API call. The behaviour of the error message in the API must adhere to these rules:

      * Error messages are optional, and will be returned with an empty string (“”) by default upon an error.
      * WiredTiger will own the memory lifetime of the string
      * The pointer to the string will be invalidated on the next session API call. Users should copy the string if they want to retain this information.
      * Any subsequent session API call will invalidate the pointer to the string.
      

      Defintion of done
      The new API works whenever a WT_RET_MSG/WT_ERR_MSG is returned from an API. A unit test and python test should be created to demonstrate this.

            Assignee:
            alex.pullen@mongodb.com Alex Pullen (Inactive)
            Reporter:
            jie.chen@mongodb.com Jie Chen
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: