otterc opened a new pull request, #2123: URL: https://github.com/apache/incubator-celeborn/pull/2123
### What changes were proposed in this pull request? Currently in `BaseMessageHandler` there is a single API for receive which is used for all messages. This makes handling messages when multiple handlers are added messy. - req.body.release() is only invoked when the handler actually process the message and not delegates it. - every handler will have to create an instance of RpcResponseCallback for Rpc messages which is exactly the same. Instead, releasing the message body and creating a callback for Rpc messages can be done in TransportRequestHandler. This avoids: - code duplication related to RpcResponseCallback in every RPC handler - every new request handler doesn't need to release the request body. It will be always be done in TransportRequestHandler. Please note that this is how it is in Apache Spark and with Sasl Authentication, we will add a SaslRpcHandler which wraps the underlying message handler. ### Why are the changes needed? The changes are needed for adding authentication to Celeborn. See [CELEBORN-1011](https://issues.apache.org/jira/browse/CELEBORN-1011). ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? Existing UTs and added some more UTs. -- 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]
