Skip to content

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

Merged
dnephin merged 5 commits into
hashicorp:masterfrom
pierresouchay:reload_cache_throttling_config
Aug 28, 2020
Merged

Ensure that Cache options are reloaded when consul reload is performed#8552
dnephin merged 5 commits into
hashicorp:masterfrom
pierresouchay:reload_cache_throttling_config

Conversation

@pierresouchay
Copy link
Copy Markdown
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
Copy Markdown
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().

Comment thread agent/cache/cache.go Outdated
@pierresouchay pierresouchay force-pushed the reload_cache_throttling_config branch from 6ad861e to 879d087 Compare August 27, 2020 11:45
@pierresouchay
Copy link
Copy Markdown
Contributor Author

@dnephin All Done

@pierresouchay pierresouchay requested a review from dnephin August 28, 2020 11:30
@dnephin dnephin added backport/1.8 theme/agent-cache Agent Cache type/enhancement Proposed improvement or new feature labels Aug 28, 2020
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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