-
Notifications
You must be signed in to change notification settings - Fork 14.9k
KAFKA-19776: Fix log values for previous leader id and epoch #20671
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Stores the existing values for both the fields in a local variable for logging.
OmniaGM
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch thanks for the fix. Will wait for the pipeline to pass first.
chia7712
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gaurav-narula nice find and sorry for late review. Just one small comment from me
| s"Previous leader $prevLeaderReplicaIdOpt and previous leader epoch was $prevLeaderEpoch.") | ||
| } else { | ||
| stateChangeLogger.info(s"Skipped the become-follower state change for $topicPartition with topic id $topicId, " + | ||
| s"partition registration $partitionRegistration and isNew=$isNew since it is already a follower with leader epoch $leaderEpoch.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this leaderEpoch also be replaced by prevLeaderEpoch?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed! On a further look, it seems both the regressions were introduced with https://github.com/apache/kafka/pull/14138/files. I'll raise another PR.
We missed a branch in apache#20671. This PR handles the else branch where we log about skipping the follower state change. Also updated the doc for the method as it was out of date.
We missed a branch in #20671. This PR handles the else branch where we log about skipping the follower state change. Also updated the doc for the method as it was out of date. Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
…20671) Stores the existing values for both the fields in a local variable for logging. Reviewers: Omnia Ibrahim <o.g.h.ibrahim@gmail.com>
We missed a branch in apache#20671. This PR handles the else branch where we log about skipping the follower state change. Also updated the doc for the method as it was out of date. Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
…20671) Stores the existing values for both the fields in a local variable for logging. Reviewers: Omnia Ibrahim <o.g.h.ibrahim@gmail.com>
We missed a branch in apache#20671. This PR handles the else branch where we log about skipping the follower state change. Also updated the doc for the method as it was out of date. Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
Stores the existing values for both the fields in a local variable for
logging.
Reviewers: Omnia Ibrahim o.g.h.ibrahim@gmail.com