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/03 15:09:00 UTC

[jira] [Comment Edited] (RATIS-177) Raft Leader should not return LeaderNotReady Exception for old completed requests

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

Lokesh Jain edited comment on RATIS-177 at 1/3/18 3:08 PM:
-----------------------------------------------------------

    |   Why it requires (leaderState != null)?

I was doubtful about this one. I added it because it was inside the condition below and I thought leaderState should not be null while replying.
{code:java}
else if (leaderState == null || !leaderState.isReady()) 
{code}

    |   Should it check cacheEntry.isDone() instead of cacheEntry.isCompletedNormally()?

cacheEntry.isDone() can be true even if the request fails. The latter one makes sure the request has completed normally without failures.



was (Author: ljain):
    |   Why it requires (leaderState != null)?

I was doubtful about this one. I added it because it was inside the condition below and I thought leaderState should not be null while replying.
{code:java}
else if (leaderState == null || !leaderState.isReady()) 
{code}

    |   Should it check cacheEntry.isDone() instead of cacheEntry.isCompletedNormally()?
cacheEntry.isDone() can be true even if the request fails. The latter one makes sure the request has completed normally without failures.


> Raft Leader should not return LeaderNotReady Exception for old completed requests
> ---------------------------------------------------------------------------------
>
>                 Key: RATIS-177
>                 URL: https://issues.apache.org/jira/browse/RATIS-177
>             Project: Ratis
>          Issue Type: Bug
>            Reporter: Lokesh Jain
>            Assignee: Lokesh Jain
>         Attachments: RATIS-177.001.patch
>
>
> Currently Raft Leader returns LeaderNotReady Exception for all the requests coming to the server. We should return the reply in case the request has already been completed normally.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)