Skip to content

HDDS-16619. Intermittent failure in TestReconAsPassiveScm.testDatanodeRegistrationAndReports - #11341

Open
Russole wants to merge 3 commits into
apache:masterfrom
Russole:HDDS-16619
Open

Russole wants to merge 3 commits into
apache:masterfrom
Russole:HDDS-16619

Conversation

@Russole

@Russole Russole commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

  • Wait for Recon to catch up with SCM pipelines before checking the result.
  • Avoid failing when Recon is still syncing a newly created pipeline.

What is the link to the Apache JIRA

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

How was this patch tested?

CI PASS : https://github.com/Russole/ozone/actions/runs/36288823520
flaky test check : https://github.com/Russole/ozone/actions/runs/36305243887

@rich7420 rich7420 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.

@Russole thanks for the patch!

}
}
return true;
} catch (PipelineNotFoundException e) {

@rich7420 rich7420 Sep 29, 2026 •

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.

Could we fetch the SCM pipelines once per attempt and let LambdaTestUtils.await handle PipelineNotFoundException? It already retries exceptions and preserves the last one as the timeout cause. This would remove the try/catch and redundant null check while keeping the missing pipeline ID available when the test times out.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks, updated as suggested.

@echonesis echonesis 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 for the patch, @Russole ! I left a couple of non-blocking suggestions inline.

Comment on lines +96 to +100
if (scmPipelineManager.getPipelines().size() < 4) {
return false;
}
try {
assertNotNull(reconPipelineManager.getPipeline(p.getId()));
for (Pipeline pipeline : scmPipelineManager.getPipelines()) {

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.

Could we capture scmPipelineManager.getPipelines() once per retry and use that list for both the size check and iteration? Each call returns a separate snapshot, so this would keep the two checks consistent with the “complete SCM snapshot” comment.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks, updated to use one snapshot per retry.

@Russole
Russole requested review from echonesis and rich7420 October 1, 2026 13:01

@rich7420 rich7420 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.

LGTM

@echonesis echonesis 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 @Russole for the update.
LGTM +1

Comment on lines +100 to 102
for (Pipeline pipeline : scmPipelines) {
reconPipelineManager.getPipeline(pipeline.getId());
}

@peterxcli peterxcli Oct 2, 2026 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

this is no-op.

either keep old code with an additional wait for recon pipeline sync:

// TODO: add a wait for recon pipeline sync
scmPipelineManager.getPipelines().forEach(p -> {
  try {
    assertNotNull(reconPipelineManager.getPipeline(p.getId()));
  } catch (PipelineNotFoundException e) {
    fail();
  }

or if it's not easy yo wit for reconPipelineManager up-to-date, do this:

LambdaTestUtils.await(60000, 5000, () -> {
      List<Pipeline> scmPipelines = scmPipelineManager.getPipelines();
      if (scmPipelines.size() < 4) {
        return false;
      }
      for (Pipeline pipeline : scmPipelines) {
        Pipeline p = reconPipelineManager.getPipeline(pipeline.getId());
		if (p == null) return false;
      }

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks, updated as suggested.

@Russole
Russole requested a review from peterxcli October 2, 2026 13:35
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.

4 participants