kafka-jira mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (KAFKA-6612) Added logic to prevent increasing partition counts during topic deletion
Date Thu, 08 Mar 2018 21:06:00 GMT

    [ https://issues.apache.org/jira/browse/KAFKA-6612?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16391906#comment-16391906
] 

ASF GitHub Bot commented on KAFKA-6612:
---------------------------------------

gitlw closed pull request #4649: KAFKA-6612: Added logic to prevent increasing partition counts
during topic deletion
URL: https://github.com/apache/kafka/pull/4649
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):



 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


> Added logic to prevent increasing partition counts during topic deletion
> ------------------------------------------------------------------------
>
>                 Key: KAFKA-6612
>                 URL: https://issues.apache.org/jira/browse/KAFKA-6612
>             Project: Kafka
>          Issue Type: Improvement
>            Reporter: Lucas Wang
>            Assignee: Lucas Wang
>            Priority: Major
>
> Problem: trying to increase the partition count of a topic while the topic deletion is
in progress can cause the topic to be never deleted.
> In the current code base, if a topic deletion is still in progress and the partition
count is increased,
> the new partition and its replica assignment be created on zookeeper as data of the path
/brokers/topics/<topic>.
> Upon detecting the change, the controller sees the topic is being deleted, and therefore
ignores the partition change. Therefore the zk path /brokers/topics/<topic>/partitions/<partition
id> will NOT be created.
> If a controller switch happens next, the added partition will be detected by the new
controller and stored in the controllerContext.partitionReplicaAssignment. The new controller
then tries to delete the topic by first transitioning its replicas to OfflineReplica. However
the transition to OfflineReplica state will NOT succeed since there is no leader for the partition.
Since the only state change path for a replica to be successfully deleted is OfflineReplica
-> ReplicaDeletionStarted -> ReplicaDeletionSuccessful, not being able to enter the
OfflineReplica state means the replica can never be successfully deleted.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message