-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
store: Add Groupcache as a cache backend #4818
Conversation
eb6b62d
to
14247ce
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.
Seems like you have some unrelated changes here? Could you please rebase on main and don't forget the DCO ;P
Okay, I was hoping you won't see this. 😆 |
Signed-off-by: Giedrius Statkevičius <[email protected]>
14247ce
to
b7bc057
Compare
Signed-off-by: akanshat <[email protected]>
Signed-off-by: akanshat <[email protected]>
Signed-off-by: akanshat <[email protected]>
b7bc057
to
87e8f64
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.
Looks good, just need to convert to https://github.com/vimeo/galaxycache now + add some e2e tests together with metrics? 😄
I am planning to make groupcache work properly first, and write a test for it too. Then I want to convert it to galaxycache. |
Signed-off-by: akanshat <[email protected]>
Signed-off-by: akanshat <[email protected]>
Signed-off-by: akanshat <[email protected]>
Signed-off-by: akanshat <[email protected]>
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.
After converting those two methods to have a pointer as the receiver, the metrics appear and I now see the following error when running the e2e tests:
unexpected error: unable to find metrics [thanos_cache_groupcache_hits_total] with expected values after 50 retries. Last error: <nil>. Last values: [31]
This is probably because Store "refreshed" the view of blocks asynchronously hence increasing that counter (:
@GiedriusS What did you mean by |
ch <- prometheus.MustNewConstMetric(s.gets, prometheus.CounterValue, float64(stats.Gets.Get())) And so on, I think. |
Signed-off-by: akanshat <[email protected]>
Awesome feature! I am headache in lots of memcache timeout log, groupcache will save me 😄 |
test/e2e/store_gateway_test.go
Outdated
}, | ||
) | ||
|
||
testutil.Ok(t, store1.WaitSumMetricsWithOptions(e2e.Greater(0), []string{`thanos_cache_groupcache_loads_total`})) |
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.
Lets check for the generic metrics we check in memcached test here as well.
Signed-off-by: Giedrius Statkevičius <[email protected]>
Signed-off-by: Giedrius Statkevičius <[email protected]>
Signed-off-by: Giedrius Statkevičius <[email protected]>
Signed-off-by: akanshat <[email protected]>
Signed-off-by: akanshat <[email protected]>
Adds TTL support to galaxycache as per this pull request: thanos-community/galaxycache#1 Signed-off-by: Giedrius Statkevičius <[email protected]>
Signed-off-by: akanshat <[email protected]>
Signed-off-by: akanshat <[email protected]>
Signed-off-by: akanshat <[email protected]>
Signed-off-by: akanshat <[email protected]>
Signed-off-by: akanshat <[email protected]>
Signed-off-by: akanshat <[email protected]>
move cache TTLs to a struct
cache: add TTL support
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.
It became a big PR in the end but we've done it in small iterations so it's all good 🎉
Dockerfile.multi-stage
Outdated
@@ -1,6 +1,6 @@ | |||
# By default we pin to amd64 sha. Use make docker to automatically adjust for arm64 versions. | |||
ARG BASE_DOCKER_SHA="14d68ca3d69fceaa6224250c83d81d935c053fb13594c811038c461194599973" | |||
FROM golang:1.16-alpine3.12 as builder | |||
FROM golang:1.17-alpine3.15 as builder |
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.
This change also seems unrelated. Probably just needs a rebase since this exact version is used in main
. Or you can do git merge origin/main
to avoid rewriting the history. I'd prefer that ;P
…cket Signed-off-by: akanshat <[email protected]>
Signed-off-by: Giedrius Statkevičius <[email protected]>
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.
🎉 🎉 🎉
#5037 made this to track the next steps
Signed-off-by: Giedrius Statkevičius <[email protected]>
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.
Just made some random changes to make the linters happy, I hope you don't mind 👍
Thanks! |
Only docs are failing so I'll merge with admin rights 🎉 |
Changes
Verification
Existing tests passed.