aryangupta1998 commented on code in PR #8550:
URL: https://github.com/apache/ozone/pull/8550#discussion_r2197692298


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/replication/ContainerImporter.java:
##########
@@ -116,13 +116,16 @@ public void importContainer(long containerID, Path 
tarFilePath,
       }
       ContainerUtils.verifyContainerFileChecksum(containerData, conf);
       containerData.setVolume(targetVolume);
+      // lastDataScanTime should be cleared for an imported container
+      containerData.setDataScanTimestamp(null);
 
       try (InputStream input = Files.newInputStream(tarFilePath)) {
         Container container = controller.importContainer(
             containerData, input, packer);
-        // After container import is successful, increase used space for the 
volume
+        // After container import is successful, increase used space for the 
volume and schedule an OnDemand scan for it
         
targetVolume.incrementUsedSpace(container.getContainerData().getBytesUsed());
         containerSet.addContainerByOverwriteMissingContainer(container);
+        containerSet.scanContainer(containerID);

Review Comment:
   ```suggestion
           containerSet.scanContainer(containerID);
           if (LOG.isDebugEnabled()) {
             LOG.debug("Scheduled OnDemand scan for imported container {}", 
containerID);
           }
   ```
   You could add a debug log to indicate that the container was scheduled for 
scanning. While not strictly necessary, it might be helpful for debugging — I 
didn't find any existing log messages related to container scans.



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