[jira] [Commented] (RATIS-77) "RaftServerProtocolService" and " GRpc.proto" inconsistent

2017-12-06 Thread Tsz Wo Nicholas Sze (JIRA)

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

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

Thanks for the explanation.  I missed that installSnapshot could have multiple 
calls.

The requestIndex in InstallSnapshotRequestProto should be removed since there 
is already a (newly added) seqNum in RaftRpcRequestProto.

> "RaftServerProtocolService" and " GRpc.proto" inconsistent
> --
>
> Key: RATIS-77
> URL: https://issues.apache.org/jira/browse/RATIS-77
> Project: Ratis
>  Issue Type: Bug
>Reporter: kaiyangzhang
>Assignee: garvit
>
> *Maybe a bug, look at the comments in the code and GRpc.proto*
> {code:title=GRpc.proto|borderStyle=solid}
>..
>..
>//Executes a client-streaming call , return only one response.
>rpc installSnapshot(stream ratis.common.InstallSnapshotRequestProto)
>   returns(ratis.common.InstallSnapshotReplyProto) {}
>...
>...
> {code}
> {code:title=RaftServerProtocolService.java |borderStyle=solid}
> 
> 
> @Override
>   public StreamObserver installSnapshot(
>   StreamObserver responseObserver) {
> return new StreamObserver() {
>   @Override
>   public void onNext(InstallSnapshotRequestProto request) {
> try {
>   //receive a client-streaming call, return a response stream
>   //code and GRpc.proto inconsistent
>   final InstallSnapshotReplyProto reply = 
> server.installSnapshot(request);
>   responseObserver.onNext(reply);
> } catch (Throwable e) {
>   LOG.info("{} got exception when handling installSnapshot {}: {}",
>   id, request.getServerRequest(), e);
>   responseObserver.onError(RaftGrpcUtil.wrapException(e));
> }
>   }
>..
>..
> {code}



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


[jira] [Commented] (RATIS-77) "RaftServerProtocolService" and " GRpc.proto" inconsistent

2017-11-08 Thread Jing Zhao (JIRA)

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

Jing Zhao commented on RATIS-77:


It's because if the incoming request is a stream, we expect response for each 
chunk so that we can detect failure earlier.

> "RaftServerProtocolService" and " GRpc.proto" inconsistent
> --
>
> Key: RATIS-77
> URL: https://issues.apache.org/jira/browse/RATIS-77
> Project: Ratis
>  Issue Type: Bug
>Reporter: kaiyangzhang
>Assignee: garvit
>
> *Maybe a bug, look at the comments in the code and GRpc.proto*
> {code:title=GRpc.proto|borderStyle=solid}
>..
>..
>//Executes a client-streaming call , return only one response.
>rpc installSnapshot(stream ratis.common.InstallSnapshotRequestProto)
>   returns(ratis.common.InstallSnapshotReplyProto) {}
>...
>...
> {code}
> {code:title=RaftServerProtocolService.java |borderStyle=solid}
> 
> 
> @Override
>   public StreamObserver installSnapshot(
>   StreamObserver responseObserver) {
> return new StreamObserver() {
>   @Override
>   public void onNext(InstallSnapshotRequestProto request) {
> try {
>   //receive a client-streaming call, return a response stream
>   //code and GRpc.proto inconsistent
>   final InstallSnapshotReplyProto reply = 
> server.installSnapshot(request);
>   responseObserver.onNext(reply);
> } catch (Throwable e) {
>   LOG.info("{} got exception when handling installSnapshot {}: {}",
>   id, request.getServerRequest(), e);
>   responseObserver.onError(RaftGrpcUtil.wrapException(e));
> }
>   }
>..
>..
> {code}



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


[jira] [Commented] (RATIS-77) "RaftServerProtocolService" and " GRpc.proto" inconsistent

2017-11-07 Thread Tsz Wo Nicholas Sze (JIRA)

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

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

I probably is missing something -- why it should return {{stream 
InstallSnapshotReplyProto}} but not just {{InstallSnapshotReplyProto}}?  I 
thought InstallSnapshotReplyProto is a small response which does not need a 
stream.

> "RaftServerProtocolService" and " GRpc.proto" inconsistent
> --
>
> Key: RATIS-77
> URL: https://issues.apache.org/jira/browse/RATIS-77
> Project: Ratis
>  Issue Type: Bug
>Reporter: kaiyangzhang
>Assignee: garvit
>
> *Maybe a bug, look at the comments in the code and GRpc.proto*
> {code:title=GRpc.proto|borderStyle=solid}
>..
>..
>//Executes a client-streaming call , return only one response.
>rpc installSnapshot(stream ratis.common.InstallSnapshotRequestProto)
>   returns(ratis.common.InstallSnapshotReplyProto) {}
>...
>...
> {code}
> {code:title=RaftServerProtocolService.java |borderStyle=solid}
> 
> 
> @Override
>   public StreamObserver installSnapshot(
>   StreamObserver responseObserver) {
> return new StreamObserver() {
>   @Override
>   public void onNext(InstallSnapshotRequestProto request) {
> try {
>   //receive a client-streaming call, return a response stream
>   //code and GRpc.proto inconsistent
>   final InstallSnapshotReplyProto reply = 
> server.installSnapshot(request);
>   responseObserver.onNext(reply);
> } catch (Throwable e) {
>   LOG.info("{} got exception when handling installSnapshot {}: {}",
>   id, request.getServerRequest(), e);
>   responseObserver.onError(RaftGrpcUtil.wrapException(e));
> }
>   }
>..
>..
> {code}



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


[jira] [Commented] (RATIS-77) "RaftServerProtocolService" and " GRpc.proto" inconsistent

2017-11-07 Thread Jing Zhao (JIRA)

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

Jing Zhao commented on RATIS-77:


I think the original comment is correct, and we should change the protobuf 
definition so that it returns a stream.

> "RaftServerProtocolService" and " GRpc.proto" inconsistent
> --
>
> Key: RATIS-77
> URL: https://issues.apache.org/jira/browse/RATIS-77
> Project: Ratis
>  Issue Type: Bug
>Reporter: kaiyangzhang
>Assignee: Jing Zhao
>
> *Maybe a bug, look at the comments in the code and GRpc.proto*
> {code:title=GRpc.proto|borderStyle=solid}
>..
>..
>//Executes a client-streaming call , return only one response.
>rpc installSnapshot(stream ratis.common.InstallSnapshotRequestProto)
>   returns(ratis.common.InstallSnapshotReplyProto) {}
>...
>...
> {code}
> {code:title=RaftServerProtocolService.java |borderStyle=solid}
> 
> 
> @Override
>   public StreamObserver installSnapshot(
>   StreamObserver responseObserver) {
> return new StreamObserver() {
>   @Override
>   public void onNext(InstallSnapshotRequestProto request) {
> try {
>   //receive a client-streaming call, return a response stream
>   //code and GRpc.proto inconsistent
>   final InstallSnapshotReplyProto reply = 
> server.installSnapshot(request);
>   responseObserver.onNext(reply);
> } catch (Throwable e) {
>   LOG.info("{} got exception when handling installSnapshot {}: {}",
>   id, request.getServerRequest(), e);
>   responseObserver.onError(RaftGrpcUtil.wrapException(e));
> }
>   }
>..
>..
> {code}



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


[jira] [Commented] (RATIS-77) "RaftServerProtocolService" and " GRpc.proto" inconsistent

2017-11-07 Thread Tsz Wo Nicholas Sze (JIRA)

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

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

> //Executes a client-streaming call , return only one response.

This comment is not in GRpc.proto anymore.

Is this still a problem?

> "RaftServerProtocolService" and " GRpc.proto" inconsistent
> --
>
> Key: RATIS-77
> URL: https://issues.apache.org/jira/browse/RATIS-77
> Project: Ratis
>  Issue Type: Bug
>Reporter: kaiyangzhang
>Assignee: Jing Zhao
>
> *Maybe a bug, look at the comments in the code and GRpc.proto*
> {code:title=GRpc.proto|borderStyle=solid}
>..
>..
>//Executes a client-streaming call , return only one response.
>rpc installSnapshot(stream ratis.common.InstallSnapshotRequestProto)
>   returns(ratis.common.InstallSnapshotReplyProto) {}
>...
>...
> {code}
> {code:title=RaftServerProtocolService.java |borderStyle=solid}
> 
> 
> @Override
>   public StreamObserver installSnapshot(
>   StreamObserver responseObserver) {
> return new StreamObserver() {
>   @Override
>   public void onNext(InstallSnapshotRequestProto request) {
> try {
>   //receive a client-streaming call, return a response stream
>   //code and GRpc.proto inconsistent
>   final InstallSnapshotReplyProto reply = 
> server.installSnapshot(request);
>   responseObserver.onNext(reply);
> } catch (Throwable e) {
>   LOG.info("{} got exception when handling installSnapshot {}: {}",
>   id, request.getServerRequest(), e);
>   responseObserver.onError(RaftGrpcUtil.wrapException(e));
> }
>   }
>..
>..
> {code}



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


[jira] [Commented] (RATIS-77) "RaftServerProtocolService" and " GRpc.proto" inconsistent

2017-04-21 Thread Jing Zhao (JIRA)

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

Jing Zhao commented on RATIS-77:


Thank you for reporting the issue, [~kaiyangzhang]! Yeah, looks like we should 
change the protobuf definition to make it consistent. Do you want to upload a 
patch to fix?

> "RaftServerProtocolService" and " GRpc.proto" inconsistent
> --
>
> Key: RATIS-77
> URL: https://issues.apache.org/jira/browse/RATIS-77
> Project: Ratis
>  Issue Type: Bug
>Reporter: kaiyangzhang
>Assignee: Jing Zhao
>
> *Maybe a bug, look at the comments in the code and GRpc.proto*
> {code:title=GRpc.proto|borderStyle=solid}
>..
>..
>//Executes a client-streaming call , return only one response.
>rpc installSnapshot(stream ratis.common.InstallSnapshotRequestProto)
>   returns(ratis.common.InstallSnapshotReplyProto) {}
>...
>...
> {code}
> {code:title=RaftServerProtocolService.java |borderStyle=solid}
> 
> 
> @Override
>   public StreamObserver installSnapshot(
>   StreamObserver responseObserver) {
> return new StreamObserver() {
>   @Override
>   public void onNext(InstallSnapshotRequestProto request) {
> try {
>   //receive a client-streaming call, return a response stream
>   //code and GRpc.proto inconsistent
>   final InstallSnapshotReplyProto reply = 
> server.installSnapshot(request);
>   responseObserver.onNext(reply);
> } catch (Throwable e) {
>   LOG.info("{} got exception when handling installSnapshot {}: {}",
>   id, request.getServerRequest(), e);
>   responseObserver.onError(RaftGrpcUtil.wrapException(e));
> }
>   }
>..
>..
> {code}



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