Alyssa Huang created KAFKA-16616:
------------------------------------

             Summary: refactor mergeWith in MetadataSnapshot
                 Key: KAFKA-16616
                 URL: https://issues.apache.org/jira/browse/KAFKA-16616
             Project: Kafka
          Issue Type: Improvement
    Affects Versions: 3.7.0
            Reporter: Alyssa Huang


Right now we keep track of topic ids and partition metadata to add/update 
separately in mergeWith (e.g. two maps passed as arguments). This means we 
iterate over topic metadata twice which could be costly when we're dealing with 
a large number of updates. 
`updatePartitionLeadership` which calls `mergeWith` does something similarly 
(generates map of topic ids to update in a loop separate from the list of 
partition metadata to update) and should be refactored as well.



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

Reply via email to