-
Notifications
You must be signed in to change notification settings - Fork 522
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
Delete the index for empty tenants #2678
Conversation
56301a1
to
0d2f834
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.
Nice cleanup. I think all of the real object stores will "delete" the tenant folder when the last item is removed (i.e. index.json.gz). Will this be a problem for the local
backend? It might be used in some cases for non-production setups. The local-blocks
processor and the ingester also use a local
backend but not with polling so they should be ok.
The |
The tenant index deletion was originally put in as TCO win, but did not have the desired effect and surfaced other issues in the system. Related grafana#2678 Related grafana#2754 Related grafana#2781 Related grafana#2878 Related grafana#3115 Related grafana#3223 Due to the number of issues here, and causing considerable noise on the pager, perhaps the right thing to do is back out the tenant deletion. Raising here for discussion.
What this PR does:
When a tenant stops writing to tempo, the blocks eventually get cleaned up by the retention, but the tenant index is still left and so the tenant is still left in the list when the poller determines which indexes to pull. This can create additional load for no benefit long term if the tenant doesn't return with traffic.
Here we call the recently implemented
Delete
on theRawWriter
to remove the tenant indexes from the backend to complete the deletion of all tenant objects when no blocks or compacted blocks have been found to exist.Which issue(s) this PR fixes:
Fixes #2520
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]