sumitagrawl commented on code in PR #8797:
URL: https://github.com/apache/ozone/pull/8797#discussion_r2253275880


##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/tasks/NSSummaryTaskDbEventHandler.java:
##########
@@ -153,39 +163,82 @@ protected void handleDeleteKeyEvent(OmKeyInfo keyInfo,
       LOG.error("The namespace table is not correctly populated.");
       return;
     }
-    int[] fileBucket = nsSummary.getFileSizeBucket();
-
-    int binIndex = ReconUtils.getFileSizeBinIndex(keyInfo.getDataSize());
-
-    // decrement count, data size, and bucket count
-    // even if there's no direct key, we still keep the entry because
-    // we still need children dir IDs info
+    
+    // Decrement immediate parent's totals
     nsSummary.setNumOfFiles(nsSummary.getNumOfFiles() - 1);
     nsSummary.setSizeOfFiles(nsSummary.getSizeOfFiles() - 
keyInfo.getDataSize());
-    --fileBucket[binIndex];
-    nsSummary.setFileSizeBucket(fileBucket);
+
+    int binIndex = ReconUtils.getFileSizeBinIndex(keyInfo.getDataSize());
+    int[] fileSizeBucket = nsSummary.getFileSizeBucket();
+    fileSizeBucket[binIndex]--;
+    nsSummary.setFileSizeBucket(fileSizeBucket);
     nsSummaryMap.put(parentObjectId, nsSummary);
+
+    // Propagate the change upwards
+    int[] bucketDeltas = new int[ReconConstants.NUM_OF_FILE_SIZE_BINS];

Review Comment:
   we do not need propogate bucket distribution of file size. revert this 
change.



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