Skip to content

HDDS-15737. Fix intermittent failure in balancerShouldOnlySelectConfiguredIncludeContainers#10660

Merged
adoroszlai merged 1 commit into
apache:masterfrom
chihsuan:HDDS-15737
Jul 4, 2026
Merged

HDDS-15737. Fix intermittent failure in balancerShouldOnlySelectConfiguredIncludeContainers#10660
adoroszlai merged 1 commit into
apache:masterfrom
chihsuan:HDDS-15737

Conversation

@chihsuan

@chihsuan chihsuan commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

balancerShouldOnlySelectConfiguredIncludeContainers intermittently fails with Expecting actual not to be empty at the getContainerToSourceMap() assertion. The test hardcodes include containers "1, 4, 5", but the mocked cluster layout is generated with ThreadLocalRandom (TestableCluster) and these containers originate on low-utilization datanodes, so occasionally none of them is eligible for a move and the map is legitimately empty. Same family as HDDS-11093 and HDDS-11855.

Derive the include list from the layout instead of hardcoding it: run the balancer once without restrictions, pick a container that was actually moved, and use it as the include list for the restricted run. A container proven movable from the identical initial state is selectable again, so the non-emptiness assertion holds by construction for any layout, and the test still verifies that only included containers are selected.

What is the link to the Apache JIRA

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

How was this patch tested?

@adoroszlai adoroszlai changed the title HDDS-15737. Fix intermittent failure in TestContainerBalancerDatanodeNodeLimit#balancerShouldOnlySelectConfiguredIncludeContainers HDDS-15737. Fix intermittent failure in balancerShouldOnlySelectConfiguredIncludeContainers Jul 4, 2026
@adoroszlai adoroszlai added the test label Jul 4, 2026

@adoroszlai adoroszlai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks @chihsuan for the patch.

BTW I have reassigned HDDS-11855 to you, but please feel free to unassign it if you do not want to work on it.

@adoroszlai adoroszlai merged commit 888077b into apache:master Jul 4, 2026
30 of 31 checks passed
@chihsuan

chihsuan commented Jul 4, 2026

Copy link
Copy Markdown
Contributor Author

BTW I have reassigned HDDS-11855 to you, but please feel free
to unassign it if you do not want to work on it.

Thanks for the review! Happy to take HDDS-11855 as well. I'll look into it next.

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants