[
https://issues.apache.org/jira/browse/RATIS-1277?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Tsz-wo Sze resolved RATIS-1277.
-------------------------------
Fix Version/s: 1.1.0
Resolution: Fixed
I have merged the pull request. Thanks, [~yjxxtd]!
> Fix FileStore write failed because reply out of order
> -----------------------------------------------------
>
> Key: RATIS-1277
> URL: https://issues.apache.org/jira/browse/RATIS-1277
> Project: Ratis
> Issue Type: Sub-task
> Reporter: runzhiwang
> Assignee: runzhiwang
> Priority: Major
> Fix For: 1.1.0
>
> Attachments: screenshot-2.png, screenshot-3.png
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> !screenshot-3.png!
> As the following image and code shows, the code check the byteWritten of
> STREAM_HEADER, i.e. 0, equals to 10000, of course failed.
> !screenshot-2.png!
> {code:java}
> static boolean
> checkSuccessRemoteWrite(List<CompletableFuture<DataStreamReply>>
> replyFutures, long bytesWritten) {
> for (CompletableFuture<DataStreamReply> replyFuture : replyFutures) {
> final DataStreamReply reply = replyFuture.join();
> if (!reply.isSuccess() || reply.getBytesWritten() != bytesWritten) {
> + System.err.println("succ:" + reply.isSuccess() + " reply written:"
> + reply.getBytesWritten() +
> + " expected:" + bytesWritten + " clientId:" + reply.getClientId()
> + ",type:" + reply.getType() + ",streamId" +
> + reply.getStreamId() + ",offset:" + reply.getStreamOffset() +
> ",datalength:" + reply.getDataLength());
> return false;
> }
> }
> return true;
> }
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)