Uploaded image for project: 'Ratis'
  1. Ratis
  2. RATIS-979 Ratis streaming
  3. RATIS-1277

Fix FileStore write failed because reply out of order

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.0.0
    • None
    • None

    Description

      As the following image and code shows, the code check the byteWritten of STREAM_HEADER, i.e. 0, equals to 10000, of course failed.

      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;
        }
      

      Attachments

        1. screenshot-3.png
          9 kB
          runzhiwang
        2. screenshot-2.png
          31 kB
          runzhiwang

        Issue Links

          Activity

            People

              yjxxtd runzhiwang
              yjxxtd runzhiwang
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m