ChenSammi commented on code in PR #5543:
URL: https://github.com/apache/ozone/pull/5543#discussion_r1383487623
##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/replication/ContainerImporter.java:
##########
@@ -75,14 +81,32 @@ public ContainerImporter(ConfigurationSource conf,
ContainerSet containerSet,
public void importContainer(long containerID, Path tarFilePath,
HddsVolume hddsVolume, CopyContainerCompression compression)
throws IOException {
+ synchronized (this) {
+ if (importContainerProgress.contains(containerID)) {
Review Comment:
Need to move this check and importContainerProgress.contains(containerID)
check into the below try body, for once StorageContainerException is throw
out, tar file should be deleted.
And for importContainerProgress.contains(containerID) check, if exception
throws out, need to remove the containerID from the importContainerProgress if
it exists in the HashSet.
--
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]