-
Notifications
You must be signed in to change notification settings - Fork 806
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
Move tenant-deletion-mark to a global dir #5676
Move tenant-deletion-mark to a global dir #5676
Conversation
@harry671003 I wonder why having the marker in the global dir can help us clean up tenants faster. Can you help elaborate more on it? IIUC, making it a global dir is easier to iterate through the specific folder and finding all tenants deletion marker. But Idk why it helps clean up faster. |
I meant to say, that we no longer have to keep the tenant active with only the Let's say we have 2 tenants in a s3 bucket:
After we delete tenant2, there will still be the
If we have a lot of deleted users, they will still be kept around for upto the
StoreGateways will no longer have to discover the deleted tenants with only the |
Since we move the tenant deletion marker to another path, I think we need to add another configuration to caching bucket to cache the global tenant deletion marker path accordingly. https://github.com/cortexproject/cortex/blob/master/pkg/storage/tsdb/caching_bucket.go#L131 |
Signed-off-by: 🌲 Harry 🌊 John 🏔 <[email protected]>
Signed-off-by: 🌲 Harry 🌊 John 🏔 <[email protected]>
Signed-off-by: 🌲 Harry 🌊 John 🏔 <[email protected]>
c96836a
to
c3503fd
Compare
Signed-off-by: 🌲 Harry 🌊 John 🏔 <[email protected]>
Since I'm not changing the suffix, the new path should also be cached here: https://github.com/harry671003/cortex/blob/master/pkg/storage/tsdb/caching_bucket.go#L186 |
LGTM |
What this PR does:
tenant_cleanup_delay
is large (say 24h), a deleted tenant can be continued to be synced by the store-gateways.s3://<bucket>/<tenantID>/markers/tenant-deletion-mark.json
will be kept for 24h after the tenant has been deleted.tenant-deletion-mark.json
to a global markers directory.s3://<bucket>/__markers__/<tenantID>/tenant-deletion-mark.json
__markers__
is treated as special an no tenants are allowed to have that name.tenant_cleanup_delay
.Which issue(s) this PR fixes:
Fixes #5674 and #5675
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]