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

Return DataStreamException to client.

Attach filesAttach ScreenshotVotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

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

    Description

      When primary or peer WritableByteChannel#write throw exception, we should return it to client.

      static long writeTo(ByteBuf buf, DataStream stream) {
          final WritableByteChannel channel = stream.getWritableByteChannel();
          long byteWritten = 0;
          for (ByteBuffer buffer : buf.nioBuffers()) {
            try {
              byteWritten += channel.write(buffer);
            } catch (Throwable t) {
              throw new CompletionException(t);
            }
          }
          return byteWritten;
        }
      

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          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 - 3h 10m
                3h 10m

                Slack

                  Issue deployment