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

   PR https://github.com/apache/kafka/pull/13760 introduced a problem with 
KafkaAdmin.deleteRecords. If the request acted on a set of topic-partitions 
which spanned multiple leader brokers, the request for all of the 
topic-partitions were sent to all brokers. While this technically worked, it 
did mean that every broker handled its own topic-partitions and failed all of 
the ones that it didn't lead. This meant that every topic-partition was acted 
on, but at the cost of a lot of failed subrequests.
   
   The code was not paying attention to the mapping from node to 
topic-partition passed into `DeleteRecordsHandler.buildBatchedRequest`. This PR 
filters the subrequests for each node based on the mapping passed into that 
method.
   
   One of the existing unit tests actually codified the wrong behavior, so that 
has been fixed. Then a more complicated unit test that generates a mapping and 
then checks that it is correctly filtered has been added.
   
   ### Committer Checklist (excluded from commit message)
   - [ ] Verify design and implementation 
   - [ ] Verify test coverage and CI build status
   - [ ] Verify documentation (including upgrade notes)
   


-- 
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-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to