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

Return DataStreamException to client.

    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

        1. screenshot-1.png
          193 kB
          runzhiwang
        2. image-2020-11-13-09-15-38-822.png
          170 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 - 3h 10m
                  3h 10m