HDDS-11093. Fix intermittent failure in TestContainerBalancerDatanodeNodeLimit#testMetrics#10659
Merged
Merged
Conversation
…NodeLimit#testMetrics
adoroszlai
approved these changes
Jul 4, 2026
adoroszlai
left a comment
Contributor
There was a problem hiding this comment.
Thanks @chihsuan for the patch.
errose28
added a commit
to errose28/ozone
that referenced
this pull request
Jul 7, 2026
* master: (519 commits) HDDS-14544. OM DB Insights: Duplicate API calls triggered when changing limit selector (apache#10677). HDDS-15587. [Recon] Show 0 for offline DN pending deletion instead of -1 (apache#10585). HDDS-15521. StreamBlockInputStream fails with TimeoutIOException without retry or failover. (apache#10479) HDDS-15170. Add mock-based unit tests for DataStream write path (apache#10230) HDDS-15552. Ratis events should not be published as metrics (apache#10523) HDDS-15746. Bump kerby to 2.1.2 (apache#10666) HDDS-15579. Replace SimpleSpanProcessor with BatchSpanProcessor (apache#10569) HDDS-15747. Address review comments for HDDS-15083 (apache#10669) HDDS-15732. Some ozone commands ignore OZONE_MODULE_ACCESS_ARGS (apache#10655) HDDS-15605. Fix flaky testContainerExclusionWithClosedContainerException (apache#10621) HDDS-11855. Fix flaky TestContainerBalancerDatanodeNodeLimit#checkIterationResultException (apache#10667) HDDS-15741. Bump awssdk to 2.46.17 (apache#10661) HDDS-10307. Speed up TestOzoneManagerHAWithStoppedNodes (apache#10658) HDDS-15651. Test case for DiskBalancer when markContainerForDelete fails (apache#10593) HDDS-15742. Bump nimbus-jose-jwt to 10.9.1 (apache#10662) HDDS-15719. Add check for allowed action usage in workflows (apache#10641) HDDS-15744. Bump javassist to 3.32.0-GA (apache#10665) HDDS-15737. Fix intermittent failure in balancerShouldOnlySelectConfiguredIncludeContainers (apache#10660) HDDS-15743. Bump gson to 2.14.0 (apache#10664) HDDS-11093. Fix intermittent failure in TestContainerBalancerDatanodeNodeLimit#testMetrics (apache#10659) ... Conflicts: hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/ozoneimpl/ContainerScanHelper.java
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?
testMetricsintermittently fails withExpecting actual: 0L to be greater than: 0LatassertThat(metrics.getDataSizeMovedGB()).isGreaterThan(0), always on the 4-node cluster parameter. The test mocks the first move to fail and the rest to succeed. Since HDDS-10699 parameterized the test over cluster sizes 4-30, a small cluster's random layout can allow only a single schedulable move; that move is the mocked failure, so no move completes and the metric is legitimately 0.Replace the assertion with an invariant that holds for any layout:
dataSizeMovedGB >= numContainerMovesCompleted. Every test container is a whole number of GB, so each completed move adds at least 1 GB, and a regression where the metric stops accumulating still fails the assertion whenever any move completes. Also removes the@Flaky("HDDS-11093")annotation.What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-11093
How was this patch tested?
testMetrics10x10 = 100 runs, all green: https://github.com/chihsuan/ozone/actions/runs/28692288330testMetricsfailed 0 times; the only failures are unrelated flaky siblings HDDS-11855 and HDDS-15737: https://github.com/chihsuan/ozone/actions/runs/28691674922