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


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/replication/ContainerImporter.java:
##########
@@ -121,6 +125,11 @@ public void importContainer(long containerID, Path 
tarFilePath,
       }
       ContainerUtils.verifyContainerFileChecksum(containerData, conf);
       containerData.setVolume(targetVolume);
+      // Preserve the replica's recorded type, which can differ from a 
relabelled volume's type.
+      // Initialise missing legacy metadata from the destination volume; 
reports also expose the volume type separately.
+      if (containerData.getStorageType() == null) {

Review Comment:
   Thanks for raising this. The intention was to initialise the newly imported 
replica’s metadata, rather than backfill existing containers during upgrade.
   
   However, this assignment is not required for choosing the destination 
volume. For example, an SSD copy request can select an SSD volume while 
preserving the legacy `storageType = null;` the report separately exposes 
`volumeStorageType = SSD.`
   
   I think we can preserve the legacy null value here and continuing to 
preserve any known recorded type. This would refine the initialisation behavior 
discussed in the earlier thread.



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