You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by cm...@apache.org on 2021/09/24 18:18:13 UTC
[kafka] branch trunk updated: MINOR: fix ClusterControlManager log
message (#11358)
This is an automated email from the ASF dual-hosted git repository.
cmccabe pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git
The following commit(s) were added to refs/heads/trunk by this push:
new af0c2a9 MINOR: fix ClusterControlManager log message (#11358)
af0c2a9 is described below
commit af0c2a9370979d6c21b0d5b6fba66151658958fb
Author: Colin Patrick McCabe <cm...@confluent.io>
AuthorDate: Fri Sep 24 11:16:05 2021 -0700
MINOR: fix ClusterControlManager log message (#11358)
Fix a ClusterControlManager log message that should have distinguished between
newly registered and re-registered brokers, but did not due to a bug.
Reviewers: Ismael Juma <is...@juma.me.uk>, José Armando García Sancio <js...@gmail.com>
---
.../java/org/apache/kafka/controller/ClusterControlManager.java | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/metadata/src/main/java/org/apache/kafka/controller/ClusterControlManager.java b/metadata/src/main/java/org/apache/kafka/controller/ClusterControlManager.java
index 5a63094..b2cdcc1 100644
--- a/metadata/src/main/java/org/apache/kafka/controller/ClusterControlManager.java
+++ b/metadata/src/main/java/org/apache/kafka/controller/ClusterControlManager.java
@@ -250,10 +250,10 @@ public class ClusterControlManager {
feature.minSupportedVersion(), feature.maxSupportedVersion()));
}
// Update broker registrations.
- brokerRegistrations.put(brokerId, new BrokerRegistration(brokerId,
- record.brokerEpoch(), record.incarnationId(), listeners, features,
- Optional.ofNullable(record.rack()), record.fenced()));
- BrokerRegistration prevRegistration = brokerRegistrations.get(brokerId);
+ BrokerRegistration prevRegistration = brokerRegistrations.put(brokerId,
+ new BrokerRegistration(brokerId, record.brokerEpoch(),
+ record.incarnationId(), listeners, features,
+ Optional.ofNullable(record.rack()), record.fenced()));
if (prevRegistration == null) {
log.info("Registered new broker: {}", record);
} else if (prevRegistration.incarnationId().equals(record.incarnationId())) {