ValidateGroupBy was returning an error if a tag does not exist
but it appears that function was supposed to be validating that
a field name was not used as a group by field.
Fixes#3326
Any literal values in a math query e.g. the '2' in 'value * 2' are
stored as float64, so all other values must be cast to this type. This
does mean that precision may be lost if the integer values are greater
than 2^53.
This commit adds a cursor that wraps multiple `tsdb.Cursor` objects
and streams them out as one cursor. The multi-cursor automatically
dedupes keys by using the first cursor specified in the argument
list.
This allows all config variable to be set via environment variables using
a similar naming convention for the toml config. For example, to change the
HTTP API port using the config, you would set:
[http]
bind-address = ":8086"
To change it with an environment variable, you would use:
HTTP_BIND_ADDRESS=":8086" influxd
The section name is used as the env variable prefix and the config key
name is the suffix. The only change to the config name is that "-" should
be replaced with "_" to avoid shell interpretation issues.
This makes it much easier to configure docker instances within a docker container
or adhoc instances at the command-line.
For slice config sections like graphite, you can currently only override the first
entry since the default config only has 1 entry. To do that use, GRAPHITE_0 as the
prefix. You cannot currently add new entries like GRAPHITE_1. A future PR might
address this issue.
The environment variable values should be the same as the config values.
The order that configuration values are applied is as follows:
* Default config
* Config file
* Environment variables
* Command-line arguments
Fixes#3246
When starting a influxd in a docker container, the processess needs to know
the hosts address and port in order to create its NodeInfo correctly. -hostname
previously only allowed us to change the hostname and the port would always be 8088
which may not be correctly if running multiple containers on the same host.
This commit fixes issues found from using a more complex `testing/quick`
implementation of the `WriteIndex()` test. The newer test inserts
multiple sets of random data that's confined to a smaller random space
so there's more chance of overlapping data.
The fixes were primarily around inserting old data or inserting the same
timestamp multiple times for a single write. The block splitting was not
working correctly before and the sorting and deduping was not handled
correctly.
A short write has occurred and we do not have enough bytes to determine
the size of the payload. This is corrupted record that we should drop.
Instead of panicing, log the error and advance the queue since the error
at this location is unreoverable currently.
Fixes#3436
Newlines in a string field would cause the parser to return
the line prematurely causing "unbalanced quotes" errors. This
makes the line scanning aware of quote fields so that the whole
line is returned.
Fixes#3545