Skip to content

MINOR: Re-read PRODUCE throttle metric each iteration in produceUntilThrottled#22332

Closed
nileshkumar3 wants to merge 1 commit into
apache:trunkfrom
nileshkumar3:minor-base-quota-test-produce-throttle
Closed

MINOR: Re-read PRODUCE throttle metric each iteration in produceUntilThrottled#22332
nileshkumar3 wants to merge 1 commit into
apache:trunkfrom
nileshkumar3:minor-base-quota-test-produce-throttle

Conversation

@nileshkumar3
Copy link
Copy Markdown
Contributor

@nileshkumar3 nileshkumar3 commented May 20, 2026

While reviewing the PR #22329, I noticed that produceUntilThrottled caches the produce throttle metric reference before entering the polling loop.
Since the broker registers the throttle metric lazily, the metric may not yet exist when the helper first reads it. In that case, the cached reference remains null for the lifetime of the method, preventing the helper from observing throttling even after the broker later records the metric.

Reviewer - @muralibasani

@github-actions github-actions Bot added core Kafka Broker tests Test fixes (including flaky tests) small Small PRs triage PRs from the community labels May 20, 2026
@nileshkumar3
Copy link
Copy Markdown
Contributor Author

Addressed the issue here with other changes #22338

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Kafka Broker small Small PRs tests Test fixes (including flaky tests) triage PRs from the community

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant