DAOS-19368 vos: callbacks' rcs should not produce iterator errors - #18764
DAOS-19368 vos: callbacks' rcs should not produce iterator errors#18764janekmi wants to merge 1 commit into
Conversation
Signed-off-by: Jan Michalski <jan-marian.michalski@hpe.com>
|
Ticket title is 'Aurora daos_user: Observed Error message in log "DER_KEY2BIG(-2012): 'Key is too large'" while doing rebuild' |
| /* Do not print error messages for errors produced by callbacks. */ | ||
| if (!cb_rc) { | ||
| VOS_TX_LOG_FAIL(rc, "abort iteration type:%d, " DF_RC "\n", type, DP_RC(rc)); | ||
| } |
There was a problem hiding this comment.
I think printing errors returned by callback is fine. The fundamental issue is that the callback shouldn't return error code when it isn't actually an error.
What if we fix the places in src/object/srv_enum.c that return -DER_KEY2BIG? Instead of returning an error code, they should return 1 and set a flag in ds_obj_enum_arg. Then ds_obj_enum_pack() can check that flag and return -DER_KEY2BIG to the caller.
There was a problem hiding this comment.
I very much like this idea. Error codes strictly reserved to internals. Callback can indicate either a failure or success but it has to pass the details on its own.
Here is a new draft: #18767
Steps for the author:
After all prior steps are complete: