A preallocated slice needs to be cleared to be used with append,
otherwise the existing elements will be seen in the result and this does
not appear to be the intention. The bug doesn't seem to have caused
issues as no callsites use a preallocated slice.
Go tip now enforces that strconv.ParseFloat receives a bitSize parameter
of 32 or 64. Previously, any value that was not 32, was treated as 64.
The previous value of 10 was likely a copy-paste error from integer
parsing.
These APIs require a measurement, permitting an additional optimization
to reduce the search space against the TSM index. Specifically, the
search key prefix is extended from `org+bucket` to
`org+bucket,\x00=<measurement>`
* MeasurementNames
* MeasurementTagKeys
* MeasurementTagValues
* Adds an api to the models package for efficiently parsing the
measurement tag (\x00) from a normalized series key
The behavior of the line-protocol parser remains unchanged. This PR
moves the functions to a struct in order to simplify the tracking of
limits whilst parsing a request.
Limits may be set using the ParsePointsWithOptions API and the
associated WithParser functional options, all of which are documented.
It should be noted that the behavior of ParsePointsWithPrecision remains
unchanged.
ParsePointsWithPrecisionV1 was no longer used and removed to simplify
code.
This API is a benefit when the caller is only interested in parsing
tags and reusing an existing Tags buffer. It will be used by the
storage schema APIs.
We will want to validate that all tag key/value data is valid unicode.
This commit changes the validation helper to only validate provided
tags, since measurements are currently very likely to contain invalid
utf-8 characters.
There are two exceptions to the tag validation: the validation of the
special tag keys for measurements and field keys.
I did this with a dumb editor macro, so some comments changed too.
Also rename root package from platform to influxdb.
In interest of minimizing risk, anyone importing the root package has
now aliased it to "platform" so that no changes beyond imports were
necessary in those files.
Lastly, replace the old platform module to local path /dev/null so that
nobody can accidentally reintroduce a platform dependency while
migrating platform code to influxdb.
Type conflicts should be rare, but when they do happen, printing out the
string name should save developers a couple minutes of digging compared
to looking up which numeric value means which type.