sanpwc commented on code in PR #6344: URL: https://github.com/apache/ignite-3/pull/6344#discussion_r2263213810
########## modules/raft/src/main/java/org/apache/ignite/raft/jraft/rpc/RaftClientService.java: ########## @@ -103,4 +103,16 @@ Future<Message> timeoutNow(final PeerId peerId, final RpcRequests.TimeoutNowRequ */ Future<Message> readIndex(final PeerId peerId, final RpcRequests.ReadIndexRequest request, final int timeoutMs, final RpcResponseClosure<RpcRequests.ReadIndexResponse> done); + + /** + * Send a get-leader-and-term request and handle the response with done. + * + * @param peerId destination peer ID + * @param request request data + * @param timeoutMs timeout millis + * @param done callback + * @return a future result + */ + Future<Message> getLeaderAndTerm(final PeerId peerId, final CliRequests.GetLeaderRequest request, final int timeoutMs, Review Comment: > right now this works in the same way as readIndex Likely it's because readIndex is an internal operation and getLeader is external. Redirect proposal pattern should be used for external operations only. Actually, I do believe that what I'm talking about is a better way to solve the problem, however that will definitely complicate the code, thus okay, let's leave your option. -- 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: notifications-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org