priyeshkaratha opened a new pull request, #10714:
URL: https://github.com/apache/ozone/pull/10714

   
   ## 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
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to