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

buildtsi: Do not escape measurement names #9931

Merged
merged 1 commit into from
Jun 5, 2018
Merged

Conversation

jacobmarble
Copy link
Member

Backport of #9921 fixing #9904

@jacobmarble jacobmarble added this to the 1.5.4 milestone Jun 1, 2018
@jacobmarble jacobmarble self-assigned this Jun 1, 2018
@ghost ghost added the review label Jun 1, 2018
@hercules-influx
Copy link
Contributor

During a run of megacheck the following issues were discovered:

When `influx_inspect buildtsi` is used to create a new `tsi1` index, spaces in measurement names are escaped, so measurement "a b" is changed to "a\ b".

This change modifies `models.ParseKeyBytes()` and `models.ParseName()` to unescape measurement names. `models.ParseKeyBytes()` returns unescaped tag keys, so this seems like the natural place to unescape measurement names.

Also followed `scanMeasurement()` to see what other code could be problematic, and this should be everything (the result of one other use of `scanMeasurement()` is later escaped).

Removed `tsdb.MeasurementFromSeriesKey()`. These methods are exported, so checked for side effects in other InfluxData repositories.
@jacobmarble jacobmarble merged commit 56da43d into 1.5 Jun 5, 2018
@ghost ghost removed the review label Jun 5, 2018
@jacobmarble jacobmarble deleted the jgm-1.5-escape branch June 5, 2018 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants