You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2022/06/08 08:23:26 UTC
[GitHub] [kafka] divijvaidya commented on a diff in pull request #12224: MINOR: Make LocalLogManager implementation consistent with the RaftClient interface contract
divijvaidya commented on code in PR #12224:
URL: https://github.com/apache/kafka/pull/12224#discussion_r892065895
##########
metadata/src/test/java/org/apache/kafka/metalog/LocalLogManager.java:
##########
@@ -227,14 +228,14 @@ synchronized long tryAppend(int nodeId, int epoch, List<ApiMessageAndVersion> ba
synchronized long tryAppend(int nodeId, int epoch, LocalBatch batch) {
if (epoch != leader.epoch()) {
- log.trace("tryAppend(nodeId={}, epoch={}): the provided epoch does not " +
+ log.debug("tryAppend(nodeId={}, epoch={}): the provided epoch does not " +
"match the current leader epoch of {}.", nodeId, epoch, leader.epoch());
- return Long.MAX_VALUE;
+ throw new NotLeaderException("Append failed because the replication is not the current leader");
Review Comment:
Thanks for pointing this out. I have updated LocalLogManager to adhere to the same.
--
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-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org