FrankYang0529 commented on code in PR #21134:
URL: https://github.com/apache/kafka/pull/21134#discussion_r2618573192
##########
metadata/src/main/java/org/apache/kafka/metadata/PartitionRegistration.java:
##########
@@ -346,8 +346,8 @@ public String diff(PartitionRegistration prev) {
return builder.toString();
}
- public void maybeLogPartitionChange(Logger log, String description,
PartitionRegistration prev) {
- if (!electionWasClean(leader, prev.isr)) {
+ public void maybeLogPartitionChange(Logger log, String description,
PartitionRegistration prev, PartitionRegistration next) {
+ if (!electionWasClean(leader, prev.isr, next.addingReplicas)) {
Review Comment:
Could we use `addingReplicas` directly? It's like `diff` function only needs
`prev` argument.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]