-
Notifications
You must be signed in to change notification settings - Fork 461
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
Bump frontend results cache version #1631
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks.
02935cd
to
3789db9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Neat approach, I like it.
What the thought process for downgrading? Or more commonly, rolling back in a panic scenario. You could argue that there is no need to invalidate when going back a version, but I don't think it is worth spending time on.
[nit] Would it be worth somehow better highlighting cache invalidation in the CHANGELOG? Do we have a convention for putting important notices at the top of the file? It is definitely something an operator will want to be aware of when rolling out the release. I'm imagining the scenario: "queries got slower after I rolled out xyz.."
Downgrading version doesn't require any extra thoughts, the previous keys might still be there (or maybe not, if they were evicted by memcached's decision) but key space is disjoint so nothing special is required.
I've added it at |
Added a cache.Versioned wrapper and used it to bump the frontend's result cache version, which is needed to invalidate results that might have been cached by a previous version of the code. Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
7a31120
to
cee995f
Compare
What this PR does
Added a cache.Versioned wrapper and used it to bump the frontend's result cache version, which is needed to invalidate results that might have been cached by a previous version of the code.
Which issue(s) this PR fixes or relates to
Fixes #1625
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]