adoroszlai commented on a change in pull request #1551:
URL: https://github.com/apache/ozone/pull/1551#discussion_r532705494
##########
File path:
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/replication/SimpleContainerDownloader.java
##########
@@ -128,12 +130,20 @@ public SimpleContainerDownloader(ConfigurationSource conf,
DatanodeDetails datanode
) throws Exception {
CompletableFuture<Path> result;
- try (GrpcReplicationClient grpcReplicationClient =
+ GrpcReplicationClient grpcReplicationClient =
new GrpcReplicationClient(datanode.getIpAddress(),
datanode.getPort(Name.STANDALONE).getValue(),
- workingDirectory, securityConfig, caCert)) {
- result = grpcReplicationClient.download(containerId);
- }
+ workingDirectory, securityConfig, caCert);
+ result = grpcReplicationClient.download(containerId)
+ .thenApply(r -> {
+ try {
+ grpcReplicationClient.close();
Review comment:
So if replication was slow, the previous version may have closed the
client prematurely?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]