-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Streaming inmem2tsi conversion. #8963
Streaming inmem2tsi conversion. #8963
Conversation
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.
LGTM but I got a bit confused about exactly what datadir
and waldir
should be. Maybe some clarification on the flag descriptions would help?
// Check if shard already has a TSI index. | ||
indexPath := filepath.Join(path, "index") | ||
indexPath := filepath.Join(dataDir, "index") |
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.
This confused me because in your flags section you have "data directory"
and "wal directory"
, which I interpreted as ~/.influxdb/data
and ~/.influxdb/wal
. I guess by data and wal directories you mean the data and wal database directories?
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.
I added clarification in 22a0e42.
} | ||
|
||
switch t := entry.(type) { | ||
case *tsm1.WriteWALEntry: |
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.
I think this will create an inconsistent index because it will index everything in the WAL when there could be deletes stored later. Maybe instead, use the CacheLoader
to re-create a Cache
and iterate over the keys that still remain in the cache?
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.
I switched it to use the tsm1.CacheLoader
instead in 22a0e42. Can you take a look?
d4e34da
to
759151e
Compare
Changes the `influx_inspect inmem2tsi` tool to stream each TSM/WAL file and convert to a TSI index instead of loading the entire shard's in-memory index first.
759151e
to
5af2d73
Compare
Overview
Changes the
influx_inspect inmem2tsi
tool to stream each TSM/WAL file and convert to a TSI index instead of loading the entire shard's in-memory index first.Required for all non-trivial PRs