chia7712 commented on PR #19327:
URL: https://github.com/apache/kafka/pull/19327#issuecomment-2781010552

   @ijuma thanks for your explanation. I do agree that there is no strict 
requirement of removing a test-only method. However, `nodeEndpoints` is crucial 
for handling specific errors like `NOT_LEADER_OR_FOLLOWER`. Therefore, using 
this test-only method in production could lead to bugs. We can even add strict 
check to `toMessage` to ensure the `nodeEndpoints` is not empty when handling 
the `NOT_LEADER_OR_FOLLOWER` error.


-- 
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: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to