Skip to content

HDDS-15782. [Recon] Poll DN pending-deletion scan to completion when Auto Refresh is off#10714

Draft
priyeshkaratha wants to merge 1 commit into
apache:masterfrom
priyeshkaratha:HDDS-15782
Draft

HDDS-15782. [Recon] Poll DN pending-deletion scan to completion when Auto Refresh is off#10714
priyeshkaratha wants to merge 1 commit into
apache:masterfrom
priyeshkaratha:HDDS-15782

Conversation

@priyeshkaratha

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

The Capacity page showed the datanode sections as loading based on the pending-deletion scan status. That status only changed to FINISHED through the auto-refresh polling loop.

The problem was that if Auto Refresh was turned off while a scan was still running, polling stopped completely. As a result, the scan status never updated to FINISHED on the page, even though it had completed on the backend, leaving the datanode sections stuck in a loading state.

This change separates scan completion polling from the Auto Refresh setting. While a scan is in progress, the page now continues polling every 5 seconds and refreshes until the scan reaches FINISHED, regardless of whether Auto Refresh is enabled. Once the scan is complete, the Auto Refresh toggle resumes controlling the normal periodic refresh behavior. A separate setInterval handles polling when Auto Refresh is off, and a ref ensures it always calls the latest refresh function instead of an outdated one.

A new Capacity test has also been added to verify this behavior. With Auto Refresh turned off, the test confirms that polling continues while the scan is in progress (IN_PROGRESS → IN_PROGRESS → FINISHED) and stops once the scan finishes.

What is the link to the Apache JIRA

HDDS-15782

How was this patch tested?

Tested manually and using unit test created by AI

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