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


##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/tasks/NSSummaryTaskDbEventHandler.java:
##########
@@ -155,7 +155,8 @@ protected void handlePutDirEvent(OmDirectoryInfo 
directoryInfo,
   protected void handleDeleteKeyEvent(OmKeyInfo keyInfo,
                                       Map<Long, NSSummary> nsSummaryMap)
       throws IOException {
-    long parentObjectId = keyInfo.getParentObjectID();
+    NSSummary currentNSSummary = nsSummaryMap.get(keyInfo.getObjectID());

Review Comment:
   Not very clear why we have taken parent Id from NSSummary object based. What 
was the issue in earlier code if we directly take parentObjectId from OmKeyInfo 
here ?



##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/tasks/NSSummaryTaskWithLegacy.java:
##########
@@ -210,7 +217,13 @@ private void processWithObjectStoreLayout(OmKeyInfo 
updatedKeyInfo,
                                             OMDBUpdateEvent.OMDBUpdateAction 
action,
                                             Map<Long, NSSummary> nsSummaryMap)
       throws IOException {
-    setParentBucketId(updatedKeyInfo);
+    try {
+      setParentBucketId(updatedKeyInfo);
+    } catch (IOException e) {
+      LOG.warn("Skipping NSSummary creation for key: {} due to missing parent 
bucket info. Exception: {}",

Review Comment:
   Same warn message we are logging in `setParentBucketId` method also. 
`processWithObjectStoreLayout` is the caller of `setParentBucketId`, can we log 
different message which can mention what that caller is doing.



##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/tasks/NSSummaryTaskWithLegacy.java:
##########
@@ -136,7 +136,15 @@ private void processWithFileSystemLayout(OmKeyInfo 
updatedKeyInfo,
                                            OMDBUpdateEvent.OMDBUpdateAction 
action,
                                            Map<Long, NSSummary> nsSummaryMap)
       throws IOException {
-    setKeyParentID(updatedKeyInfo);
+
+    try {
+      setKeyParentID(updatedKeyInfo);

Review Comment:
   Same warn message we are logging in `setKeyParentID` method also. 
`processWithFileSystemLayout` is the caller of `setKeyParentID`, can we log 
different message which can mention what that caller is doing.



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