-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Tsdb/compaction #5783
Tsdb/compaction #5783
Conversation
… InclusiveBounds helper
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.
just one minor suggestion but overall it looks great!
pkg/storage/tsdb/index/builder.go
Outdated
) | ||
} | ||
|
||
func (i Identifier) Combine(parentDir string) string { |
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.
Should we call it Filepath
or BuildFilepath
?
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.
Yeah, I like that better. Will fix.
This PR introduces a first pass at a TSDB compactor. It also standardizes the names of TSDB files to the format
"index-${from}-${through}-${checksum}.tsdb"
. It combines multiple TSDB files and dedupes their contents where appropriate.To do this, I've added a
Checksum() uint32
method where appropriate (IndexReader
andTSDBIndex
).For added performance, I also moved the
[]ChunkMetas
pool into the underlyingtsdb/index
package although it's still exported and used by thetsdb
package as well as theindex
package now.ref #5428