You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ratis.apache.org by "runzhiwang (Jira)" <ji...@apache.org> on 2020/12/31 08:16:00 UTC

[jira] [Updated] (RATIS-1277) Fix FileStore write failed because reply out of order

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

runzhiwang updated RATIS-1277:
------------------------------
    Summary: Fix FileStore write failed because reply out of order  (was: Fix FileStore write failed because out of order)

> 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
>         Attachments: screenshot-2.png, screenshot-3.png
>
>          Time Spent: 10m
>  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)