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


##########
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:
   If "componentWillUnmount" will cancel the request on changing the view, then 
what is the possibility of older request still be there ?



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