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

TSI Index Migration Tool #8669

Merged
merged 1 commit into from
Aug 16, 2017

Conversation

benbjohnson
Copy link
Contributor

@benbjohnson benbjohnson commented Aug 7, 2017

Overview

This adds an inmem2tsi command to influx_inspect that allows for the conversion of an in-memory index to a TSI index. The index is written to a temporary location until complete and then moved to its permanent location. If any error occurs then it will fallback to the in-memory index.

This is not intended as a hot shard conversion. New shards can be set to use TSI as their new index and old shards can be converted as needed. A server restart is required after a shard is converted.

Example

$ influx_inspect inmem2tsi -path ~/.influxdb/data/stress/autogen/1 ~/.influxdb/wal/stress/autogen/1
Required for all non-trivial PRs
  • Rebased/mergable
  • Tests pass
  • CHANGELOG.md updated
Required only if applicable
  • Provide example syntax
  • Update man page when modifying a command
  • InfluxData Documentation: issue filed or pull request submitted <link to issue or pull request>

@benbjohnson benbjohnson force-pushed the 1392-tsi-index-migration branch 2 times, most recently from 7f642da to 455e142 Compare August 7, 2017 21:27
Copy link
Contributor

@jwilder jwilder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One question. Looks good though.

cmd.Logger.Info("iterating over measurements")

// Iterate over each series & insert into new index.
for _, name := range inmemIndex.MeasurementNames() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there is a ForEachMeasurementName func that exist that does the same as this new method? Any reason to not re-use that one?

@benbjohnson benbjohnson merged commit c4e2ba2 into influxdata:master Aug 16, 2017
@benbjohnson benbjohnson deleted the 1392-tsi-index-migration branch August 16, 2017 15:16
@dazoot
Copy link

dazoot commented Aug 17, 2017

Can the conversion be ran while influxdb is running ?

@benbjohnson
Copy link
Contributor Author

No, this tool is for offline conversion. The idea is to switch new shards to TSI and then do old shard conversion offline if necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants