-
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2058,8 +2058,10 @@ | |
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 commentThe 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. |
||
D_GOTO(err, rc); | ||
} | ||
|
||
D_ALLOC_PTR(p); | ||
if (p == NULL) { | ||
|
@@ -2126,6 +2128,7 @@ | |
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 commentThe 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. |
||
return rc; | ||
} | ||
|
||
|
@@ -5934,17 +5937,22 @@ | |
|
||
D_ASSERT(dss_get_module_info()->dmi_xs_id == 0); | ||
rc = cont_svc_lookup_leader(pool_uuid, 0, &svc, NULL); | ||
if (rc != 0) | ||
if (rc != 0) { | ||
DL_ERROR(rc, "pool " DF_UUID " cont_svc_lookup_leader failed\n", | ||
DP_UUID(pool_uuid)); | ||
return rc; | ||
} | ||
|
||
rc = rdb_tx_begin(svc->cs_rsvc->s_db, svc->cs_rsvc->s_term, &tx); | ||
if (rc != 0) | ||
D_GOTO(out_put, rc); | ||
|
||
ABT_rwlock_rdlock(svc->cs_lock); | ||
rc = cont_lookup(&tx, svc, cont_uuid, &cont); | ||
if (rc != 0) | ||
if (rc != 0) { | ||
DL_ERROR(rc, DF_CONT " cont_lookup failed\n", DP_CONT(pool_uuid, cont_uuid)); | ||
D_GOTO(out_lock, rc); | ||
} | ||
|
||
rc = cont_prop_read(&tx, cont, DAOS_CO_QUERY_PROP_ALL, &prop, true); | ||
cont_put(cont); | ||
|
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