[ 
https://issues.apache.org/jira/browse/KAFKA-21267?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lucy Liu reassigned KAFKA-21267:
--------------------------------

    Assignee: Lucy Liu  (was: Chia-Ping Tsai)

> The empty removing/adding is omitted when calculating the assignment
> --------------------------------------------------------------------
>
>                 Key: KAFKA-21267
>                 URL: https://issues.apache.org/jira/browse/KAFKA-21267
>             Project: Kafka
>          Issue Type: Bug
>            Reporter: Chia-Ping Tsai
>            Assignee: Lucy Liu
>            Priority: Major
>         Attachments: ReplaceInFlightReassignmentTest.java
>
>
>  
> {code:java}
>         if (!reassignment.replicas().equals(currentReplicas)) {
>             builder.setTargetReplicas(reassignment.replicas());
>         }
>         if (!reassignment.removing().isEmpty()) {
>             builder.setTargetRemoving(reassignment.removing());
>         }
>         if (!reassignment.adding().isEmpty()) {
>             builder.setTargetAdding(reassignment.adding());
>         } {code}
> I noticed those guards but could not find a reason for them, since an empty 
> delta is a totally possible situation in reassignments. The test cases in the 
> attachment were generated by AI, and they show how we can hit the issue when 
> the empty delta is not written back.
>  
> The simple fix is to remove those unnecessary conditions ...



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to