guohao-rosicky commented on code in PR #884:
URL: https://github.com/apache/ratis/pull/884#discussion_r1222373068


##########
ratis-netty/src/main/java/org/apache/ratis/netty/server/DataStreamManagement.java:
##########
@@ -96,6 +96,10 @@ CompletableFuture<Long> write(ByteBuf buf, 
Iterable<WriteOption> options,
           n -> streamFuture.thenCompose(stream -> writeToAsync(buf, options, 
stream, executor)
               .whenComplete((l, e) -> metrics.stop(context, e == null))));
     }
+
+    void cleanUp() {
+      streamFuture.thenAccept(DataStream::cleanUp);
+    }

Review Comment:
   hi, @szetszwo .
   
   Is it safer to delete files after the container is closed and then scan the 
data in the container in the background service?
   
   see:
   
https://github.com/apache/ozone/blob/master/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/ozoneimpl/BackgroundContainerDataScanner.java#L72
   



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

Reply via email to