ArafatKhan2198 commented on code in PR #8591:
URL: https://github.com/apache/ozone/pull/8591#discussion_r2209458924


##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/OMDBInsightEndpoint.java:
##########
@@ -627,6 +627,29 @@ private void getPendingForDeletionDirInfo(
     }
   }
 
+  private void calculateTotalPendingDeletedDirSizes(Map<String, Long> 
dirSummary) {
+    long totalUnreplicatedSize = 0L;
+    long totalReplicatedSize = 0L;
+
+    Table<String, OmKeyInfo> deletedDirTable = 
omMetadataManager.getDeletedDirTable();
+    try (TableIterator<String, ? extends Table.KeyValue<String, OmKeyInfo>> 
iterator = deletedDirTable.iterator()) {
+      while (iterator.hasNext()) {
+        Table.KeyValue<String, OmKeyInfo> kv = iterator.next();
+        OmKeyInfo omKeyInfo = kv.getValue();
+        if (omKeyInfo != null) {

Review Comment:
   Thanks for working on this @tanvipenumudy 
   Currently, we iterate through the `DeletedDirectoryTable`, calculate the 
size of each deleted directory, and then find the sum total size. The issue 
arises when both the parent and child entries are encountered in the 
DeletedDirectoryTable, resulting in the same size being calculated twice.
   
   Are we going to consider this scenario?
   Or is this scenario even possible?



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