hachikuji commented on a change in pull request #8609:
URL: https://github.com/apache/kafka/pull/8609#discussion_r420319459
##########
File path: core/src/main/scala/kafka/controller/ControllerChannelManager.scala
##########
@@ -550,6 +550,22 @@ abstract class
AbstractControllerBrokerRequestBatch(config: KafkaConfig,
else if (config.interBrokerProtocolVersion >= KAFKA_2_2_IV0) 1
else 0
+ def responseCallback(brokerId: Int, isPartitionDeleted: TopicPartition =>
Boolean)
+ (response: AbstractResponse): Unit = {
+ val stopReplicaResponse = response.asInstanceOf[StopReplicaResponse]
+ val partitionErrorsForDeletingTopics = mutable.Map.empty[TopicPartition,
Errors]
+ stopReplicaResponse.partitionErrors.asScala.foreach { pe =>
+ val tp = new TopicPartition(pe.topicName, pe.partitionIndex)
+ if (controllerContext.isTopicDeletionInProgress(pe.topicName) &&
+ isPartitionDeleted(tp)) {
+ partitionErrorsForDeletingTopics += tp ->
Errors.forCode(pe.errorCode)
Review comment:
I think the name seems ok. To me it means that the map includes the
errors of all topic being deleted. It might be nice if it could reflect that
this is only covering partitions which were also requested to be deleted in the
StopReplica request, but that name probably becomes unwieldy.
----------------------------------------------------------------
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:
[email protected]