Skip to content

MINOR: Add DCL to improve performance#22098

Merged
chia7712 merged 2 commits intoapache:trunkfrom
YutaLin:minor_dcl
Apr 20, 2026
Merged

MINOR: Add DCL to improve performance#22098
chia7712 merged 2 commits intoapache:trunkfrom
YutaLin:minor_dcl

Conversation

@YutaLin
Copy link
Copy Markdown
Contributor

@YutaLin YutaLin commented Apr 19, 2026

Synchronized method will cause the process lock here every time, it
would be better to lock when we actually need to create the meter,
otherwise we can just return the existed value.

Reviewers: Ken Huang s7133700@gmail.com, Chia-Ping Tsai
chia7712@gmail.com

@github-actions github-actions Bot added triage PRs from the community core Kafka Broker clients small Small PRs labels Apr 19, 2026
Copy link
Copy Markdown
Collaborator

@mingyen066 mingyen066 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

nit: could you change title to MINOR instead of Minor

@YutaLin YutaLin changed the title Minor: Add DCL to improve performance MINOR: Add DCL to improve performance Apr 20, 2026
* @return The sensor that is created
*/
public synchronized Sensor sensor(String name, MetricConfig config, Sensor... parents) {
public Sensor sensor(String name, MetricConfig config, Sensor... parents) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just for testing if I can trigger CI to auto fill reviewers

@github-actions github-actions Bot removed the triage PRs from the community label Apr 20, 2026
Copy link
Copy Markdown
Member

@chia7712 chia7712 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall LGTM. There were some flaky tests, so I'll re-run the CI to be sure

Copy link
Copy Markdown
Collaborator

@m1a2st m1a2st left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, LGTM

@chia7712 chia7712 merged commit 282eef9 into apache:trunk Apr 20, 2026
39 of 42 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants