KAFKA-15468 [1/2]: Prevent transaction coordinator reloads on already loaded leaders#15139
KAFKA-15468 [1/2]: Prevent transaction coordinator reloads on already loaded leaders#15139jolshan merged 10 commits intoapache:trunkfrom
Conversation
jsancio
left a comment
There was a problem hiding this comment.
Thanks. One minor suggestion.
| files="(QuorumController).java"/> | ||
| <suppress checks="(CyclomaticComplexity|NPathComplexity)" | ||
| files="(PartitionRegistration|PartitionChangeBuilder).java"/> | ||
| files="(PartitionRegistration|PartitionChangeBuilder|TopicDelta).java"/> |
There was a problem hiding this comment.
Did you try changing the code so that it doesn't warn you of path complexity? If it is not possible can you use annotations instead? I added annotation support a while back. Checkout: https://lists.apache.org/thread/mjxfofn823o1ozrzo36ogj17xmlrxod9
There was a problem hiding this comment.
In between when I wrote this originally and now a lot of JBOD code was added. I don't think I have the skills to make it simpler. I don't think there is a way to change my code. I can use the annotation if you think that keeps the suppression more contained
There was a problem hiding this comment.
Yes. Let's use annotation so that it only applies to the methods that violates our coding style.
jsancio
left a comment
There was a problem hiding this comment.
LGTM. Feel free to merge if the tests are green.
… loaded leaders (apache#15139) This originally was apache#14489 which covered 2 aspects -- reloading on partition epoch changes where leader epoch did not change and reloading when leader epoch changed but we were already the leader. I've cut out the second part of the change since the first part is much simpler. Redefining the TopicDelta fields to better distinguish when a leader is elected (leader epoch bump) vs when a leader has isr/replica changes (partition epoch bump). There are some cases where we bump the partition epoch but not the leader epoch. We do not need to do operations that only care about the leader epoch bump. (ie -- onElect callbacks) Reviewers: Artem Livshits <alivshits@confluent.io>, José Armando García Sancio <jsancio@apache.org>
… loaded leaders (apache#15139) This originally was apache#14489 which covered 2 aspects -- reloading on partition epoch changes where leader epoch did not change and reloading when leader epoch changed but we were already the leader. I've cut out the second part of the change since the first part is much simpler. Redefining the TopicDelta fields to better distinguish when a leader is elected (leader epoch bump) vs when a leader has isr/replica changes (partition epoch bump). There are some cases where we bump the partition epoch but not the leader epoch. We do not need to do operations that only care about the leader epoch bump. (ie -- onElect callbacks) Reviewers: Artem Livshits <alivshits@confluent.io>, José Armando García Sancio <jsancio@apache.org>
… loaded leaders (apache#15139) This originally was apache#14489 which covered 2 aspects -- reloading on partition epoch changes where leader epoch did not change and reloading when leader epoch changed but we were already the leader. I've cut out the second part of the change since the first part is much simpler. Redefining the TopicDelta fields to better distinguish when a leader is elected (leader epoch bump) vs when a leader has isr/replica changes (partition epoch bump). There are some cases where we bump the partition epoch but not the leader epoch. We do not need to do operations that only care about the leader epoch bump. (ie -- onElect callbacks) Reviewers: Artem Livshits <alivshits@confluent.io>, José Armando García Sancio <jsancio@apache.org>
This originally was #14489 which covered 2 aspects -- reloading on partition epoch changes where leader epoch did not change and reloading when leader epoch changed but we were already the leader.
I've cut out the second part of the change since the first part is much simpler.
Redefining the TopicDelta fields to better distinguish when a leader is elected (leader epoch bump) vs when a leader has isr/replica changes (partition epoch bump). There are some cases where we bump the partition epoch but not the leader epoch. We do not need to do operations that only care about the leader epoch bump. (ie -- onElect callbacks)