priyeshkaratha commented on code in PR #10420:
URL: https://github.com/apache/ozone/pull/10420#discussion_r3367126738
##########
hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/v2/pages/capacity/capacity.tsx:
##########
@@ -192,24 +184,22 @@ const Capacity: React.FC<object> = () => {
}
};
- // Poll every 5s until status is FINISHED, then stop
+ // Poll DN pending deletion every 5s until status is FINISHED
React.useEffect(() => {
- if (dnPendingDeletes.data.status !== "FINISHED") {
- if (!autoReload.isPolling) {
- autoReload.startPolling(PENDING_POLL_INTERVAL);
- }
+ if (dnPendingDeletes.data.status === "FINISHED") {
return;
}
- if (autoReload.isPolling) {
- autoReload.stopPolling();
- }
- }, [
- dnPendingDeletes.data.status,
- autoReload.isPolling,
- autoReload.startPolling,
- autoReload.stopPolling
- ]);
+ dnPendingDeletes.refetch();
+
+ const intervalId = window.setInterval(() => {
+ dnPendingDeletes.refetch();
+ }, PENDING_POLL_INTERVAL);
Review Comment:
Yes, this makes sense. Updated PR with these changes.
--
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]