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

fix(vault): resurrect positive results in lru cache for ttl + resurrect ttl #11815

Merged
merged 1 commit into from
Oct 26, 2023

Conversation

bungle
Copy link
Member

@bungle bungle commented Oct 23, 2023

Summary

The vault is rotating secrets on every minute which updates the shared dictionary cache with new values, both negative and positive results. This commit changes the Negative results handling on LRU. Previously the LRU was cleared for negative results, and we just used to cache for config.ttl amount of time. This commit changes it so that LRU values are deleted, and we cache things config.ttl + config.resurrect_ttl amount of time in lru cache too.

It was reported by @Hayk-S on KAG-2833.

Checklist

  • The Pull Request has tests
  • A changelog file has been created under changelog/unreleased/kong or skip-changelog label added on PR if changelog is unnecessary. README.md
  • There is a user-facing docs PR against https://github.com/Kong/docs.konghq.com - PUT DOCS PR HERE

@bungle bungle added this to the 3.5.0 milestone Oct 23, 2023
@bungle bungle force-pushed the fix/vault-resurrect-ttl branch from 203adf5 to b52a018 Compare October 25, 2023 11:48
@pull-request-size pull-request-size bot added size/L and removed size/S labels Oct 25, 2023
@bungle bungle force-pushed the fix/vault-resurrect-ttl branch from b52a018 to 6809d08 Compare October 25, 2023 11:48
@bungle bungle marked this pull request as ready for review October 25, 2023 11:57
@bungle bungle force-pushed the fix/vault-resurrect-ttl branch from 6809d08 to e46e1d6 Compare October 25, 2023 12:07
@bungle bungle requested a review from jschmid1 October 25, 2023 12:17
@bungle bungle force-pushed the fix/vault-resurrect-ttl branch 3 times, most recently from 531bca0 to 9ff8910 Compare October 25, 2023 19:17
…ct ttl

### Summary

The vault is rotating secrets on every minute which updates the shared dictionary
cache with new values, both negative and positive results. This commit changes the
Negative results handling on LRU. Previously the LRU was cleared for negative
results, and we just used to cache for config.ttl amount of time. This commit changes
it so that LRU values are deleted, and we cache things config.ttl +
config.resurrect_ttl amount of time in lru cache too.

It was reported by @Hayk-S on KAG-2833.

Signed-off-by: Aapo Talvensaari <[email protected]>
@bungle bungle force-pushed the fix/vault-resurrect-ttl branch from 9ff8910 to 09d5d36 Compare October 26, 2023 04:49
@bungle bungle requested a review from jschmid1 October 26, 2023 08:13
Copy link
Contributor

@jschmid1 jschmid1 left a comment

Choose a reason for hiding this comment

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

@fffonion approved the EE part. approving this one as well

@bungle bungle merged commit 1b6c394 into master Oct 26, 2023
23 checks passed
@bungle bungle deleted the fix/vault-resurrect-ttl branch October 26, 2023 08:46
team-gateway-bot pushed a commit that referenced this pull request Oct 26, 2023
…ct ttl (#11815)

### Summary

The vault is rotating secrets on every minute which updates the shared dictionary
cache with new values, both negative and positive results. This commit changes the
Negative results handling on LRU. Previously the LRU was cleared for negative
results, and we just used to cache for config.ttl amount of time. This commit changes
it so that LRU values are deleted, and we cache things config.ttl +
config.resurrect_ttl amount of time in lru cache too.

It was reported by @Hayk-S on KAG-2833.

Signed-off-by: Aapo Talvensaari <[email protected]>
(cherry picked from commit 1b6c394)
bungle added a commit that referenced this pull request Oct 26, 2023
…ct ttl (#11815)

### Summary

The vault is rotating secrets on every minute which updates the shared dictionary
cache with new values, both negative and positive results. This commit changes the
Negative results handling on LRU. Previously the LRU was cleared for negative
results, and we just used to cache for config.ttl amount of time. This commit changes
it so that LRU values are deleted, and we cache things config.ttl +
config.resurrect_ttl amount of time in lru cache too.

It was reported by @Hayk-S on KAG-2833.

Signed-off-by: Aapo Talvensaari <[email protected]>
(cherry picked from commit 1b6c394)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants