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/08/01 22:25:36 UTC

[GitHub] [kafka] cmccabe opened a new pull request, #12467: KAFKA-14129: KRaft must check manual assignments for createTopics are contiguous

cmccabe opened a new pull request, #12467:
URL: https://github.com/apache/kafka/pull/12467

   KRaft should validate that manual assignments given to createTopics are contiguous. In other words,
   they must start with partition 0, and progress through 1, 2, 3, etc. ZK mode does this, but KRaft
   mode previously did not. Also fix a null pointer exception when the placement for partition 0
   was not specified.
   
   Convert over AddPartitionsTest to use KRaft. This PR converts all of the test except for some of
   the placement logic tests, which will need to be redone for KRaft mode in a future change.
   
   Fix null pointer exception in KRaftMetadataCache#getPartitionInfo.  Specifically, we should not
   assume that the partition will be found in the hash map. This is another case where we had
   "Some(x)" but it should be "Option(x)."
   
   BrokerLifecycleManager should be initialized in the constructor of BrokerServer. Otherwise there
   will be a null pointer exception if BrokerServer#brokerState is called prior to BrokerServer#start.


-- 
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] cmccabe commented on a diff in pull request #12467: KAFKA-14129: KRaft must check manual assignments for createTopics are contiguous

Posted by GitBox <gi...@apache.org>.
cmccabe commented on code in PR #12467:
URL: https://github.com/apache/kafka/pull/12467#discussion_r935931468


##########
core/src/main/scala/kafka/server/BrokerServer.scala:
##########
@@ -81,6 +81,8 @@ class BrokerServer(
   val controllerQuorumVotersFuture: CompletableFuture[util.Map[Integer, AddressSpec]]
 ) extends KafkaBroker {
 
+  val lifecycleManager: BrokerLifecycleManager = new BrokerLifecycleManager(config, time, threadNamePrefix)

Review Comment:
   thanks for the heads up. I will go with a different fix.



-- 
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] dengziming commented on a diff in pull request #12467: KAFKA-14129: KRaft must check manual assignments for createTopics are contiguous

Posted by GitBox <gi...@apache.org>.
dengziming commented on code in PR #12467:
URL: https://github.com/apache/kafka/pull/12467#discussion_r935283700


##########
core/src/main/scala/kafka/server/BrokerServer.scala:
##########
@@ -81,6 +81,8 @@ class BrokerServer(
   val controllerQuorumVotersFuture: CompletableFuture[util.Map[Integer, AddressSpec]]
 ) extends KafkaBroker {
 
+  val lifecycleManager: BrokerLifecycleManager = new BrokerLifecycleManager(config, time, threadNamePrefix)

Review Comment:
   This change will make some tests fail since `lifecycleManager` is stateful(for example, initialCatchUpFuture ) but we are stopping and restarting it in `LeaderElectionCommandTest`.



-- 
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] cmccabe merged pull request #12467: KAFKA-14129: KRaft must check manual assignments for createTopics are contiguous

Posted by GitBox <gi...@apache.org>.
cmccabe merged PR #12467:
URL: https://github.com/apache/kafka/pull/12467


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