ChenSammi commented on code in PR #11677:
URL: https://github.com/apache/ozone/pull/11677#discussion_r4346030646


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/KeyValueHandler.java:
##########
@@ -1441,6 +1441,9 @@ public Container importContainer(ContainerData 
targetTempContainerData) throws I
     KeyValueContainer container = createNewContainer(targetTempContainerData);
     HddsVolume targetVolume = targetTempContainerData.getVolume();
     populateContainerPathFields(container, targetVolume);
+    // The container file on the target volume is in RECOVERING state at this 
point, as in a replication import.
+    // The new container object is OPEN, and parsing it as OPEN would not load 
its data checksum and empty flag.
+    container.getContainerData().setState(RECOVERING);

Review Comment:
   Let's change the comments to 
   
   ```
   // createNewContainer() builds the new data as OPEN state. Set it as 
RECOVERING, as a
   // replication import does, so the data checksum and empty flag are checked 
and loaded. 
   // In the meanwhile, the container file on disk is of RECOVERING state too 
at this point. 
   ```



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