szetszwo commented on pull request #299:
URL: https://github.com/apache/incubator-ratis/pull/299#issuecomment-734039981
@runzhiwang , thanks for merging this.
Btw, just have checked FileChannelImpl.write(ByteBuffer). It will call
```
//FileChannelImpl.write
IOUtil.write(this.fd, var1, -1L, this.nd);
```
and then
```
//IOUtil.write
static int write(FileDescriptor var0, ByteBuffer var1, long var2,
NativeDispatcher var4) throws IOException {
if (var1 instanceof DirectBuffer) {
return writeFromNativeBuffer(var0, var1, var2, var4);
```
I suspect writeFromNativeBuffer is already zero-copy. If it is the case,
the current server implementation is working fine.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]