szetszwo commented on PR #1215:
URL: https://github.com/apache/ratis/pull/1215#issuecomment-2616588708

   It could throw IllegalStateException.  Then, the ref is retained but not 
released.
   ```
   java.lang.IllegalStateException: index0: expected == 2 but computed == 0
        at org.apache.ratis.util.Preconditions.assertTrue(Preconditions.java:77)
        at org.apache.ratis.util.Preconditions.assertSame(Preconditions.java:87)
        at 
org.apache.ratis.server.impl.ServerImplUtils$NavigableIndices.append(ServerImplUtils.java:145)
        at 
org.apache.ratis.server.impl.RaftServerImpl.appendLog(RaftServerImpl.java:1695)
        at 
org.apache.ratis.server.impl.RaftServerImpl.appendEntriesAsync(RaftServerImpl.java:1660)
        at 
org.apache.ratis.server.impl.RaftServerImpl.appendEntriesAsync(RaftServerImpl.java:1547)
        at 
org.apache.ratis.server.impl.RaftServerProxy.lambda$null$28(RaftServerProxy.java:656)
        at org.apache.ratis.util.JavaUtils.callAsUnchecked(JavaUtils.java:118)
        at 
org.apache.ratis.server.impl.RaftServerImpl.lambda$executeSubmitServerRequestAsync$10(RaftServerImpl.java:936)
        at 
java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1604)
        at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:750)
   ```
   
   There seems to have two async calls, appendEntries1 and then appendEntries2. 
 The failure happens when appendEntries2 runs faster than appendEntries1.


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