You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ratis.apache.org by "duongkame (via GitHub)" <gi...@apache.org> on 2024/01/23 21:08:14 UTC

[PR] RATIS-2007. Zero-copy buffers are not released [ratis]

duongkame opened a new pull request, #1027:
URL: https://github.com/apache/ratis/pull/1027

   ## What changes were proposed in this pull request?
   
   When running tests as per #1023, some buffer leaks are discovered.
   
   1. The release in `whenComplete`....
   2. SlidingWindow
   3. LogEntry loading.... tbd 
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/RATIS-2007
   
   ## How was this patch tested?
   
   Tests.
   


-- 
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: issues-unsubscribe@ratis.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] RATIS-2007. Zero-copy buffers are not released [ratis]

Posted by "duongkame (via GitHub)" <gi...@apache.org>.
duongkame commented on PR #1027:
URL: https://github.com/apache/ratis/pull/1027#issuecomment-1907205419

   @szetszwo Please have a look.


-- 
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: issues-unsubscribe@ratis.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] RATIS-2007. Zero-copy buffers are not released [ratis]

Posted by "szetszwo (via GitHub)" <gi...@apache.org>.
szetszwo merged PR #1027:
URL: https://github.com/apache/ratis/pull/1027


-- 
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: issues-unsubscribe@ratis.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] RATIS-2007. Zero-copy buffers are not released [ratis]

Posted by "szetszwo (via GitHub)" <gi...@apache.org>.
szetszwo commented on code in PR #1027:
URL: https://github.com/apache/ratis/pull/1027#discussion_r1465738101


##########
ratis-server/src/main/java/org/apache/ratis/server/impl/RaftServerImpl.java:
##########
@@ -882,20 +882,24 @@ public CompletableFuture<RaftClientReply> submitClientRequestAsync(
     try {
       assertLifeCycleState(LifeCycle.States.RUNNING);
     } catch (ServerNotReadyException e) {
-      final RaftClientReply reply = newExceptionReply(request, e);
       requestRef.release();
+      final RaftClientReply reply = newExceptionReply(request, e);

Review Comment:
   The original order (`newExceptionReply` -> `release`) seems better since `request` is used in `newExceptionReply`.



-- 
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: issues-unsubscribe@ratis.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] RATIS-2007. Zero-copy buffers are not released [ratis]

Posted by "duongkame (via GitHub)" <gi...@apache.org>.
duongkame commented on code in PR #1027:
URL: https://github.com/apache/ratis/pull/1027#discussion_r1465876350


##########
ratis-server/src/main/java/org/apache/ratis/server/impl/RaftServerImpl.java:
##########
@@ -882,20 +882,24 @@ public CompletableFuture<RaftClientReply> submitClientRequestAsync(
     try {
       assertLifeCycleState(LifeCycle.States.RUNNING);
     } catch (ServerNotReadyException e) {
-      final RaftClientReply reply = newExceptionReply(request, e);
       requestRef.release();
+      final RaftClientReply reply = newExceptionReply(request, e);

Review Comment:
   Right, I made that change my mistake. 



-- 
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: issues-unsubscribe@ratis.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org