Skip to content

feat: when using sqlite for storing delete requests, use the stored completion time to reduce the requests considered for querytime filtering #16600

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

Merged
merged 2 commits into from
Mar 6, 2025

Conversation

sandeepsukhani
Copy link
Contributor

What this PR does / why we need it:
The compactor continues to do query time filtering of delete requests even after they have been marked as processed. Ideally, it should stop query time filtering of requests that have been in the processed state for a while to let the index updates propagate to the indexgateways. However, boltdb did not have the timestamp for when the request was processed, and it was hard to introduce it.

We recently added support for `SQLite' as a database for storing delete requests, which also stores their completion time. This PR adds support for eliminating delete requests from query time filtering if it's been a while since they were marked as processed. This should reduce some resource usage on the compactor and queries by eliminating unnecessary work.

Checklist

  • Tests updated
…ion time to reduce the requests considered for querytime filtering
@sandeepsukhani sandeepsukhani requested a review from paul1r March 6, 2025 10:38
@sandeepsukhani sandeepsukhani requested a review from a team as a code owner March 6, 2025 10:38
@sandeepsukhani sandeepsukhani merged commit 3277321 into main Mar 6, 2025
60 checks passed
@sandeepsukhani sandeepsukhani deleted the sqlite-limit-requests-for-querytime-filtering branch March 6, 2025 15:18
JoaoBraveCoding pushed a commit to JoaoBraveCoding/loki that referenced this pull request Mar 12, 2025
…ompletion time to reduce the requests considered for querytime filtering (grafana#16600)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2 participants