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

Ensure that Cache options are reloaded when consul reload is performed #8552

Merged

Conversation

pierresouchay
Copy link
Contributor

This will apply cache throttling parameters are properly applied:

  • cache.EntryFetchMaxBurst
  • cache.EntryFetchRate

When values are updated, a log is displayed in info.

This will help to mitigate #7863 when values need to be updated without any downtime of agents

…med.

This will apply cache throttling parameters are properly applied:
 * cache.EntryFetchMaxBurst
 * cache.EntryFetchRate

When values are updated, a log is displayed in info.
Copy link
Contributor

@dnephin dnephin left a comment

Choose a reason for hiding this comment

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

Thank you for the PR! This looks like an excellent addition. One suggestion inline, and a test case for reloading would be great.

A test case in agent/cache/cache_test.go could create a cache, register a MockType, create an entry with Get, then call ReloadOptions, and check that the limiter on the entry has the new values by calling Limit() and Burst().

agent/cache/cache.go Outdated Show resolved Hide resolved
@pierresouchay
Copy link
Contributor Author

@dnephin All Done

@dnephin dnephin added backport/1.8 theme/agent-cache Agent Cache type/enhancement Proposed improvement or new feature labels Aug 28, 2020
Copy link
Contributor

@dnephin dnephin left a comment

Choose a reason for hiding this comment

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

LGTM!

@dnephin dnephin merged commit 72bf350 into hashicorp:master Aug 28, 2020
@hashicorp-ci
Copy link
Contributor

🍒✅ Cherry pick of commit 72bf350 onto release/1.8.x succeeded!

hashicorp-ci pushed a commit that referenced this pull request Aug 28, 2020
…onfig

Ensure that Cache options are reloaded when `consul reload` is performed
@dnephin
Copy link
Contributor

dnephin commented Aug 28, 2020

Oh, I forgot we need to add a changelog entry for this! Hans has some example of how to do that here #8387 if you don't mind adding it.

pierresouchay added a commit to pierresouchay/consul that referenced this pull request Aug 28, 2020
@pierresouchay
Copy link
Contributor Author

Oh, I forgot we need to add a changelog entry for this! Hans has some example of how to do that here #8387 if you don't mind adding it.

@dnephin Done in #8586

dnephin added a commit that referenced this pull request Aug 28, 2020
hashicorp-ci pushed a commit that referenced this pull request Aug 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme/agent-cache Agent Cache type/enhancement Proposed improvement or new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants