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/07 03:26:27 UTC

[GitHub] [kafka] dengziming commented on a diff in pull request #12240: KAFKA-13916; Fenced replicas should not be allowed to join the ISR in KRaft (KIP-841, Part 1)

dengziming commented on code in PR #12240:
URL: https://github.com/apache/kafka/pull/12240#discussion_r890725858


##########
metadata/src/main/java/org/apache/kafka/controller/ClusterControlManager.java:
##########
@@ -394,31 +432,49 @@ public void replay(UnregisterBrokerRecord record) {
     }
 
     public void replay(FenceBrokerRecord record) {
-        replayRegistrationChange(record, record.id(), record.epoch(),
-            BrokerRegistrationFencingChange.UNFENCE);
+        replayRegistrationChange(
+            record,
+            record.id(),
+            record.epoch(),
+            BrokerRegistrationFencingChange.UNFENCE.asBoolean(),

Review Comment:
   Similar to Jose mentioned, this should be noticed if #12236 merged first.



##########
metadata/src/main/java/org/apache/kafka/controller/ClusterControlManager.java:
##########
@@ -279,6 +309,13 @@ Set<Integer> fencedBrokerIds() {
             .collect(Collectors.toSet());
     }
 
+    private short registerBrokerRecordVersion() {

Review Comment:
   How about moving this method to MetadataVersion? I find this logic also used in `BrokerRegistration.toRecord`



-- 
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