Ingester block lifetime changes#628
Merged
mdisibio merged 20 commits intografana:masterfrom Apr 9, 2021
Merged
Conversation
…void high mem usage in Min.IO client (s3)
joe-elliott
reviewed
Apr 6, 2021
Collaborator
joe-elliott
left a comment
There was a problem hiding this comment.
Have some initial thoughts. It makes sense to me to move the "LocalBlock" and related functionality inside the /tempodb/wal package and provide methods for the ingester/instance to use.
…nted for all backends except local for now
joe-elliott
reviewed
Apr 7, 2021
Collaborator
joe-elliott
left a comment
There was a problem hiding this comment.
Thank you for the changes. This is definitely getting closer.
Some mild refactoring comments, but other than that I'm really liking where this is.
joe-elliott
approved these changes
Apr 9, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does:
This PR redoes some of the block lifecycle on the ingester to improve stability and startup times.
Previously the ingester would convert the WAL into a CompleteBlock which persisted the data on disk but kept the index and bloom filters in memory. After a restart the blocks would have to be recreated from the WALs since memory was lost, which caused both heavy performance hit on startup, but also an inability to query data that had been flushed but no longer in the WAL.
Now the ingester uses a local backend mounted under /wal/blocks. The WAL is flushed to this local backend first, which fully persists the data/index/bloom, etc. Then it is flushed to the remote backend. On restart any existing blocks are simply reloaded and the ingester resumes where it was. The flushed state of a local block is persisted with a timestamp in a dedicated
flushedfile.No configuration or hosting changes are needed. The local backend is mounted under /wal/blocks/ by reusing the existing wal storage location, and it also uses the existing block encoding/downsampling/flushing options.
Which issue(s) this PR fixes:
#633
Checklist
CHANGELOG.mdupdated - the order of entries should be[CHANGE],[FEATURE],[ENHANCEMENT],[BUGFIX]