[
https://issues.apache.org/jira/browse/RATIS-1150?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
runzhiwang updated RATIS-1150:
------------------------------
Description:
When primary or peer
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;
}
> Return exception of WritableByteChannel#write to client.
> --------------------------------------------------------
>
> Key: RATIS-1150
> URL: https://issues.apache.org/jira/browse/RATIS-1150
> Project: Ratis
> Issue Type: Sub-task
> Reporter: runzhiwang
> Assignee: runzhiwang
> Priority: Major
>
> When primary or peer
> 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;
> }
--
This message was sent by Atlassian Jira
(v8.3.4#803005)