runzhiwang commented on a change in pull request #278:
URL: https://github.com/apache/incubator-ratis/pull/278#discussion_r523703609
##########
File path:
ratis-common/src/main/java/org/apache/ratis/datastream/impl/DataStreamReplyByteBuffer.java
##########
@@ -83,6 +85,15 @@ public Builder setDataStreamPacket(DataStreamPacket packet) {
.setStreamOffset(packet.getStreamOffset());
}
+ public Builder setDataStreamException(DataStreamException exception) {
+ return setSuccess(false)
+
.setBuffer(DataStreamProtoUtils.exception2proto(exception).toByteString().asReadOnlyByteBuffer());
+ }
+
+ public Builder setThrowable(Throwable t) {
Review comment:
@szetszwo Not sure whether should we wrap DataStreamException in
RaftClientReply, and wrap RaftClientReply in DataStreamReplyByteBuffer. Because
we wrap StateMachineException in RaftClientReply, if we do not wrap
DataStreamException in RaftClientReply, it maybe cause user confused and user
maybe hard to understand the reply.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]