devmadhuu commented on code in PR #5154:
URL: https://github.com/apache/ozone/pull/5154#discussion_r1285703237


##########
hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/datanodes/datanodes.tsx:
##########
@@ -339,7 +341,14 @@ export class Datanodes extends 
React.Component<Record<string, object>, IDatanode
       loading: true,
       selectedColumns: this._getSelectedColumns(prevState.selectedColumns)
     }));
-    axios.get('/api/v1/datanodes').then(response => {
+
+    if (typeof cancelToken != typeof undefined){
+      //Some existing request might be there so we will cancel that before 
sending new request
+      cancelToken.cancel("Cancelling old datanode request");

Review Comment:
   > This is handling cases, when say autoReload happens, it will call 
_loadData(), but the component is not unmounted.
   
   So is it possible to override _loadData() and call "componentWillUnmount" 
explicitly inside it ?



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