swamirishi commented on code in PR #8887:
URL: https://github.com/apache/ozone/pull/8887#discussion_r2288605499


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/ozoneimpl/ContainerReader.java:
##########
@@ -235,6 +238,10 @@ public void verifyAndFixupContainerData(ContainerData 
containerData)
         return;
       }
 
+      if (!isMatchedLastLoadedECContainer(kvContainer, 
containerSet.getContainerMetadataStore())) {
+        return;

Review Comment:
   So are we saying we would not load the container if the replica index 
doesn't match. This would be wrong since we need to add the container even if 
the replica index doesn't match. As discussed offline we should add the 
container to in memory container set irrespective of whether the replica index 
matches or not and not update the container Set store on disk. I believe it 
would be good if the logic can be kept inside container set.



##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/ozoneimpl/ContainerReader.java:
##########
@@ -261,6 +268,30 @@ public void verifyAndFixupContainerData(ContainerData 
containerData)
     }
   }
 
+  private boolean isMatchedLastLoadedECContainer(

Review Comment:
   Can we move this logic to containerSet class instead of container reader. 
There is a function containerSet.addContainer(container, boolean overwrite) we 
could use that if we want to write to disk.



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