dombizita commented on code in PR #5658:
URL: https://github.com/apache/ozone/pull/5658#discussion_r1469353863


##########
hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/insights/om/om.tsx:
##########
@@ -502,13 +512,14 @@ export class Om extends React.Component<Record<string, 
object>, IOmdbInsightsSta
         })
       }
       else {
-        if (this.state.prevKeyMismatch === 0 ){
+        if (this.state.prevKeyMismatch === 0 || this.state.pageDisplayCount 
=== 1){
           this.setState({
             prevClickable: false
           })
         }
-        if 
(mismatchPrevKeyList.includes(mismatchContainersResponse.data.lastKey) === 
false) {
-          mismatchPrevKeyList.push(mismatchContainersResponse.data.lastKey);
+        //Need to avoid rewrite in Map so avoiding duplication and wrong value 
for
+        if (!prevKeyListMap.has(this.state.pageDisplayCount)) {

Review Comment:
   As far as I understand in this map the keys are the number of the page (eg. 
1, 2, 3, ...) and the values are the previous page's last key (10, 20, ...), in 
case of the first page it will be null. This will store this for one tab (eg. 
container mismatch) and once we navigate to a new tab it will be cleared up.
   Into this map we are only putting key-value pairs, if previously the key 
wasn't there. 
   So default the limit is set to 10 and if we navigate through all the pages 
we will fill up this map with e.g. these values:
   ```
   1: empty
   2: 10
   3: 20
   4: 30
   5: 30
   ```
   After this if we set the limit to 20, we won't change anything in this map. 
So on the 3rd page will show the elements 21-40 and for the 4th page we will 
show 31-50, based on this logic. But that is incorrect, as we are showing the 
elements from 31-40 on both pages. Could you double check this? 



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