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 2021/08/05 01:38:29 UTC

[GitHub] [kafka] dielhennr opened a new pull request #11178: KAFKA-13168: KRaft observers should not have a replica id

dielhennr opened a new pull request #11178:
URL: https://github.com/apache/kafka/pull/11178


   Fix the `KafkaRaftClient` to use Optional.empty as its localId so that the sentinel `node.id`, `node.id=-1` is sent as the replicaId in the `FetchRequest`.
   
   https://issues.apache.org/jira/browse/KAFKA-13168
   


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



[GitHub] [kafka] jsancio commented on a change in pull request #11178: KAFKA-13168: KRaft observers should not have a replica id

Posted by GitBox <gi...@apache.org>.
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-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [kafka] mumrah merged pull request #11178: KAFKA-13168: KRaft observers should not have a replica id

Posted by GitBox <gi...@apache.org>.
mumrah merged pull request #11178:
URL: https://github.com/apache/kafka/pull/11178


   


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



[GitHub] [kafka] jsancio commented on a change in pull request #11178: KAFKA-13168: KRaft observers should not have a replica id

Posted by GitBox <gi...@apache.org>.
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-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [kafka] mumrah commented on pull request #11178: KAFKA-13168: KRaft observers should not have a replica id

Posted by GitBox <gi...@apache.org>.
mumrah commented on pull request #11178:
URL: https://github.com/apache/kafka/pull/11178#issuecomment-893549648


   cherry-picked to 3.0 as 765d2006a32d7a


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