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/05/20 10:32:51 UTC

[GitHub] [kafka] wanwenli edited a comment on pull request #10686: KAFKA-4083: prevent changing replication factor via partition reassignment

wanwenli edited a comment on pull request #10686:
URL: https://github.com/apache/kafka/pull/10686#issuecomment-844963635


   > While I agree that all partitions ought to have the same number of replicas, I think this fix is enforcing something different: That you can't change the RF for a partition. While that prevents the partitions getting different RFs from each other if they had the same RF originally it also prevents changing the RF for all the partitions of a topic, which we should support.
   > 
   > There's also the use case where you want to change the RF for a topic, but because it has a large number of partitions you want to do it in batches, using multiple reassignments. I think Cruise Control does this kind of batching, for example. Supporting that requires that, for a time, the topic has partitions with different numbers of replicas.
   
   Thanks, @tombentley. I totally agree that changing RF via partition-reassignment API is a very valid use case. May I add this piece of logic as a solution:
   
   If a partition reassignment attempts to change RF, its plan must change the RF of all partitions of a topic to the _same_ number. What do you think?
   
   One more thing to confirm with you: `partitionAssignments` in KafkaController contains the all topic partitions in the entire cluster, right? I find in [this line](https://github.com/apache/kafka/blob/7f91d2935f821c55afce520debb7bc97d60185d4/core/src/main/scala/kafka/controller/KafkaController.scala#L906) that all topic partitions are loaded into the controller upon initiation.


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