-
Notifications
You must be signed in to change notification settings - Fork 592
HDDS-8010. Improve DN warning message when getBlock does not find the block #4350
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
Changes from all commits
ab78e1f
9928001
21fd4ec
2d7be68
9c124b7
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 | ||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -79,16 +79,18 @@ private ContainerUtils() { | |||||||||||||||||||||||||||||||||||||||||||||||||
| public static ContainerCommandResponseProto logAndReturnError( | ||||||||||||||||||||||||||||||||||||||||||||||||||
| Logger log, StorageContainerException ex, | ||||||||||||||||||||||||||||||||||||||||||||||||||
| ContainerCommandRequestProto request) { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| String logInfo = "Operation: {} , Trace ID: {} , Message: {} , " + | ||||||||||||||||||||||||||||||||||||||||||||||||||
| "Result: {} , StorageContainerException Occurred."; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| String logInfo = "Operation: {} , Trace ID: {} , Block ID: {} , " + | ||||||||||||||||||||||||||||||||||||||||||||||||||
| "Message: {} , Result: {} , StorageContainerException Occurred."; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| if (ex.getResult() == CLOSED_CONTAINER_IO || | ||||||||||||||||||||||||||||||||||||||||||||||||||
| ex.getResult() == CONTAINER_NOT_OPEN) { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| if (log.isDebugEnabled()) { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| log.debug(logInfo, request.getCmdType(), request.getTraceID(), | ||||||||||||||||||||||||||||||||||||||||||||||||||
| request.getGetBlock().getBlockID(), | ||||||||||||||||||||||||||||||||||||||||||||||||||
| ex.getMessage(), ex.getResult().getValueDescriptor().getName(), ex); | ||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| } else { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| log.info(logInfo, request.getCmdType(), request.getTraceID(), | ||||||||||||||||||||||||||||||||||||||||||||||||||
| log.warn(logInfo, request.getCmdType(), request.getTraceID(), | ||||||||||||||||||||||||||||||||||||||||||||||||||
| request.getGetBlock().getBlockID(), | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
Contributor
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.
Looking at HDDS-8010, I think the goal is to change the message in: Lines 353 to 364 in 4afa68e
Contributor
Author
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.
because the log was logged when StorageContainerException occurred
No,I haven't
Contributor
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. You can update message in getBlockByID while throwing StorageContainerException to print the blockID. Can you update the PR?
Contributor
Author
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.
okay,I will update the PR. |
||||||||||||||||||||||||||||||||||||||||||||||||||
| ex.getMessage(), ex.getResult().getValueDescriptor().getName(), ex); | ||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| return getContainerCommandResponse(request, ex.getResult(), ex.getMessage()) | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
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 think this should be still logged at DEBUG level if it is under the
isDebugEnabled()condition.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.
thanks for your comment
I commit new version that if it is under the condition still logged at DEBUG level.
if it's not under the condition logged at Warn level.