You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "ChenSammi (via GitHub)" <gi...@apache.org> on 2026/10/22 08:16:44 UTC

Re: [PR] HDDS-16814. DiskBalancer should load datachecksum of container once moved by diskbalancer [ozone]

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 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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org