You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ratis.apache.org by "Lokesh Jain (JIRA)" <ji...@apache.org> on 2018/01/15 17:23:00 UTC

[jira] [Commented] (RATIS-160) Retry cache should handle leader change after log commit

    [ https://issues.apache.org/jira/browse/RATIS-160?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16326421#comment-16326421 ] 

Lokesh Jain commented on RATIS-160:
-----------------------------------

[~jingzhao], Can you please take a look at the v2 patch?

> Retry cache should handle leader change after log commit
> --------------------------------------------------------
>
>                 Key: RATIS-160
>                 URL: https://issues.apache.org/jira/browse/RATIS-160
>             Project: Ratis
>          Issue Type: Bug
>            Reporter: Lokesh Jain
>            Assignee: Lokesh Jain
>            Priority: Major
>         Attachments: RATIS-160.001.patch, RATIS-160.002.patch
>
>
> This jira is in relation to the below exception seen in the logs. 
> {code:java}
> java.lang.IllegalStateException: retry cache entry should be pending: client-89341C13-2136-4EF3-BD8A-73C2526B7703:1777:done
>         at org.apache.ratis.util.Preconditions.assertTrue(Preconditions.java:60)
>         at org.apache.ratis.server.impl.RetryCache.getOrCreateEntry(RetryCache.java:169)
>         at org.apache.ratis.server.impl.RaftServerImpl.replyPendingRequest(RaftServerImpl.java:915)
>         at org.apache.ratis.server.impl.RaftServerImpl.applyLogToStateMachine(RaftServerImpl.java:974)
>         at org.apache.ratis.server.impl.StateMachineUpdater.run(StateMachineUpdater.java:151)
>         at java.lang.Thread.run(Thread.java:748)
> Exception in thread "StateMachineUpdater-s3" org.apache.ratis.util.ExitUtils$ExitException: StateMachineUpdater-s3: the StateMachineUpdater hits Throwable
>         at org.apache.ratis.util.ExitUtils.terminate(ExitUtils.java:94)
>         at org.apache.ratis.server.impl.StateMachineUpdater.run(StateMachineUpdater.java:175)
>         at java.lang.Thread.run(Thread.java:748)
> Caused by: java.lang.IllegalStateException: retry cache entry should be pending: client-89341C13-2136-4EF3-BD8A-73C2526B7703:1777:done
>         at org.apache.ratis.util.Preconditions.assertTrue(Preconditions.java:60)
>         at org.apache.ratis.server.impl.RetryCache.getOrCreateEntry(RetryCache.java:169)
>         at org.apache.ratis.server.impl.RaftServerImpl.replyPendingRequest(RaftServerImpl.java:915)
>         at org.apache.ratis.server.impl.RaftServerImpl.applyLogToStateMachine(RaftServerImpl.java:974)
>         at org.apache.ratis.server.impl.StateMachineUpdater.run(StateMachineUpdater.java:151)
>         ... 1 more
> {code}
> This occurs when leader commits a log entry but is not able to send a reply to the client before leader is changed. When the new leader gets the request it sends the append entry request to the followers whose cache already has the  corresponding entry leading to the above exception.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)