duongkame commented on PR #1007:
URL: https://github.com/apache/ratis/pull/1007#issuecomment-1886495012
> For backward compatibility, we will provide two APIs. For examples, there
are two `StateMachine.DataChannel.write(..)` methods:
>
> ```java
>
> //StateMachine.DataChannel
>
> default int write(ByteBuffer buffer) throws IOException {...}
>
>
>
> default int write(ReferenceCountedObject<ByteBuffer>
referenceCountedBuffer) throws IOException {...}
>
> ```
>
> An implementation can choose to override either one of them.
Thanks @szetszwo, totally agree with the API suggestion. We will achive code
compatibility with that.
By backward compatibility, I meant for exsting applications, they have to
make a code change to implement the new API before enabling zero copy safely or
may crash in runtime. Releasing a version of Ratis with zero-copy implicitly
enabled doesn't seem backward compatible in that sense. We need a flag that is
off by default, or zero copy is released in a new major version with clear
release notes stating the needed migration.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]