amaliujia commented on PR #1653: URL: https://github.com/apache/ratis/pull/1653#issuecomment-6332107573
Take one step further: I think we need an enhanced API that do not expose a closeable channel. We only need to offer a wrapper of a channel that expose ` public int write(ByteBuffer src) throws IOException`. The contract between Ratis and the application is either 1) return normally when done 2) or throw proper exceptions. Then both Ratis and applicatiosn do not need to worry about when to close the channel. Applications focus on write and throw. Ratis cares about stream close or fail and crafts proper responses to the clients. -- 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]
