[GitHub] [kafka] jsancio commented on a change in pull request #11178: KAFKA-13168: KRaft observers should not have a replica id
jsancio commented on a change in pull request #11178: URL: https://github.com/apache/kafka/pull/11178#discussion_r683111844 ## File path: core/src/main/scala/kafka/raft/RaftManager.scala ## @@ -180,6 +181,12 @@ class KafkaRaftManager[T]( val expirationService = new TimingWheelExpirationService(expirationTimer) val quorumStateStore = new FileBasedStateStore(new File(dataDir, "quorum-state")) +val nodeId = if (config.processRoles.contains(BrokerRole) && !config.processRoles.contains(ControllerRole)) { + OptionalInt.empty() +} else { + OptionalInt.of(config.nodeId) +} + Review comment: ```suggestion val nodeId = if (config.processRoles.contains(ControllerRole)) { OptionalInt.of(config.nodeId) } else { OptionalInt.empty() } ``` -- 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-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [kafka] jsancio commented on a change in pull request #11178: KAFKA-13168: KRaft observers should not have a replica id
jsancio commented on a change in pull request #11178: URL: https://github.com/apache/kafka/pull/11178#discussion_r683111844 ## File path: core/src/main/scala/kafka/raft/RaftManager.scala ## @@ -180,6 +181,12 @@ class KafkaRaftManager[T]( val expirationService = new TimingWheelExpirationService(expirationTimer) val quorumStateStore = new FileBasedStateStore(new File(dataDir, "quorum-state")) +val nodeId = if (config.processRoles.contains(BrokerRole) && !config.processRoles.contains(ControllerRole)) { + OptionalInt.empty() +} else { + OptionalInt.of(config.nodeId) +} + Review comment: ```suggestion val nodeId = if (config.processRoles.contains(ControllerRole)) { OptionalInt.of(config.nodeId) } else { OptionalInt.empty() } ``` -- 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-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org