You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ratis.apache.org by "Tsz-wo Sze (Jira)" <ji...@apache.org> on 2022/11/16 02:52:00 UTC

[jira] [Comment Edited] (RATIS-1744) NullPointerException causes RaftClient retry failure

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

Tsz-wo Sze edited comment on RATIS-1744 at 11/16/22 2:51 AM:
-------------------------------------------------------------

It probably is the case that the future, which was returned by StateMachine from applyTransaction(..) or some other method, was completed with the NPE.  GrpcClientProtocolService was able to send it back to the client but the client expected an IOException so that there was a ClassCastException.
{code}
//StateMachine
  CompletableFuture<Message> applyTransaction(TransactionContext trx);
{code}
Please see if you can reproduce it.  Otherwise, it is hard to debug.


was (Author: szetszwo):
It probably is the case that future, which was returned by StateMachine from applyTransaction(..) or some other method, was completed with the NPE.  GrpcClientProtocolService was able to send it back to the client but the client expect an IOException so that it has a ClassCastException.
{code}
//StateMachine
  CompletableFuture<Message> applyTransaction(TransactionContext trx);
{code}
Please see if you can reproduce it.  Otherwise, it is hard to debug.

> NullPointerException causes RaftClient retry failure
> ----------------------------------------------------
>
>                 Key: RATIS-1744
>                 URL: https://issues.apache.org/jira/browse/RATIS-1744
>             Project: Ratis
>          Issue Type: Bug
>    Affects Versions: 2.4.0
>            Reporter: Song Ziyang
>            Priority: Major
>         Attachments: error_stack.log
>
>
> We encountered a RaftRetryFailureException carrying a very long error stack. The root cause showed that RaftClientRequest.message was null. We first suspected that we passed a null message to RaftClientRequest. However, we then discovered that this NullPointerException happened during the 2rd retry attempt, not the 1st attempt. So the problem probably lies in Ratis. Full error stack is attached.  [~szetszwo] Could you please take a look at this? Thanks in advance!



--
This message was sent by Atlassian Jira
(v8.20.10#820010)