KAFKA-9670: Reduce allocations in Metadata Response preparation#8236
KAFKA-9670: Reduce allocations in Metadata Response preparation#8236hachikuji merged 5 commits intoapache:trunkfrom
Conversation
|
Perf results of Benchmark tests: Old: New |
579344e to
d846111
Compare
There was a problem hiding this comment.
Should we remove MetadataResponse.TopicMetadata altogether or does it add value?
There was a problem hiding this comment.
I think, we can continue to use MetadataResponse.TopicMetadata in some of the internal classes and tests. But I open to update/remove the classes the code required.
There was a problem hiding this comment.
nit: I'd suggest changing this to accept Errors so that we don't need all the annoying .code() calls.
There was a problem hiding this comment.
nit: for ra bunch of these accessors, we can drop parenthesis.
There was a problem hiding this comment.
nit: this looks misaligned
7ea70b2 to
3777b18
Compare
3777b18 to
ddd4825
Compare
|
@hachikuji Thanks for the review. Addressed the review comments. |
hachikuji
left a comment
There was a problem hiding this comment.
LGTM. Thanks for the patch!
* apache-github/trunk: (39 commits) MINOR: cleanup and add tests to StateDirectoryTest (apache#8304) HOTFIX: StateDirectoryTest should use Set instead of List (apache#8305) MINOR: Fix build and JavaDoc warnings (apache#8291) MINOR: Fix kafka.server.RequestQuotaTest missing new ApiKeys. (apache#8302) KAFKA-9712: Catch and handle exception thrown by reflections scanner (apache#8289) KAFKA-9670; Reduce allocations in Metadata Response preparation (apache#8236) MINOR: fix Scala 2.13 build error introduced in apache#8083 (apache#8301) MINOR: enforce non-negative invariant for checkpointed offsets (apache#8297) MINOR: comment apikey types in generated switch (apache#8201) MINOR: Fix typo in CreateTopicsResponse.json (apache#8300) KIP-546: Implement describeClientQuotas and alterClientQuotas. (apache#8083) KAFKA-6647: Do note delete the lock file while holding the lock (apache#8267) KAFKA-9677: Fix consumer fetch with small consume bandwidth quotas (apache#8290) KAFKA-9533: Fix JavaDocs of KStream.transformValues (apache#8298) MINOR: reuse pseudo-topic in FKJoin (apache#8296) KAFKA-6145: Pt 2. Include offset sums in subscription (apache#8246) KAFKA-9714; Eliminate unused reference to IBP in `TransactionStateManager` (apache#8293) KAFKA-9718; Don't log passwords for AlterConfigs in request logs (apache#8294) KAFKA-8768: DeleteRecords request/response automated protocol (apache#7957) KAFKA-9685: Solve Set concatenation perf issue in AclAuthorizer ...
This PR removes intermediate conversions between
MetadataResponse.TopicMetadata=>MetadataResponseTopicandMetadataResponse.PartitionMetadata=>MetadataResponsePartitionobjects.There is 15-20% reduction in object allocations and 5-10% improvement in metadata request performance.
Committer Checklist (excluded from commit message)