Skip to content

HDDS-15221. Fix flaky testReconGetsSnapshotFromLeader in TestReconWithOzoneManagerHA#10270

Open
arunsarin85 wants to merge 1 commit into
apache:masterfrom
arunsarin85:HDDS-15221
Open

HDDS-15221. Fix flaky testReconGetsSnapshotFromLeader in TestReconWithOzoneManagerHA#10270
arunsarin85 wants to merge 1 commit into
apache:masterfrom
arunsarin85:HDDS-15221

Conversation

@arunsarin85
Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

Wait until Recon’s container key index reflects the written key (using TestReconOmMetaManagerUtils.waitUntilReconKeyCounts) after OM sync, resolve the container id from the elected OM leader via lookupKey, remove the @flaky marker.

Please describe your PR in detail:

The test failed when the container key table was still empty after waitForEventBufferEmpty, so the iterator never set reconKeyPrefix and the assertion saw null. The event buffer can drain before Recon finishes applying container key updates, which is already documented on waitUntilReconKeyCounts. The test now takes the container id from the current OM leader (not getOzoneManager(), which is only the first OM in the HA list), calls waitUntilReconKeyCounts for that container, then asserts the key prefix.

What is the link to the Apache JIRA

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

How was this patch tested?

Ran flaky-test check on master and HDDS-15221 branch [with fix]

Copy link
Copy Markdown
Contributor

@cchung100m cchung100m left a comment

Choose a reason for hiding this comment

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

LGTM, thanks to @arunsarin85 😄

@adoroszlai adoroszlai requested a review from devmadhuu May 17, 2026 07:11
Copy link
Copy Markdown
Contributor

@devmadhuu devmadhuu left a comment

Choose a reason for hiding this comment

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

Thanks @arunsarin85 for the patch. Can you paste the results of two flaky workflow runs minimum with each 100 times

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants