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 Nicholas Sze (JIRA)" <ji...@apache.org> on 2017/03/10 22:47:04 UTC

[jira] [Commented] (RATIS-38) RaftClient should not retry on StateMachineException

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

Tsz Wo Nicholas Sze commented on RATIS-38:
------------------------------------------

Thank Jing for the update.

I think we should not include server side stack trace as a part of the exception message.  How about separating them?  We may serialize the stack trace in binary using ObjectOutputStream and ByteString as below.
{code}
  ByteString toByteString(StackTraceElement[] trace) {
    final ByteString.Output bytes = ByteString.newOutput());
    try(ObjectOutput out = new ObjectOutputStream(bytes)) {
      out.writeObject(trace);
    } catch (IOException e) {
      throw new RuntimeException(e);
    }
    return bytes.toByteString();
  }
{code}


> RaftClient should not retry on StateMachineException
> ----------------------------------------------------
>
>                 Key: RATIS-38
>                 URL: https://issues.apache.org/jira/browse/RATIS-38
>             Project: Ratis
>          Issue Type: Sub-task
>            Reporter: Jing Zhao
>            Assignee: Jing Zhao
>         Attachments: RATIS-38.000.patch, RATIS-38.001.patch, RATIS-38.002.patch
>
>
> RaftClient should only retry for exceptions happening during the raft replication. Exception coming from the StateMachine should be handled by the higher level client (the client that uses RaftClient for replication).



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)