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 #9930

Closed
wants to merge 81 commits into from
Closed

Conversation

jacobmarble
Copy link
Member

Backport of #9921 fixing #9904

jsternberg and others added 30 commits March 9, 2018 15:40
…-time-variable

Allow time variable to be case insensitive again
Support setting the log level through the environment variable
This commit fixes a parsing bug that was causing extra tags to be
generated when the incoming point contained escaped commas.

As an optimisation, the slice of tags associated with a point was
being pre-allocated using the number of commas in the series key as a hint to
the appropriate size. The hinting did not consider literal comma values in
the key though, and so it was possible for extra (empty) tag key and
value pairs to be part of the tags structure associated with a parsed
point.
Ensure correct number of tags parsed
(cherry picked from commit 4d93b04)
(cherry picked from commit ceefa7f)
This commit fixes a data race in the WAL, which can occur when writes
and deletes are being executed concurrently. The WAL uses a buffer pool
of `[]byte` when reading the WAL. WAL entries are unmarshaled into these
buffers and passed along to the relevant methods handling the different
types of entry (write, delete etc).

In the case of deletes, the keys that need to be deleted were being
stored for later processing, however these keys were part of the backing
array of initial buffer from the pool. As such, those keys could be
written to at a future time when handling other parts of the WAL.
* removed unused fieldset field

(cherry picked from commit 6cf6ae7)
…es-iterator

Remove error for series file when no shards exist
Updated CHANGELOG.md for 1.5.1 release date
backport: check for failure case where backup dir has no manifest files
jsternberg and others added 24 commits April 12, 2018 17:40
Fix the validation for multiple nested distinct calls
Backport #9785: Rename corrupt tsm files on load.
Previously, the task manager was modified to keep the query status so it
could track which queries were running and which ones were killed.
In those previous versions, we removed a task from the process table
as soon as it was killed and did not remove it after it had finished
executing. This meant there could be zombie goroutines running in the
background that were impossible to see.

When the task manager was updated to track the task status, we forgot to
expose the status in the public interface so consumers could see the
task status.
Include the query task status in the QueryInfo struct
Close TSMReaders from FileStore.Close after releasing FileStore mutex
When `top()` or `bottom()` were used and selected auxiliary values, they
would return the wrong values that would be equal to the last point
selected. This is because the aggregators saved the memory address of
the auxiliary fields instead of copying them over. Since the same
auxiliary fields memory location is used for every value returned by the
storage engine, this resulted in the values being incorrect because they
were overwritten with incorrect values.

This fixes that so the auxiliary fields are copied out when they are
saved rather than only the memory location.
…xiliary-values

Return the correct auxiliary values for top/bottom
This commit adds `debug-pprof-enabled` which will start the default
`net/http/pprof` endpoint and bind against `localhost:6060`. This
will help to debug startup performance issues.
Add optional pprof http endpoint immediately on startup.
Updated CHANGELOG;set a release date
The length check was backwards so if a series key was longer than
4096 bytes, it would cause a slice out of bounds panic.
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 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
@jacobmarble jacobmarble closed this Jun 1, 2018
@ghost ghost removed the review label Jun 1, 2018
@hercules-influx
Copy link
Contributor

During a run of megacheck the following issues were discovered:

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.

9 participants