This ticket refers to the direct WT_RET_SUB and WT_ERR_SUB 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 create a new macro called WT_RET_VERBOSE_MSG and WT_ERR_SUB macro and should have an example from the customer listed use cases show casing the return of a sub-level error code, last error code 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.
Furthermore, we must make sure that the next session API call would replace or clear the sub-level error code and error code. An example what the usage of new macro would look like:
WT_RET_SUB(session, EINVAL, WT_INVALID_EXAMPLE, "Example EINVAL");
Defintion of done
A new macro is created, with unit tests and pythons that showcase an example (from customer listed use case) of the API call.
- related to
-
WT-13946 Set sub-level error code and message with python tests for drop EBUSY workflows (conflict backup & conflict dhandle)
-
- Closed
-