szetszwo commented on code in PR #884:
URL: https://github.com/apache/ratis/pull/884#discussion_r1222413293


##########
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:
   > Is it safer to delete files after the container is closed and then scan 
the data in the container in the background service?
   
   @guohao-rosicky , it is a good idea.  Then, we mostly need try-finally (the 
other changes are for null checks); see 
https://issues.apache.org/jira/secure/attachment/13058865/try-finally.patch 



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