Skip to content
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

fix: do not retain copy of chunk while indexing a new chunk in tsdb while processing delete requests #15541

Merged
merged 1 commit into from
Jan 2, 2025

Conversation

sandeepsukhani
Copy link
Contributor

What this PR does / why we need it:
We might have new chunks created while processing delete requests, especially with line filters. The new chunks are then indexed for discoverability. The thing to note here is that TSDB index is not built incrementally and requires all the data at once to build it. This TSDB limitation caused us to batch the updates, which in this case, resulted in increased memory usage due to erroneously retaining a copy of a chunk instead of just the metadata. This PR fixes the issue by batching chunk metas instead of whole chunks.

@sandeepsukhani sandeepsukhani requested a review from a team as a code owner December 24, 2024 05:26
@sandeepsukhani sandeepsukhani merged commit ff19955 into main Jan 2, 2025
60 checks passed
@sandeepsukhani sandeepsukhani deleted the compactor-index-chunk-do-not-retain-copy branch January 2, 2025 04:29
mveitas pushed a commit to mveitas/loki that referenced this pull request Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants