Hi,

The screenshot did not come through.  The mailing lists may not allow
attaching images.

Are you talking about the code below?

  public CompletableFuture<AppendEntriesReplyProto> appendEntriesAsync(
      ReferenceCountedObject<AppendEntriesRequestProto> requestRef) throws
IOException {
    final AppendEntriesRequestProto r = requestRef.retain();
    final RaftRpcRequestProto request = r.getServerRequest();
    final TermIndex previous = r.hasPreviousLog()?
TermIndex.valueOf(r.getPreviousLog()) : null;
    try {
      ...
    } catch(Exception t) {
      ...
    } finally {
      requestRef.release();
    }

Tsz-Wo

On Sat, Sep 28, 2024 at 7:53 AM ka yuu <[email protected]> wrote:

> Hi, ratis community!
>
> I found that this location seems to cause refCount leaks.
>
>
>    1. Successfully called requestRef.retain ()
>
>
>    2. The appendEntriesAsync thread was interrupted by raftServer before
>    entering the try-finally block
>
>
>
> [image: Screenshot 2024-09-28 at 22.44.55.png]
>
> If this happens, will it cause the unit test to fail?
>

Reply via email to