-
Notifications
You must be signed in to change notification settings - Fork 308
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DAOS-15847 container: add a few debug log #15962
Conversation
add a few logs to facilitate debug. Signed-off-by: Xuezhao Liu <[email protected]>
Ticket title is 'refine rebuild's error handling' |
@@ -479,8 +479,9 @@ cont_iv_ent_fetch(struct ds_iv_entry *entry, struct ds_iv_key *key, | |||
rc = cont_iv_prop_ent_create(entry, key); | |||
if (rc == 0) | |||
goto again; | |||
D_ERROR("create cont prop iv entry failed " | |||
""DF_RC"\n", DP_RC(rc)); | |||
D_ERROR("cont " DF_UUID " create IV_CONT_PROP iv entry failed " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggest use DL_ERROR(rc, ...) here
also it may be helpful to log the container UUID in the other log calls in this function like D_DEBUG above on line 476 for IV_CONT_SNAP case and the D_DEBUG on line 546 at the end of the function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure, this PR included in #15994
@@ -2058,8 +2058,10 @@ cont_lookup(struct rdb_tx *tx, const struct cont_svc *svc, const uuid_t uuid, st | |||
d_iov_set(&tmp, NULL, 0); | |||
/* check if the container exists or not */ | |||
rc = rdb_tx_lookup(tx, &svc->cs_conts, &key, &tmp); | |||
if (rc != 0) | |||
if (rc != 0) { | |||
DL_ERROR(rc, "cont " DF_UUID ", rdb_tx_lookup failed.\n", DP_UUID(uuid)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know if adding an ERR message in this internal function is good - maybe it could cause a bunch of unwanted logging in certain cases? There are many callers, and it seems there are differences in the callers, whether they invoke DL_ERROR if this function returns rc != 0.
@@ -2126,6 +2128,7 @@ cont_lookup(struct rdb_tx *tx, const struct cont_svc *svc, const uuid_t uuid, st | |||
err_p: | |||
D_FREE(p); | |||
err: | |||
DL_ERROR(rc, "cont " DF_UUID ", lookup failed.\n", DP_UUID(uuid)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment as above. Also, if these errors are kept, probably don't need "cont " in the output since the function name already has that.
replaced by #15994 |
add a few logs to facilitate debug.
Before requesting gatekeeper:
Features:
(orTest-tag*
) commit pragma was used or there is a reason documented that there are no appropriate tags for this PR.Gatekeeper: