Commit Graph

11287 Commits (637a67ea353ec538356d8e46b37ce535f5f14245)

Author SHA1 Message Date
Jason Wilder 7f1f1b002d Highly new query features 2016-10-31 12:47:36 -06:00
Jonathan A. Sternberg 6f57448b73 Merge pull request #7549 from influxdata/js-7548-show-queries-shows-wrong-units
Fix output duration units for SHOW QUERIES
2016-10-31 13:27:34 -05:00
Jonathan A. Sternberg ce1831160d Fix output duration units for SHOW QUERIES
The previous version was showing the microseconds unit when it was
outputting nanoseconds. Now we correctly identify which sub-second unit
to use (milliseconds, microseconds, or nanoseconds) and use the correct
unit while dividing the duration unit correctly to produce the correct
output.

Also updated to use the default duration string instead of our own
custom formatters. It turns out that the string method for
`time.Duration` does the correct thing as long as we truncate the value
first.
2016-10-31 12:48:01 -05:00
Jason Wilder 97ba0bbb98 Merge pull request #7538 from influxdata/jw-limits
Add config option to messages when limits exceeded
2016-10-31 09:26:30 -06:00
Jason Wilder 0b6f5441b9 Add config option to messages when limits exceeded
When a limit is exceeded, we return errors and sometimes log (if appropriate)
that a limit was exceeded.  The messages don't always provide an indication
as to where or how they are configured.

Instead, return the config option (easily searchable for) as well as the limit
currently set and the value that exceeded it when possible.
2016-10-28 14:54:45 -06:00
Jason Wilder bcb48a8ff2 Merge pull request #7533 from influxdata/jw-7498
Fix panic: interface conversion: tsm1.Value is *tsm1.FloatValue, not *tsm1.StringValue
2016-10-28 12:53:08 -06:00
Jason Wilder b1ceb5e66d Add cache write OK, Dropped, Error stats
Adds a new dropped stat as well as fixes OK and error stats not
actually get collected and stored.
2016-10-28 12:15:50 -06:00
Jason Wilder 873189e0c2 Fix panic: interface conversion: tsm1.Value is *tsm1.FloatValue, not *tsm1.StringValue
If concurrent writes to the same shard occur, it's possible for different types to
be added to the cache for the same series.  The way the measurementFields map on the
shard is updated is racy in this scenario which would normally prevent this from occurring.
When this occurs, the snapshot compaction panics because it can't encode different types
in the same series.

To prevent this, we have the cache return an error a different type is added to existing
values in the cache.

Fixes #7498
2016-10-28 12:15:50 -06:00
Jason Wilder e388912b6c Fix race in findGenerations
The file store stats slice is re-used which causes the race below:

WARNING: DATA RACE
Write at 0x00c42007e140 by goroutine 43:
  github.com/influxdata/influxdb/tsdb/engine/tsm1.(*FileStore).Stats()
      /Users/jason/go/src/github.com/influxdata/influxdb/tsdb/engine/tsm1/file_store.go:511 +0x22e
  github.com/influxdata/influxdb/tsdb/engine/tsm1.(*DefaultPlanner).findGenerations()
      /Users/jason/go/src/github.com/influxdata/influxdb/tsdb/engine/tsm1/compact.go:461 +0x6f
  github.com/influxdata/influxdb/tsdb/engine/tsm1.(*DefaultPlanner).PlanLevel()

Previous read at 0x00c42007e140 by goroutine 40:
  github.com/influxdata/influxdb/tsdb/engine/tsm1.(*DefaultPlanner).findGenerations()
      /Users/jason/go/src/github.com/influxdata/influxdb/tsdb/engine/tsm1/compact.go:463 +0x13d
  github.com/influxdata/influxdb/tsdb/engine/tsm1.(*DefaultPlanner).PlanOptimize()
2016-10-28 12:15:49 -06:00
Jason Wilder 96648d2045 Merge pull request #7532 from influxdata/jw-7093
Don't normalize drop/delete series statements
2016-10-28 12:07:20 -06:00
Stephan Klatt 35d2fb6e01 init.sh: busybox kill compatible signal names
busybox's kill does not accept -s SIGTERM, but only -s TERM
2016-10-28 15:30:48 +02:00
Stephan Klatt 9a880f6144 init.sh: initialize counter variable in stop()
fixes init.sh stop error on busybox systems: #7535
2016-10-28 13:46:13 +02:00
Jonathan A. Sternberg 017ff229ef Merge pull request #7531 from influxdata/js-7526-fix-documentation-button-with-patch-versions
Truncate the version string when linking to the documentation
2016-10-27 19:44:54 -05:00
Jason Wilder d105e344c2 Don't normalize drop/delete series statements
7093 causes a parse error to be returned from delete and drop
statements.  Normalizing them cause an invalid statement to be generated
which cannot be reparse if converted to a string and back.
2016-10-27 16:21:07 -06:00
Jonathan A. Sternberg 3e29d3d9ca Truncate the version string when linking to the documentation
The admin console would dynamically discover the version from the
InfluxDB server, but for patch releases, it included the patch in the
link to the documentation and that wasn't a valid link.

Truncate the version so the documentation url is correct since we only
do documentation for `major.minor`.
2016-10-27 16:40:08 -05:00
joelegasse 05c252696e Merge pull request #7499 from influxdata/jl-export-doc
Update `influx_inspect export` doc
2016-10-26 14:17:27 -04:00
Jason Wilder 67c1d9c6bd Merge pull request #7523 from influxdata/jw-default-config
Actually update the defaults for TSM
2016-10-26 10:13:02 -06:00
Jason Wilder 96c9fb3648 Actually update the defaults for TSM
7510 update the defaults in the sample config, but did not update
the code.  This updates the defaults in the config that changed.
2016-10-26 09:49:25 -06:00
Jason Wilder d785a2d9f2 Merge pull request #7522 from influxdata/jw-go173
Use go1.7.3
2016-10-26 09:47:57 -06:00
Jason Wilder 1ccdda88aa Use go1.7.3 2016-10-25 20:16:58 -06:00
Jason Wilder 7cc95ce28b Merge branch 'stevenh-cache-lock-contention' 2016-10-25 15:29:42 -06:00
Steven Hartland 3f16197243 Improve tsm1 cache performance
Reduce the cache lock contention by widening the cache lock scope in WriteMulti, while this sounds counter intuitive it was:
* 1 x Read Lock to read the size
* 1 x Read Lock per values
* 1 x Write Lock per values on race
* 1 x Write Lock to update the size

We now have:
* 1 x Write Lock

This also reduces contention on the entries Values lock too as we have the global cache lock.

Move the calculation of the added size before taking the lock as it takes time and doesn't need the lock.

This also fixes a race in WriteMulti due to the lock not being held across the entire operation, which could cause the cache size to have an invalid value if Snapshot has been run in the between the addition of the values and the size update.

Fix the cache benchmark which where benchmarking the creation of the cache not its operation and add a parallel test for more real world scenario, however this could still be improved.

Add a fast path newEntryValues values for the new case which avoids taking the values lock and all the other calculations.

Drop the lock before performing the sort in Cache.Keys().
2016-10-25 15:24:51 -06:00
Jonathan A. Sternberg e7629e9668 Merge pull request #7519 from influxdata/js-4461-default-time-boundaries
Change default time boundaries for raw queries
2016-10-25 16:22:20 -05:00
Jonathan A. Sternberg f1fbb55909 Change default time boundaries for raw queries
Changes the default time boundaries for raw queries so raw queries will
range until the end of time. Aggregate queries continue to have their
default end time be `now()`.
2016-10-25 15:08:51 -05:00
Jonathan A. Sternberg 17eb8cb476 Merge pull request #7497 from influxdata/js-6704-first-last-optimization
Optimize first/last when no group by interval is present
2016-10-25 14:33:55 -05:00
Cory LaNou 5840cc473c Merge pull request #7514 from influxdata/cjl-7494-influx-inspect-escape-export
Escape fields when exporting tsm/wal files
2016-10-25 14:23:24 -05:00
Cory LaNou cc8e34886c escape fields when exporting tsm/wal files 2016-10-25 13:36:45 -05:00
Jason Wilder af72d9b0e4 Merge pull request #7515 from influxdata/jw-7053
Return parse error from delete/drop when db or rp is specified
2016-10-25 12:05:56 -06:00
Jason Wilder c68b7a192f Return parse error from delete/drop when db or rp is specified
The delete and drop statements apply to the measurement within a db.
The parser allowed a db or rp to be specified and these values were
silently ignored.  This could cause data loss as someone would think
they are only deleting the series within a rp, but they are actually
deleting all their data.

Instead, we return a parse error if a db or rp is specified in the
delete or drop statements.  Ideally, we'd be able to respect the
db and rp, but that requires significant work in the query engine
and tsdb store to make that work.

Fixes #7053
2016-10-25 11:43:15 -06:00
Joe LeGasse ad62d04ce3 influx_inspect: update flag descriptions 2016-10-25 11:05:06 -04:00
Jonathan A. Sternberg a515aeda39 Optimize first/last when no group by interval is present
The `first()` and `last()` functions response rate would increase linear
to the number of points even though it seems like it shouldn't. This
optimization greatly reduces the amount of time to return a response
when no `GROUP BY time(...)` clause is present in a query.
2016-10-25 09:57:31 -05:00
Edd Robinson dcd6b29748 Merge pull request #7495 from influxdata/er-reg-match
Rewrite some regex conditions to use index-compatible conditions
2016-10-25 11:41:17 +01:00
Edd Robinson b12b0d12fb Add regex benchmarks and fix existing approach 2016-10-25 11:10:03 +01:00
Edd Robinson 06d1226b9a Rewrite exact match regexes to use tsdb index
This commit adds support for replacing regexes with non-regex conditions
when possible. Currently the following regexes are supported:

 - host =~ /^foo$/ will be converted into host = 'foo'
 - host !~ /^foo$/ will be converted into host != 'foo'

Note: if the regex expression contains character classes, grouping,
repetition or similar, it may not be rewritten.

For example, the condition: name =~ /^foo|bar$/ will not be rewritten.
Support for this may arrive in the future.

Regexes that can be converted into simpler expression will be able to
take advantage of the tsdb index, making them significantly faster.
2016-10-25 11:10:03 +01:00
Jason Wilder 74c6a0c1c5 Merge pull request #7510 from influxdata/jw-config-defaults
Update config file defaults
2016-10-24 16:39:04 -06:00
Jason Wilder 6249c8b9ab Update changelog 2016-10-24 16:13:45 -06:00
Jason Wilder 686d1a7ba4 Remove unused config options 2016-10-24 15:32:38 -06:00
Jason Wilder eb3b45d3c7 Update config file installed by packages
This updates the config file to:
* Have all config options that do not change the default to be commented
out
* Removes old config options that are no longer available
* Updates config options to new defaults based on prior bugs and tuning
recommendations

Fixes #7320
Fixes #7504
2016-10-24 15:32:38 -06:00
Jason Wilder 6fa145943a Merge pull request #7483 from hvnsweeting/doc-fixes
Doc fixes
2016-10-24 11:38:59 -06:00
Edd Robinson 3a1b811037 Merge pull request #7480 from influxdata/er-fs-stats
Memoize output of FileStore.Stats
2016-10-24 18:26:02 +01:00
Edd Robinson 0ee093f1fb Memoize output of FileStore.Stats 2016-10-24 10:23:20 -06:00
Mark Rushakoff ab7bfe2473 Mention verify subcommand in influx_inspect help 2016-10-24 08:46:48 -07:00
Edd Robinson a16c188602 Merge pull request #7507 from influxdata/er-panic
Prevent influx from panicking on connect
2016-10-24 16:27:09 +01:00
Edd Robinson 0ae775f230 Prevent influx from panicking on connect 2016-10-24 16:09:06 +01:00
Cory LaNou e35178870e Merge pull request #7493 from influxdata/cjl-7431-remove-cq-endpoint-httpd
Remove ProcessContinousQueries from httpd endpoint
2016-10-21 13:02:19 -05:00
Joe LeGasse aa9f832166 influx_inspect: make 'go vet' happy 2016-10-21 10:52:13 -04:00
Jonathan A. Sternberg 332de123bd Merge pull request #7496 from influxdata/js-filter-shards-without-series-key
Filter out series within shards that do not have data for that series
2016-10-21 09:49:01 -05:00
Joe LeGasse 5fe6edcc23 influx_inspect: update manpage text 2016-10-21 10:39:40 -04:00
Joe LeGasse 5be37c014d influx_inspect: Update usage doc for 'export' 2016-10-21 10:35:54 -04:00
Jonathan A. Sternberg 3681bc8a43 Filter out series within shards that do not have data for that series
Previously, we would return a full tag set for every shard and the tag
set would include all series that existed in the database index
including series that didn't physically exist within that shard. This
led to the tag sets returned being incredibly huge when we had high
cardinality but sparse data. Since the data was sparse, it was
unexpected that it would cause such a large strain on the system by most
people.

Now we filter out the series ids that are not assigned to the current
shard when computing a tag set for that shard. This lowers the memory
usage for high cardinality sparse data drastically and allows queries on
those to complete successfully.

This does not resolve issues for high cardinality data in every shard
that is also spread out over a long series of time. That situation isn't
nearly as common as the above situation though.
2016-10-20 14:15:34 -05:00