HDDS-10198. Improve Logging in AbstractFindTargetGreedy#6090
Merged
adoroszlai merged 1 commit intoapache:masterfrom Jan 25, 2024
Merged
HDDS-10198. Improve Logging in AbstractFindTargetGreedy#6090adoroszlai merged 1 commit intoapache:masterfrom
adoroszlai merged 1 commit intoapache:masterfrom
Conversation
Contributor
Author
|
@ashishkumar50 @Tejaskriya Can you please review? |
Contributor
|
LGTM |
Contributor
ashishkumar50
left a comment
There was a problem hiding this comment.
Looks good except a suggestion.
| //reorder | ||
| potentialTargets.add(nodeManager.getUsageInfo(target)); | ||
| } else { | ||
| logger.debug("Datanode {} removed from the list of potential targets. The total size of data entering it in " + |
Contributor
There was a problem hiding this comment.
You can add LOGGER.isDebugEnabled() before logging
Contributor
There was a problem hiding this comment.
There is no need to wrap it in an IF statement unless there is expensive logic to form the message. Inside the logger it has the isDebugEnabled check already.
Contributor
There was a problem hiding this comment.
Ya I see it's there inside as well so not required.
ashishkumar50
approved these changes
Jan 25, 2024
TaiJuWu
approved these changes
Jan 25, 2024
Contributor
|
Thanks @siddhantsangwan for the patch, @ashishkumar50, @sodonnel, @TaiJuWu, @Tejaskriya for the review. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
Simple DEBUG level logging improvement for Container Balancer.
This jira is to improve logging around a Datanode being removed from the collection of potential targets in ContainerBalancer. This can help us understand why a particular Datanode wasn't chosen as a target for container move when we think it's the optimal choice.
A Datanode may not be selected in multiple situations - it has already had enough size moved into it and has reached the limit, doesn't follow placement policy, already has the container's replica etc. I saw a situation in which a particular Datanode was the best choice when considering network distance and was also a potential target, but balancer did not choose it. I want to debug why this happened and more logging will help with this.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-10198
How was this patch tested?
Existing tests.