HDDS-16199. Log skipped unhealthy containers at INFO - #11041
Conversation
| replicationManager.getContainerReplicationHealth(container, replicas).getHealthState(); | ||
| if (state != ContainerHealthResult.HealthState.HEALTHY) { | ||
| LOG.debug("Excluding container {} with replicas {} as its health is {}.", container, replicas, state); | ||
| LOG.info("Excluding container {} with replicas {} as its health is {}.", container, replicas, state); |
There was a problem hiding this comment.
I'd rather dump list of excluded containers instead of spamming logs with these messages. Also I'd consider limiting amount of entries that are getting logged to 50 or less + number of entries in exclude list.
There was a problem hiding this comment.
Thanks. I think this makes sense. I initially followed the Jira suggestion and moved the existing log to INFO, but you're right that it could get noisy.
|
Thanks @yandrey321 for the review. |
|
This PR has been marked as stale due to 21 days of inactivity. Please comment or remove the stale label to keep it open. Otherwise, it will be automatically closed in 7 days. |
# Conflicts: # hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/balancer/ContainerBalancerSelectionCriteria.java
|
@yandrey321 Would you take another look when you have time? Thanks! |
What changes were proposed in this pull request?
Container Balancer excludes containers whose replication health is unsuitable for moving. The existing messages are logged at DEBUG, so they are not visible with the default INFO logging level.
This change promotes the exclusion messages to INFO for both the standard and relaxed container selection paths. It also adds unit coverage that sets the logger to INFO and verifies the message is emitted by both paths.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-16199
How was this patch tested?
mvn -pl :hdds-server-scm -am test -Dtest=TestContainerBalancerSelectionCriteria -Dsurefire.failIfNoSpecifiedTests=false -DskipShade -DskipRecon -DskipDocsCI: https://github.com/F64116045/ozone/actions/runs/32154722880CI: https://github.com/F64116045/ozone/actions/runs/34578979420