szetszwo commented on a change in pull request #568:
URL: https://github.com/apache/ratis/pull/568#discussion_r773128391
##########
File path:
ratis-client/src/main/java/org/apache/ratis/client/impl/DataStreamClientImpl.java
##########
@@ -105,12 +107,13 @@ private DataStreamOutputImpl(RaftClientRequest request) {
this.header = request;
final ByteBuffer buffer =
ClientProtoUtils.toRaftClientRequestProtoByteBuffer(header);
this.headerFuture = send(Type.STREAM_HEADER, buffer, buffer.remaining());
+ this.slidingWindow = new
SlidingWindow.Client<>(ClientInvocationId.valueOf(clientId,
header.getCallId()));
Review comment:
Oops, we need to initialize the slidingWindow before sending the header,
i.e.
```
this.header = request;
this.slidingWindow = new
SlidingWindow.Client<>(ClientInvocationId.valueOf(clientId,
header.getCallId()));
final ByteBuffer buffer =
ClientProtoUtils.toRaftClientRequestProtoByteBuffer(header);
this.headerFuture = send(Type.STREAM_HEADER, buffer,
buffer.remaining());
```
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]