HDDS-15782. [Recon] Poll DN pending-deletion scan to completion when Auto Refresh is off#10714
Draft
priyeshkaratha wants to merge 1 commit into
Draft
HDDS-15782. [Recon] Poll DN pending-deletion scan to completion when Auto Refresh is off#10714priyeshkaratha wants to merge 1 commit into
priyeshkaratha wants to merge 1 commit into
Conversation
… Auto Refresh is off
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
setIntervalhandles 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