Commit Graph

10533 Commits (517d8d58818715c12872a157e0b3f1fa24976096)

Author SHA1 Message Date
Michael Desa 517d8d5881 Move benchmarks beneath other NewSeries 2016-06-23 10:15:37 -07:00
Michael Desa 0c867e4b2c Fix benchmark test names
Previously the test names included an `s` for the name of a singular
component.
2016-06-16 08:45:36 -07:00
Michael Desa 9dfaa182a7 Add additional benchmarks for various schemas
Anecdotally, the relationship between memory consumption and series
cardinality was thought to be exponential. I suspect that this is false.
The intent of the added benchmarks is to verify my suspicion. Eventually
the these benchmarks will run nightly to serve as a basis to evualuate
the memory performance in a controlled environment.

https://github.com/influxdata/docs.influxdata.com/issues/392
2016-06-15 14:54:14 -07:00
Jack Zampolin 3b400a2db1 Merge pull request #6843 from influxdata/jz-stress-auth
Add ssl, un, pw support to v2 stress
2016-06-14 18:27:55 -07:00
Jack Zampolin fe0ba554e6 Add ssl, un, pw support to v2 stress 2016-06-14 16:47:47 -07:00
Jack Zampolin 3ab9167d2f Merge pull request #6841 from influxdata/jz-graphite
Add changelog entry
2016-06-14 14:39:43 -07:00
Jack Zampolin 910e9fc2e0 Add changelog entry 2016-06-14 14:06:17 -07:00
Jack Zampolin a96f96c024 Merge pull request #6834 from influxdata/jz-graphite
Add `port` to `[graphite]` log output
2016-06-14 11:35:19 -07:00
Jonathan A. Sternberg 779fcea06f Merge pull request #6835 from influxdata/js-sysvinit-tools-on-redhat
Include sysvinit-tools as an rpm dependency
2016-06-14 09:09:55 -05:00
Cameron Sparr b9a3f2e1e5 Make httpd logger closer to Common Log Format
changes the httpd log lines from this:

    [httpd] 2016/06/08 14:06:39 ::1 - - [08/Jun/2016:14:06:39 +0100] POST /write?consistency=any&db=telegraf&precision=s&rp= HTTP/1.1 204 0 - InfluxDBClient d6aa01fc-2d79-11e6-8024-000000000000 2.751391ms

to this:

    [httpd] ::1 - - [08/Jun/2016:14:06:39 +0100] "POST /write?consistency=any&db=telegraf&precision=s&rp= HTTP/1.1" 204 0 "-" "InfluxDBClient" d6aa01fc-2d79-11e6-8024-000000000000 2751

So it changes a few things:

1. Remove the logger timestamp at the beginning which isn't very relevant anyways
2. adds quotes around "METHOD URI PROTOCOL", because this is part of the
common log format.
3. adds quotes around "AGENT" and "REFERRER" because this is part of the
"combined" log format.
4. Puts the response time in integer microseconds, because this is
consistent with apache's %D config mod option.

Compared with CLF, our logs now look like this:

    [httpd] %{COMMON_LOG_FORMAT} "<agent>" "<referrer>" <request_uuid> <response_time_µs>

For reference, see:
https://en.wikipedia.org/wiki/Common_Log_Format
http://httpd.apache.org/docs/current/mod/mod_log_config.html
2016-06-14 14:48:24 +01:00
Jonathan A. Sternberg fed8fd385f Include sysvinit-tools as an rpm dependency 2016-06-13 20:08:18 -05:00
Jason Wilder 27d76c331b Merge pull request #6833 from influxdata/patch-fix
Initialize subscriber channel on open
2016-06-13 13:01:29 -06:00
Jack Zampolin f1db2f2ca5 Add port to all graphite log output to help with debugging multiple endpoints 2016-06-13 11:59:56 -07:00
Jack Zampolin bc82a50c75 Merge pull request #6832 from influxdata/jz-stress-fix
Fix write to and query from cluster
2016-06-13 14:49:14 -04:00
Jack Zampolin 216021371a Fix write to and query from cluster 2016-06-13 11:30:56 -07:00
Jonathan A. Sternberg 32472026a3 Merge pull request #6564 from influxdata/js-4532-show-tag-values-with-regex
Support regex selection in SHOW TAG VALUES for the key
2016-06-13 10:16:56 -05:00
Jonathan A. Sternberg 2e36c27b15 Merge pull request #6801 from influxdata/js-6771-duplicate-series-with-same-tag-set
Fix the point validation parser to identify and sort tags correctly
2016-06-13 10:09:06 -05:00
Jonathan A. Sternberg 9837de793c Support regex and other operations for selecting the key in SHOW TAG VALUES
This adds support for using regex expressions in SHOW TAG VALUES when
selecting the key. Also supporting the `!=` operation for the
comparison. Now you can do any of the following:

    SHOW TAG VALUES WITH KEY != "region"
    SHOW TAG VALUES WITH KEY =~ /region/
    SHOW TAG VALUES WITH KEY !~ /region/

It also adds a new SetLiteral AST node that will potentially be used in
the future to allow set operations for other comparisons in the future.

Fixes #4532.
2016-06-13 10:03:14 -05:00
Jonathan A. Sternberg 3bd9425edb Fix the point validation parser to identify and sort tags correctly
Fixes #6771.
2016-06-13 09:45:10 -05:00
Jason Wilder 48da935314 Merge pull request #6822 from influxdata/jw-sub-chan
Initialize subscriber channel on open
2016-06-10 21:43:43 -06:00
Jason Wilder ab4d21804c Initialize subscriber channel on open
If the subscriber service was closed and re-open, it would panic
with panic: send on closed channel
2016-06-10 18:41:20 -06:00
Jason Wilder fd262697b9 Initialize subscriber channel on open
If the subscriber service was closed and re-open, it would panic
with panic: send on closed channel
2016-06-10 18:00:44 -06:00
Ben Johnson 48f1a6d858 Merge pull request #6820 from benbjohnson/http-query-node-id
Add NodeID to execution options
2016-06-10 13:10:15 -06:00
Jonathan A. Sternberg bdd15be6cc Merge pull request #6806 from influxdata/js-separate-task-manager
Refactor the TaskManager to be separate from the QueryExecutor
2016-06-10 13:21:46 -05:00
Jonathan A. Sternberg 48692a1f13 Merge pull request #6809 from influxdata/js-kill-query-on-specific-host
Add option to KILL QUERY to kill on a specific host
2016-06-10 12:33:03 -05:00
Jonathan A. Sternberg 9db82e6bf0 Switch ExecutionContext to be passed by value 2016-06-10 12:31:51 -05:00
Jonathan A. Sternberg a6147fa685 Public method to return query information for running queries 2016-06-10 12:31:48 -05:00
Jonathan A. Sternberg 55973d2815 Separate the task manager from the query executor
The task manager now acts as its own statement executor so that a custom
statement executor can perform custom actions for KillQueryStatement and
ShowQueriesStatement.
2016-06-10 12:30:51 -05:00
Ben Johnson 7d4bea7153
add node id to execution options
This commit changes the `ExecutionOptions` and `SelectOptions` to
allow a `NodeID` for specifying an exact node to query against.
2016-06-10 09:20:44 -06:00
Jonathan A. Sternberg c8e90fa4ee Merge pull request #6640 from influxdata/js-5655-graphite-retention-policy
Support specifying a retention policy for the graphite service
2016-06-09 11:57:07 -05:00
Jonathan A. Sternberg 4f37bc5a40 Support specifying a retention policy for the graphite service
The graphite service will attempt to create the retention policy and use
it. If the retention policy doesn't exist, it will be created with the
default options.

Fixes #5655.
2016-06-08 17:01:44 -05:00
Jason Wilder 256f57a4f4 Merge pull request #6808 from influxdata/jw-restore-error
Ensure restore doesn't write broken files
2016-06-07 22:02:57 -06:00
Jason Wilder 17c8912f18 Merge pull request #6807 from influxdata/jw-drop-statements
Drop data before updating meta store
2016-06-07 22:02:41 -06:00
joelegasse 09eef86e92 Merge pull request #6810 from influxdata/jl-truncate-sg
Add TruncatedAt field to meta.ShardGroupInfo
2016-06-07 18:52:06 -04:00
Joe LeGasse 647210c57a Add TruncatedAt field to meta.ShardGroupInfo 2016-06-07 18:24:24 -04:00
Jonathan A. Sternberg 2fa6d306c2 Add option to KILL QUERY to kill on a specific host
Option only applies to clustering.
2016-06-07 16:48:07 -05:00
Jason Wilder ac6addd0b5 Ensure restore doesn't write broken files
Restore would try to open the shard if there was an error.  If there
was an error, the files written are very likely to be partially written
and they can cause the server to panic.

To prevent a shard from trying to open broken files, we now write to
a temp file and rename it to the actual name only after fully writing
and fsyncing the file.
2016-06-07 14:36:46 -06:00
Jason Wilder f9379eddf2 Drop data before updating meta store
If a drop statement failed to remove state on disk, the meta store
would still be updated and you would not be able to retry the delete
leaving orphaned data around.

This reverses the logic so the data must be removed before the meta
store is updated.
2016-06-07 12:14:04 -06:00
Jonathan A. Sternberg 022479778d Merge pull request #6803 from influxdata/js-remove-database-index-from-tsdb-store-interface
Remove the DatabaseIndex method from TSDBStore interface
2016-06-07 11:54:00 -05:00
Jonathan A. Sternberg fe3f0d0e3d Remove the DatabaseIndex method from TSDBStore interface
The TSDBStore interface needs to also allow for remote TSDBStore but the
DatabaseIndex is only for a local TSDB instance. Moved the optimized
SHOW TAG VALUES path to do a typecast to the LocalTSDBStore struct
instead of always attempting to use the optimized version.

If the TSDBStore is not local and does not have the DatabaseIndex, it
will default to using the distributed query instead.
2016-06-07 11:34:34 -05:00
Jonathan A. Sternberg b972c220aa Merge pull request #6757 from influxdata/js-refactor-execute-query
Refactor ExecuteQuery to take options as a struct
2016-06-07 10:35:52 -05:00
Paul Dix 6fa52441de Update CHANGELOG.md 2016-06-07 07:24:24 -07:00
Jonathan A. Sternberg 1e562408f1 Merge pull request #6779 from joe2far/patch-1
Fixed typo in docstring
2016-06-07 08:26:23 -05:00
Ben Johnson bf3c22689b Merge pull request #6792 from benbjohnson/show-tag-values
Optimize SHOW TAG VALUES
2016-06-06 16:00:12 -06:00
Jason Wilder 9c0c2f9ebe Merge pull request #6794 from influxdata/jw-cache
Cache safety fixes
2016-06-06 15:59:47 -06:00
Ben Johnson 1b94cd2686
optimize SHOW TAG VALUES
This commit optimizes `SHOW TAG VALUES` so that it avoids the
`SELECT` query engine execution and iterator creation. There
are also optimizations to reduce individual memory allocations
and to reduce in-memory heap size by only operating on one
measurement at a time.

Execution time has been reduce to approximately 900ms for
500,000 rows. This is about 2µs per row. Of this time,
approximately 1µs is spent retrieving and sorting the row
and 1µs is spent encoding into JSON and writing to the
response body.
2016-06-06 15:50:53 -06:00
Jason Wilder 838a29cca8 Fix race in cache
If cache.Deduplicate is called while writes are in-flight on the cache, a data race
could occur.

WARNING: DATA RACE
Write by goroutine 15:
  runtime.mapassign1()
      /usr/local/go/src/runtime/hashmap.go:429 +0x0
  github.com/influxdata/influxdb/tsdb/engine/tsm1.(*Cache).entry()
      /Users/jason/go/src/github.com/influxdata/influxdb/tsdb/engine/tsm1/cache.go:482 +0x27e
  github.com/influxdata/influxdb/tsdb/engine/tsm1.(*Cache).WriteMulti()
      /Users/jason/go/src/github.com/influxdata/influxdb/tsdb/engine/tsm1/cache.go:207 +0x3b2
  github.com/influxdata/influxdb/tsdb/engine/tsm1.TestCache_Deduplicate_Concurrent.func1()
      /Users/jason/go/src/github.com/influxdata/influxdb/tsdb/engine/tsm1/cache_test.go:421 +0x73

Previous read by goroutine 16:
  runtime.mapiterinit()
      /usr/local/go/src/runtime/hashmap.go:607 +0x0
  github.com/influxdata/influxdb/tsdb/engine/tsm1.(*Cache).Deduplicate()
      /Users/jason/go/src/github.com/influxdata/influxdb/tsdb/engine/tsm1/cache.go:272 +0x7c
  github.com/influxdata/influxdb/tsdb/engine/tsm1.TestCache_Deduplicate_Concurrent.func2()
      /Users/jason/go/src/github.com/influxdata/influxdb/tsdb/engine/tsm1/cache_test.go:429 +0x69

Goroutine 15 (running) created at:
  github.com/influxdata/influxdb/tsdb/engine/tsm1.TestCache_Deduplicate_Concurrent()
      /Users/jason/go/src/github.com/influxdata/influxdb/tsdb/engine/tsm1/cache_test.go:423 +0x3f2
  testing.tRunner()
      /usr/local/go/src/testing/testing.go:473 +0xdc

Goroutine 16 (finished) created at:
  github.com/influxdata/influxdb/tsdb/engine/tsm1.TestCache_Deduplicate_Concurrent()
      /Users/jason/go/src/github.com/influxdata/influxdb/tsdb/engine/tsm1/cache_test.go:431 +0x43b
  testing.tRunner()
      /usr/local/go/src/testing/testing.go:473 +0xdc
2016-06-06 15:45:01 -06:00
Jason Wilder bc76048371 Fix panic in cache.DeleteRange
Deleting keys that did not exist in the cache could cause a panic
because the entry returned would be nil and was not checked.
2016-06-06 14:48:53 -06:00
Jonathan A. Sternberg b8e22d9d79 Merge pull request #6586 from influxdata/js-3733-rename-default-retention-policy
Modify the default retention policy name and make it configurable
2016-06-06 15:05:29 -05:00
Jason Wilder a27f2a3cb0 Merge pull request #6769 from rubycut/auth_panic
lock auth properly
2016-06-06 12:21:37 -06:00