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

KAFKA-10458; Updating controller quota does not work since Token Bucket #9272

Merged
merged 3 commits into from Sep 14, 2020

Conversation

dajac
Copy link
Contributor

@dajac dajac commented Sep 9, 2020

This PR fixes two issues that have been introduced by #9114.

  • When I switched the metric from Rate to TokenBucket in the ControllerMutationQuotaManager, I have mixed up the metrics. That broke the quota update path.

  • When a quota is updated, the ClientQuotaManager updates the MetricConfig of the KafkaMetric. That update was not reflected into the Sensor so the Sensor was still using the MetricConfig that it has been created with.

Committer Checklist (excluded from commit message)

  • Verify design and implementation
  • Verify test coverage and CI build status
  • Verify documentation (including upgrade notes)

}

public Stat stat() {
return this.stat;
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: this is not really needed, since it's not ambiguous here as in constructor,

Copy link
Contributor

@apovzner apovzner left a comment

Choose a reason for hiding this comment

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

Thanks for finding a way to fix this without changing Sensor and/or Metrics API. Looks great!

Copy link
Contributor

@rajinisivaram rajinisivaram left a comment

Choose a reason for hiding this comment

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

@dajac Thanks for the PR, LGTM. I will merge once you get a chance to address @apovzner 's comment.

}

public MetricConfig config() {
return this.configSupplier.get();
Copy link
Contributor

Choose a reason for hiding this comment

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

I guess if you are removing this. above, you could remove it here as well for consistency.

}

public MetricConfig config() {
return this.configSupplier.get();
Copy link
Contributor

Choose a reason for hiding this comment

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

I guess if you are removing this. above, you could remove it here as well for consistency.

@dajac
Copy link
Contributor Author

dajac commented Sep 14, 2020

@apovzner @rajinisivaram Thanks for your feedback. I have addressed your comments.

@rajinisivaram
Copy link
Contributor

@dajac Thanks for the update, test failures not related, merging to trunk.

@rajinisivaram rajinisivaram merged commit 94e61c3 into apache:trunk Sep 14, 2020
@dajac dajac deleted the kafka-10458 branch September 14, 2020 19:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants