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 2020/11/06 06:20:30 UTC

[GitHub] [kafka] dengziming opened a new pull request #9571: KAFKA-10691: AlterIsr Respond with wrong Error Id

dengziming opened a new pull request #9571:
URL: https://github.com/apache/kafka/pull/9571


   AlterIsr send by an unknown broker will respond with a STALE_BROKER_EPOCH, which should be UNKNOWN_MEMBER_ID.
   


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

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



[GitHub] [kafka] dengziming closed pull request #9571: KAFKA-10691: AlterIsr Respond with wrong Error Id

Posted by GitBox <gi...@apache.org>.
dengziming closed pull request #9571:
URL: https://github.com/apache/kafka/pull/9571


   


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

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



[GitHub] [kafka] dengziming commented on a change in pull request #9571: KAFKA-10691: AlterIsr Respond with wrong Error Id

Posted by GitBox <gi...@apache.org>.
dengziming commented on a change in pull request #9571:
URL: https://github.com/apache/kafka/pull/9571#discussion_r518555329



##########
File path: core/src/main/scala/kafka/controller/KafkaController.scala
##########
@@ -2261,7 +2261,7 @@ class KafkaController(val config: KafkaConfig,
     val brokerEpochOpt = controllerContext.liveBrokerIdAndEpochs.get(brokerId)
     if (brokerEpochOpt.isEmpty) {
       info(s"Ignoring AlterIsr due to unknown broker $brokerId")
-      callback.apply(Right(Errors.STALE_BROKER_EPOCH))
+      callback.apply(Right(Errors.UNKNOWN_MEMBER_ID))

Review comment:
       You are right, I just inspect The KIP-497 and there isn't a `UNKNOWN_MEMBER_ID`.




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

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



[GitHub] [kafka] chia7712 commented on a change in pull request #9571: KAFKA-10691: AlterIsr Respond with wrong Error Id

Posted by GitBox <gi...@apache.org>.
chia7712 commented on a change in pull request #9571:
URL: https://github.com/apache/kafka/pull/9571#discussion_r518550582



##########
File path: core/src/main/scala/kafka/controller/KafkaController.scala
##########
@@ -2261,7 +2261,7 @@ class KafkaController(val config: KafkaConfig,
     val brokerEpochOpt = controllerContext.liveBrokerIdAndEpochs.get(brokerId)
     if (brokerEpochOpt.isEmpty) {
       info(s"Ignoring AlterIsr due to unknown broker $brokerId")
-      callback.apply(Right(Errors.STALE_BROKER_EPOCH))
+      callback.apply(Right(Errors.UNKNOWN_MEMBER_ID))

Review comment:
       not sure whether ```UNKNOWN_MEMBER_ID`` is more suitable than ```STALE_BROKER_EPOCH```. The concept of member id is not equal to the broker id here.




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

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



[GitHub] [kafka] dengziming commented on pull request #9571: KAFKA-10691: AlterIsr Respond with wrong Error Id

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


   @hachikuji  hi, PTAL.


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

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



[GitHub] [kafka] dengziming commented on a change in pull request #9571: KAFKA-10691: AlterIsr Respond with wrong Error Id

Posted by GitBox <gi...@apache.org>.
dengziming commented on a change in pull request #9571:
URL: https://github.com/apache/kafka/pull/9571#discussion_r518554842



##########
File path: core/src/main/scala/kafka/controller/KafkaController.scala
##########
@@ -2261,7 +2261,7 @@ class KafkaController(val config: KafkaConfig,
     val brokerEpochOpt = controllerContext.liveBrokerIdAndEpochs.get(brokerId)
     if (brokerEpochOpt.isEmpty) {
       info(s"Ignoring AlterIsr due to unknown broker $brokerId")
-      callback.apply(Right(Errors.STALE_BROKER_EPOCH))
+      callback.apply(Right(Errors.UNKNOWN_MEMBER_ID))

Review comment:
       Thank you for your reply,  here we have 2 judgement. the first is `if (brokerEpochOpt.isEmpty)` and second is `if(!brokerEpochOpt.contains(brokerEpoch))`, they both return `STALE_BROKER_EPOCH `. maybe the first is meant to return`UNKNOWN_MEMBER_ID `.




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

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



[GitHub] [kafka] chia7712 commented on a change in pull request #9571: KAFKA-10691: AlterIsr Respond with wrong Error Id

Posted by GitBox <gi...@apache.org>.
chia7712 commented on a change in pull request #9571:
URL: https://github.com/apache/kafka/pull/9571#discussion_r518550582



##########
File path: core/src/main/scala/kafka/controller/KafkaController.scala
##########
@@ -2261,7 +2261,7 @@ class KafkaController(val config: KafkaConfig,
     val brokerEpochOpt = controllerContext.liveBrokerIdAndEpochs.get(brokerId)
     if (brokerEpochOpt.isEmpty) {
       info(s"Ignoring AlterIsr due to unknown broker $brokerId")
-      callback.apply(Right(Errors.STALE_BROKER_EPOCH))
+      callback.apply(Right(Errors.UNKNOWN_MEMBER_ID))

Review comment:
       not sure whether ```UNKNOWN_MEMBER_ID`` is more suitable than ```STALE_BROKER_EPOCH```.




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

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