Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[improve][broker] Improve Consumer.equals performance #23864

Merged
merged 1 commit into from
Jan 20, 2025

Conversation

lhotari
Copy link
Member

@lhotari lhotari commented Jan 18, 2025

Motivation

  • current problem is that unefficient IP address comparison will have to be performed on every match
  • equals method should check if the other object is the same instance as the first step
    Previously the equals method performance has been improved by @Shawyeok in PR [improve][broker] Make Consumer#equals more effective #18662. That addressed the main performance issue and this current PR is a small adjustment to avoid unnecessary work when there's a matching instance.

Modifications

  • add instance check as first step

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

- current problem is that unefficient IP address comparison will have to be performed
  on every match
- equals method should check if the other object is the same instance as the first step
@lhotari lhotari added this to the 4.1.0 milestone Jan 18, 2025
@lhotari lhotari self-assigned this Jan 18, 2025
@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Jan 18, 2025
@lhotari lhotari merged commit 3c2ec2b into apache:master Jan 20, 2025
55 of 56 checks passed
lhotari added a commit that referenced this pull request Jan 20, 2025
lhotari added a commit that referenced this pull request Jan 20, 2025
lhotari added a commit that referenced this pull request Jan 20, 2025
poorbarcode pushed a commit to poorbarcode/pulsar that referenced this pull request Jan 23, 2025
nikhil-ctds pushed a commit to datastax/pulsar that referenced this pull request Jan 31, 2025
(cherry picked from commit 3c2ec2b)
(cherry picked from commit 69caf71)
srinath-ctds pushed a commit to datastax/pulsar that referenced this pull request Feb 3, 2025
(cherry picked from commit 3c2ec2b)
(cherry picked from commit 69caf71)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants