errose28 commented on code in PR #8550:
URL: https://github.com/apache/ozone/pull/8550#discussion_r2198975855
##########
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:
Might be better to put this log in the `OnDemandContainerDataScanner`
itself? We should see it coincide with the info logs about the container being
imported.
--
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]