-
Notifications
You must be signed in to change notification settings - Fork 520
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
Prune in-memory blocks from missing tenants #314
Prune in-memory blocks from missing tenants #314
Conversation
265a18a
to
3ee6ac7
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.
Thanks for working on this @dgzlopes! I've left some comments.
To add to Annanay's comments, I would like a test that covers this. Please just ask if you'd like some guidance on building a test, I know they're a little intense at the moment. |
Moved the code into a Okey @joe-elliott! I'm diving into the tests, and well, they look fun. I'll |
Signed-off-by: Daniel González Lopes <danielgonzalezlopes@gmail.com>
Signed-off-by: Daniel González Lopes <danielgonzalezlopes@gmail.com>
Signed-off-by: Daniel González Lopes <danielgonzalezlopes@gmail.com>
3abfe92
to
4525eaf
Compare
Added a test. I'm not sure if it's OK... it's my first test in Go 😄 I re-used TestRetention code, but this time before calling |
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.
Nice work on the tests. Had a couple of suggestions for improvements and it looks like the linter is mad at you.
Signed-off-by: Daniel González Lopes <danielgonzalezlopes@gmail.com>
Signed-off-by: Daniel González Lopes <danielgonzalezlopes@gmail.com>
Signed-off-by: Daniel González Lopes <danielgonzalezlopes@gmail.com>
Signed-off-by: Daniel González Lopes <danielgonzalezlopes@gmail.com>
Signed-off-by: Daniel González Lopes <danielgonzalezlopes@gmail.com>
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.
Basically just looking for some tests directly targeting the cleanMissingTenants
method. Leave the existing test and add a TestCleanMissingTenants()
test that directly exercises this method.
After that should be ready to go!
Signed-off-by: Daniel González Lopes <danielgonzalezlopes@gmail.com>
Signed-off-by: Daniel González Lopes <danielgonzalezlopes@gmail.com>
Signed-off-by: Daniel González Lopes <danielgonzalezlopes@gmail.com>
Thanks a lot for the patience and the exhaustive review @joe-elliott :) Fixed the nit and added the test for |
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.
nice work @dgzlopes
Thanks!
I believe I need to dismiss this to merge? It says merging is blocked due to changes requested, but it seems like all changes are resolved?
What this PR does:
If a tenant disappears blocks are pruned from the in-memory blocklist.
Which issue(s) this PR fixes:
Fixes #285
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]