Commit Graph

10115 Commits (fd840f242c7a3afc90e9198d68b4a97225f78299)

Author SHA1 Message Date
Ben Johnson fd840f242c Merge pull request #6463 from benbjohnson/optimize
Reduce interrupt iterator checks & field access
2016-04-26 13:16:28 -06:00
Ben Johnson 9ea2b505a6 Merge pull request #6470 from benbjohnson/remove-server-influxql
Remove SHOW SERVERS & DROP SERVER
2016-04-26 12:28:31 -06:00
Ben Johnson 1b6524a7bf
reduce interrupt iterator checks
The interrupt iterator currently introduces a non-trivial amount of
overhead to queries by checking for interrupts every 256 points.
This commit adjusts that check to every 5000 points.

There are also several places where nested field access has been
adjusted to minimize field lookups.
2016-04-26 12:16:07 -06:00
Ben Johnson 291dd08cd4
remove SHOW SERVERS & DROP SERVER
This commit removes support for `SHOW SERVERS` and `DROP SERVER`
from the `influxql` package. It also removes extraneous cluster
testing code from `cmd/influxd/run`.

Fixes #6465
2016-04-26 10:28:42 -06:00
Jason Wilder 9a3a52a37c Merge pull request #6361 from PierreF/cluster-pool-hang
Fix cluster/pool release of connection
2016-04-25 14:12:06 -06:00
Pierre Fersing 9f9a3fc98e Fix cluster/pool release of connection 2016-04-25 20:06:51 +02:00
Ben Johnson f608e4cdb0 Merge pull request #6462 from oldmantaiter/measurement-fields-deadlock
Add safer locking to CreateFieldIfNotExists
2016-04-25 11:07:33 -06:00
Tait Clarridge df0e16a92f Add safer unlock to CreateFieldIfNotExists
A deadlock can occur if the field was created while we were waiting for the lock.
2016-04-25 12:44:58 -04:00
Kostas Botsas c39ff515ca Merge pull request #6450 from influxdata/changelog-update-0122
Changelog update for 0.12.2
2016-04-25 19:18:36 +03:00
Kostas Botsas f8885a49ee removed duplicates from v0.13
removed duplicate GH PR's from v0.13 which were merged in v0.12
2016-04-25 15:48:05 +03:00
Jonathan A. Sternberg 40e234539b Merge pull request #6458 from otoolep/fix_cli_version
Make it clear when CLI version is unknown
2016-04-23 09:11:14 -04:00
Philip O Toole ed7229fa2d Make it clear when CLI version is unknown
This mimics the behavior of the database binary.
2016-04-22 21:35:42 -07:00
Edd Robinson 42a073b408 Merge pull request #6453 from influxdata/er-changelog
Attempt to use union merge strategy on CHANGELOG
2016-04-22 18:21:33 +01:00
Edd Robinson 23bb5d95a6 Attempt to use union merge strategy on CHANGELOG 2016-04-22 18:18:20 +01:00
Ben Johnson 9c1fa76f3c Merge pull request #6452 from benbjohnson/simple8b
update dep: simple8b @ b421ab40
2016-04-22 11:05:42 -06:00
Jonathan A. Sternberg 38bd0476ec Merge pull request #6409 from influxdata/js-4675-derivative-order-by-desc
Allow derivative() function to be used with ORDER BY desc
2016-04-22 12:38:19 -04:00
Jonathan A. Sternberg 9b6d5dfd78 Allow derivative() function to be used with ORDER BY desc
The derivative function had an arbitrary limitation that would cause it
to set the value to zero if the previous value was after the next value.
This caused all `ORDER BY desc` queries with `derivative()` to always
return zero values.

Fixes #4675.
2016-04-22 12:20:32 -04:00
Jonathan A. Sternberg b14ae2f41e Merge pull request #6435 from influxdata/js-6429-log-slow-queries
Log slow queries if they pass a configurable threshold
2016-04-22 12:20:06 -04:00
Jonathan A. Sternberg e28d16cfcf Log slow queries if they pass a configurable threshold
Fixes #6429.
2016-04-22 12:04:15 -04:00
Jonathan A. Sternberg b6beec4f57 Merge pull request #6411 from influxdata/js-3558-allow-math-in-where-clause
Pass binary expressions to the underlying query
2016-04-22 12:03:27 -04:00
Jonathan A. Sternberg c77cbb8389 Merge pull request #6375 from influxdata/js-6118-derivative-on-multiple-fields
Remove restrictions on where derivative can be used entirely
2016-04-22 12:02:01 -04:00
Ben Johnson 286072f65a
update dep: simple8b @ b421ab40 2016-04-22 09:46:05 -06:00
Jonathan A. Sternberg d55fb1b16f Merge pull request #6421 from influxdata/js-3883-sanitize-query
Improve query sanitization to prevent a password leak in the logs
2016-04-22 11:40:17 -04:00
Jonathan A. Sternberg d26e4e3650 Pass binary expressions to the underlying query
Binary math inside of a where condition was previously disallowed. Now,
these types of queries are just passed verbatim down to the underlying
query engine which can handle it.

We may want to revisit this when it comes to tags at some point as it
prevents the more efficient filtering of tags that a simple expression
allows, but it allows a query like this to be done:

    SELECT * FROM cpu WHERE value + 2 < 5

So while it can be better, this is a good initial implementation to
provide this functionality. There are very rare situations where a tag
may be used appropriately in one of these circumstances.

Fixes #3558.
2016-04-22 11:30:36 -04:00
Jonathan A. Sternberg 5070f69bb2 Merge pull request #6444 from influxdata/js-config-from-env-var
Allow setting the config path through an environment variable
2016-04-22 11:28:57 -04:00
Jonathan A. Sternberg 62c66b788c Improve query sanitization to prevent a password leak in the logs
Sanitizing is now done through pattern matching rather than parsing the
query and replacing the password in the query. This prevents
accidentally redacting the wrong part of a query and revealing what the
password is through association.

Fixes #3883.
2016-04-22 11:27:09 -04:00
Jonathan A. Sternberg 22a0505559 Remove restrictions on where derivative can be used entirely
This removes the previous restrictions that kept derivative as only
capable of being used in a single field and only at the top level.
This lets users determine how they want to use derivative more freely
and opens up the possibility of also using math between derivatives.

This may open up some problems when it comes to math between derivatives
as timestamps may not match correctly. That is likely a problem related
to any binary math to begin with though and can probably be ignored by
the derivatives. I'm also not sure it makes sense to perform any math
between a derivative and a difference or perform math between a
derivative and a mean.

Fixes #6118.
2016-04-22 11:17:23 -04:00
Jonathan A. Sternberg 9c09023508 Allow setting the config path through an environment variable
The config path previously could only be specified through the command
line options. This made it very difficult to set a default config path
without using any option.

Now the environment variable can be set so the default configuration
path is set to a specific place, but can be overwritten using the
command line option.

The primary purpose of this is so the Docker container can have a
default configuration file, but not have to parse the command line
options to figure out if a different configuration file has been
specified while still allowing the user to only type `influxd` and have
the program start correctly.

This might also help #6392 as it would allow a default configuration
location to be included with the package by setting an environment
variable.

A default search path is also provided now with checking the following
paths for a config file when none is specified:

* `~/.influxdb/influxdb.conf`
* `/etc/influxdb/influxdb.conf`

The config command has also been modified to read this config file
before outputting a sample config.
2016-04-22 09:33:53 -04:00
Edd Robinson d22af706bf Merge pull request #6448 from oiooj/pr-influxdb
fix cli writeColumns output
2016-04-22 14:04:53 +01:00
Kostas Botsas d56ec7ef8a Changelog for 0.12.2
Updated Changelog with details for 0.12.2
2016-04-22 14:21:00 +03:00
kun 82a4b5e7b1 fix cli writeColumns output 2016-04-22 18:25:14 +08:00
Ben Johnson 8c232f311b Merge pull request #6432 from benbjohnson/optimize-float-decoder
Optimize tsm1.FloatDecoder
2016-04-21 10:47:02 -06:00
Jason Wilder c71ee4f9b8 Merge pull request #6436 from influxdata/jw-reportcard
README changes
2016-04-21 10:30:29 -06:00
Ben Johnson d204a8b683
optimize tsm1.FloatDecoder
This commit changes the `FloatDecoder.val` from a `float64` type
to a `uint64` to avoid an additional type conversion during read.
Now the type gets converted to a `float64` only on call to `Values()`.
2016-04-21 08:49:12 -06:00
Jason Wilder 685e945dee Fix README issues
* Remove clustering notes
* Update doc links
2016-04-21 08:32:00 -06:00
Jason Wilder d6e1d97659 Add goreportcard badge 2016-04-20 16:58:47 -06:00
Jason Wilder fc948b4e50 Merge pull request #6186 from influxdata/jw-allocs
Write path tuning
2016-04-20 16:49:23 -06:00
Jason Wilder 4b32760dac Use stdlib func instead of scanning slices 2016-04-20 16:08:58 -06:00
Jason Wilder 87ceb7426a Don't lock the cache while adding entries
Entries have their own locking so the cache doesn't need to be lock
when adding to them.
2016-04-20 16:08:58 -06:00
Jason Wilder 89aeaafd50 Re-use the string point key 2016-04-20 16:08:58 -06:00
Jason Wilder 49492edd57 Default fields slice size 2016-04-20 16:08:54 -06:00
Jason Wilder 8741159229 Don't allocate a new string when unescaping 2016-04-20 16:00:26 -06:00
Jason Wilder fbaa7db54f Don't lock entry when scanning new values to add 2016-04-20 16:00:26 -06:00
Jason Wilder fde5576d64 Avoid allocations when no escape chars present 2016-04-20 16:00:26 -06:00
Jason Wilder 108f589714 Merge pull request #6427 from influxdata/jw-config-uints
Fix setting uint config options via env vars
2016-04-20 14:57:43 -06:00
Jason Wilder caa9592163 Fix setting uint config options via env vars 2016-04-20 14:38:08 -06:00
Jason Wilder bfa225f149 Merge pull request #6430 from influxdata/jw-cache-load-size
Disable cache max memory size when reloading the cache
2016-04-20 14:35:23 -06:00
Jason Wilder 7aefe1e889 Make TestTime_Elapsed less flaky
This test fails sometimes because the elapsed time is 1.999s which
is less than 2s, but very close to 2s to not matter.
2016-04-20 14:13:32 -06:00
Stephen Gutekanst 9dc09c5257 Make logging output location more programmatically configurable (#6213)
This has various benefits:

- Users embedding InfluxDB within other Go programs can specify a different logger / prefix easily.
- More consistent with code used elsewhere in InfluxDB (e.g. services, other `run.Server.*` fields, etc).
- This is also more efficient, because it means `executeQuery` no longer allocates a single `*log.Logger` each time it is called.
2016-04-20 21:07:08 +01:00
Jason Wilder f679787080 Disable cache max memory size when reloading the cache
The cache max memory size is an approximate size and can prevent a
shard from loading at startup.  This change disable the max size
at startup to prevent this problem and sets the limt back after
reloading.

Fixes #6109
2016-04-20 10:41:30 -06:00