Skip to content

Commit

Permalink
DAOS-15050 dtx: replace D_INFO with D_DEBUG for debug message
Browse files Browse the repository at this point in the history
To avoid noisy dtx related message when open/close the container.

Required-githooks: true

Signed-off-by: Fan Yong <[email protected]>
  • Loading branch information
Nasf-Fan committed Jan 22, 2024
1 parent be4402b commit f471280
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 14 deletions.
6 changes: 3 additions & 3 deletions src/dtx/dtx_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -1634,8 +1634,8 @@ dtx_reindex_ult(void *arg)
struct dss_module_info *dmi = dss_get_module_info();
int rc = 0;

D_INFO(DF_CONT": starting DTX reindex ULT on xstream %d, ver %u\n",
DP_CONT(NULL, cont->sc_uuid), dmi->dmi_tgt_id, dtx_cont2ver(cont));
D_DEBUG(DB_MD, DF_CONT": starting DTX reindex ULT on xstream %d, ver %u\n",
DP_CONT(NULL, cont->sc_uuid), dmi->dmi_tgt_id, dtx_cont2ver(cont));

while (!cont->sc_dtx_reindex_abort && !dss_xstream_exiting(dmi->dmi_xstream)) {
rc = vos_dtx_cmt_reindex(cont->sc_hdl);
Expand All @@ -1645,7 +1645,7 @@ dtx_reindex_ult(void *arg)
ABT_thread_yield();
}

D_CDEBUG(rc < 0, DLOG_ERR, DLOG_INFO,
D_CDEBUG(rc < 0, DLOG_ERR, DLOG_DBG,
DF_CONT": stopping DTX reindex ULT on stream %d, ver %u: rc = %d\n",
DP_CONT(NULL, cont->sc_uuid), dmi->dmi_tgt_id, dtx_cont2ver(cont), rc);

Expand Down
26 changes: 16 additions & 10 deletions src/dtx/dtx_resync.c
Original file line number Diff line number Diff line change
Expand Up @@ -606,8 +606,9 @@ dtx_resync(daos_handle_t po_hdl, uuid_t po_uuid, uuid_t co_uuid, uint32_t ver, b
return rc;
}

D_INFO("Enter DTX resync for "DF_UUID"/"DF_UUID" with version: %u\n",
DP_UUID(po_uuid), DP_UUID(co_uuid), ver);
if (block)
D_DEBUG(DB_MD, "Enter DTX resync for "DF_UUID"/"DF_UUID" with version: %u\n",
DP_UUID(po_uuid), DP_UUID(co_uuid), ver);

crt_group_rank(NULL, &myrank);

Expand All @@ -619,8 +620,8 @@ dtx_resync(daos_handle_t po_hdl, uuid_t po_uuid, uuid_t co_uuid, uint32_t ver, b

if (target->ta_comp.co_status == PO_COMP_ST_UP) {
dra.discard_version = target->ta_comp.co_in_ver;
D_INFO("DTX resync for "DF_UUID"/"DF_UUID" discard version: %u\n",
DP_UUID(po_uuid), DP_UUID(co_uuid), dra.discard_version);
D_DEBUG(DB_MD, "DTX resync for "DF_UUID"/"DF_UUID" discard version: %u\n",
DP_UUID(po_uuid), DP_UUID(co_uuid), dra.discard_version);
}

ABT_rwlock_unlock(pool->sp_lock);
Expand Down Expand Up @@ -675,8 +676,9 @@ dtx_resync(daos_handle_t po_hdl, uuid_t po_uuid, uuid_t co_uuid, uint32_t ver, b
}
}

D_INFO("Start DTX resync scan for "DF_UUID"/"DF_UUID" with version %u\n",
DP_UUID(po_uuid), DP_UUID(co_uuid), ver);
if (block)
D_DEBUG(DB_MD, "Start DTX resync scan for "DF_UUID"/"DF_UUID" with version %u\n",
DP_UUID(po_uuid), DP_UUID(co_uuid), ver);

rc = ds_cont_iter(po_hdl, co_uuid, dtx_iter_cb, &dra, VOS_ITER_DTX, 0);

Expand All @@ -690,8 +692,10 @@ dtx_resync(daos_handle_t po_hdl, uuid_t po_uuid, uuid_t co_uuid, uint32_t ver, b
if (rc >= 0)
rc = rc1;

D_INFO("Stop DTX resync scan for "DF_UUID"/"DF_UUID" with version %u: rc = %d\n",
DP_UUID(po_uuid), DP_UUID(co_uuid), ver, rc);
if (block)
D_DEBUG(DB_MD,
"Stop DTX resync scan for "DF_UUID"/"DF_UUID" with version %u: rc = %d\n",
DP_UUID(po_uuid), DP_UUID(co_uuid), ver, rc);

fail:
ABT_mutex_lock(cont->sc_mutex);
Expand All @@ -703,8 +707,10 @@ dtx_resync(daos_handle_t po_hdl, uuid_t po_uuid, uuid_t co_uuid, uint32_t ver, b
if (!dtx_cont_opened(cont))
stop_dtx_reindex_ult(cont);

D_INFO("Exit DTX resync for "DF_UUID"/"DF_UUID" with version: %u\n",
DP_UUID(po_uuid), DP_UUID(co_uuid), ver);
if (block)
D_DEBUG(DB_MD,
"Exit DTX resync for "DF_UUID"/"DF_UUID" with version %u, rc = %d\n",
DP_UUID(po_uuid), DP_UUID(co_uuid), ver, rc);

ds_cont_child_put(cont);
return rc > 0 ? 0 : rc;
Expand Down
2 changes: 1 addition & 1 deletion src/dtx/dtx_rpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1101,7 +1101,7 @@ dtx_refresh_internal(struct ds_cont_child *cont, int *check_count, d_list_t *che
if (rc1 != DTX_ST_COMMITTED && rc1 != DTX_ST_ABORTED &&
rc1 != -DER_NONEXIST) {
if (!for_io)
D_INFO("Hit some long-time DTX "DF_DTI", %d\n",
D_WARN("Hit some long-time DTX "DF_DTI", %d\n",
DP_DTI(&dsp->dsp_xid), rc1);
else if (rc == 0)
rc = -DER_INPROGRESS;
Expand Down

0 comments on commit f471280

Please sign in to comment.