Skip to content

HDDS-16877. Avoid duplicate initial requests on Recon Containers page - #11484

Open
andyhuangdev wants to merge 3 commits into
apache:masterfrom
andyhuangdev:HDDS-16877
Open

andyhuangdev wants to merge 3 commits into
apache:masterfrom
andyhuangdev:HDDS-16877

Conversation

@andyhuangdev

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

The Recon v2 Containers page sends duplicate initial requests for MISSING containers, the quasi-closed count, and cluster state. Both the page's initial fetches and the immediate auto-reload poll request the same data, adding unnecessary Recon queries, including the unhealthy containers summary aggregation.

This patch lets the first auto-reload poll perform the initial fetch when auto-reload is enabled. When disabled, a mount effect loads the data through the same refresh function. The independent cluster state initial fetch is disabled.

Manual refresh and periodic polling retain their existing behavior. The change affects data loading only, with no visual changes.

What is the link to the Apache JIRA

[HDDS-16877](https://issues.apache.org/jira/browse/HDDS-16877)

How was this patch tested?

Temporary regression tests reproduced duplicate requests for all three endpoints before the fix and passed afterward. They also covered initial loading with auto-reload disabled, periodic polling, manual refresh, and toggling auto-reload. These tests were removed from the final patch.

The existing Pipelines tests, Checkstyle, RAT, and git diff --check passed.

Let auto-reload perform the initial fetch when enabled, and fetch on mount when disabled. Disable the independent clusterState initial fetch.

Validation: Checkstyle, RAT, and git diff --check passed.
@sarvekshayr

Copy link
Copy Markdown
Contributor

@sravani-revuri please review this PR.

@chihsuan chihsuan 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 fixing this! @andyhuangdev #11417 added a clusterState workaround for this double fetch in Containers.test.tsx. Could we merge master, drop it, and add a test for the single initial load?

@chihsuan
chihsuan requested review from ArafatKhan2198 and spacemonkd and removed request for chihsuan October 12, 2026 10:15
Handle initial loading in useAutoReload when auto refresh is disabled.
Remove the Containers mount workaround and clusterState test stub.
Add regression coverage for single initial requests, Pipelines loading with auto refresh disabled, and polling lifecycle behavior.

Tests: 90 passed, 1 skipped; Recon UI build, checkstyle, and RAT passed.
@adoroszlai

Copy link
Copy Markdown
Contributor

Thanks @andyhuangdev for the patch. Please enable the build-branch workflow in your fork to get early CI feedback.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants