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 2018/01/05 06:45:00 UTC

[jira] [Updated] (RATIS-183) In gRPC, Follower should not wait for log sync to process next appendEntries

     [ https://issues.apache.org/jira/browse/RATIS-183?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tsz Wo Nicholas Sze updated RATIS-183:
--------------------------------------
    Description: 
Currently the followers in a Ratis ring append entries synchronously on raft log sync. This happens because of the following code. server.appendEntries(request) which further invokes raft log sync.

{code}
//RaftServerProtocolService.java
  @Override
  public StreamObserver<AppendEntriesRequestProto> appendEntries(
      StreamObserver<AppendEntriesReplyProto> responseObserver) {
    return new StreamObserver<AppendEntriesRequestProto>() {
      @Override
      public void onNext(AppendEntriesRequestProto request) {
        try {
          final AppendEntriesReplyProto reply = server.appendEntries(request);
          responseObserver.onNext(reply);
        } catch (Throwable e) {
    ...
  }
{code}

  was:
Currently the followers in a Ratis ring append entries synchronously on raft log sync. This happens because of the following code. server.appendEntries(request) which further invokes raft log sync.

{code}
  @Override
  public StreamObserver<AppendEntriesRequestProto> appendEntries(
      StreamObserver<AppendEntriesReplyProto> responseObserver) {
    return new StreamObserver<AppendEntriesRequestProto>() {
      @Override
      public void onNext(AppendEntriesRequestProto request) {
        try {
          final AppendEntriesReplyProto reply = server.appendEntries(request);
          responseObserver.onNext(reply);
        } catch (Throwable e) {
    ...
  }
{code}

        Summary: In gRPC, Follower should not wait for log sync to process next appendEntries  (was: Parallelize log sync in Follower)

> In gRPC, Follower should not wait for log sync to process next appendEntries
> ----------------------------------------------------------------------------
>
>                 Key: RATIS-183
>                 URL: https://issues.apache.org/jira/browse/RATIS-183
>             Project: Ratis
>          Issue Type: Bug
>            Reporter: Mukul Kumar Singh
>            Assignee: Mukul Kumar Singh
>
> Currently the followers in a Ratis ring append entries synchronously on raft log sync. This happens because of the following code. server.appendEntries(request) which further invokes raft log sync.
> {code}
> //RaftServerProtocolService.java
>   @Override
>   public StreamObserver<AppendEntriesRequestProto> appendEntries(
>       StreamObserver<AppendEntriesReplyProto> responseObserver) {
>     return new StreamObserver<AppendEntriesRequestProto>() {
>       @Override
>       public void onNext(AppendEntriesRequestProto request) {
>         try {
>           final AppendEntriesReplyProto reply = server.appendEntries(request);
>           responseObserver.onNext(reply);
>         } catch (Throwable e) {
>     ...
>   }
> {code}



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