Skip to content

Conversation

@xichen01
Copy link
Contributor

What changes were proposed in this pull request?

Improved logs for SCMDeletedBlockTransactionStatusManager.
SCMDeletedBlockTransactionStatusManager sometimes outputs some redundant WARN logs or unclear logs.

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-10029

How was this patch tested?

Existing Test

@SaketaChalamchala
Copy link
Contributor

@swamirishi can you please take a look?

break;
default:
LOG.error("Can not update to Unknown new Status: {}", newStatus);
LOG.error("Unable to update from unknown DN report status: {}", newStatus);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the patch @xichen01. Shouldn't the log here say Unable to update to <status> instead of Unable to update from <status>?
Even in the above log changes for updateStatus() it's not really clear if DN report status is the new status that the SCM command should be updated to. May I ask what was unclear in the old log messages?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has been updated.

if (updateTime != null &&
Duration.between(updateTime, now).toMillis() > timeoutMs) {
CmdStatusData state = removeScmCommand(dnId, scmCmdId);
LOG.warn("Remove Timeout SCM BlockDeletionCommand {} for DN {} " +
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the log message here could be updated to LOG.warn("SCM BlockDeletionCommand {} for DN {} was removed after {}ms without update", state, dnId, timeoutMs). Let me know what you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Copy link
Contributor

@adoroszlai adoroszlai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @xichen01 for working on this.

These messages include the same information with different prefix label. E.g. SCM command ID appears as:

  • scmCmdId {}
  • SCM Command: {}
  • SCM Command ID: {}
  • ScmCommandId {}

which makes it difficult to filter the log for this information.

Similar problem with datanode ID.

I suggest standardizing it.

Copy link
Contributor

@sumitagrawl sumitagrawl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@xichen01
Copy link
Contributor Author

Thanks @xichen01 for working on this.

These messages include the same information with different prefix label. E.g. SCM command ID appears as:

  • scmCmdId {}
  • SCM Command: {}
  • SCM Command ID: {}
  • ScmCommandId {}

which makes it difficult to filter the log for this information.

Similar problem with datanode ID.

I suggest standardizing it.

Standardized LOG format to SCM Command ID: {}.

@adoroszlai
Copy link
Contributor

@SaketaChalamchala would you like to take another look?

@adoroszlai adoroszlai merged commit 41ea9fb into apache:master Jan 30, 2024
@adoroszlai
Copy link
Contributor

Thanks @xichen01 for the patch, @SaketaChalamchala, @sumitagrawl for the review.

xichen01 added a commit to xichen01/ozone that referenced this pull request Jul 17, 2024
xichen01 added a commit to xichen01/ozone that referenced this pull request Jul 17, 2024
xichen01 added a commit to xichen01/ozone that referenced this pull request Jul 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants