Commit Graph

10490 Commits (1e562408f1d49798e157e61d5e56ad95600fed43)

Author SHA1 Message Date
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
Jonathan A. Sternberg 7da0638a84 Merge pull request #6784 from influxdata/js-server-reporting-proper-exit
Perform a proper exit for the reportServer goroutine
2016-06-06 10:03:43 -05:00
Jonathan A. Sternberg 5b26780ead Perform a proper exit for the reportServer goroutine
Previously, the goroutine would block for 24 hours and would only check
every 24 hours if the server was closed. Since this never happened, the
goroutine would just be abruptly killed when the main process ended
(since nobody waited for this goroutine to end).

Updating the code to exit when the server is closed immediately and
switching the timer to a ticker instance that can be stopped.
2016-06-05 10:45:19 -05:00
Rubycut a849f42cc2 Lock auth properly, code suggested by @jwilder 2016-06-04 09:05:10 +02:00
Jonathan A. Sternberg 573d7ed4e4 Merge pull request #6776 from influxdata/js-6756-x-influxdb-version-header
Set X-Influxdb-Version header on every request (even 404 requests)
2016-06-03 15:44:52 -05:00
Nathaniel Cook 128b07e352 Merge pull request #6764 from influxdata/nc-holt-winters-nans
Check for NaNs from Holt-Winters and do not return them
2016-06-03 11:17:11 -06:00
Joe Farrell bb8b08e2ca Fixed typo in docstring 2016-06-03 18:01:04 +01:00
Nathaniel Cook 01aa9073b6 check for NaNs and do not return them 2016-06-03 10:51:46 -06:00
Ben Johnson 443baf822c Merge pull request #6778 from benbjohnson/iterators-merge
Add Iterators.Merge()
2016-06-03 10:46:48 -06:00
Ben Johnson 3fa5cefa32
add Iterators.Merge() 2016-06-03 10:27:17 -06:00
Jonathan A. Sternberg 5c7bcda82c Set X-Influxdb-Version header on every request (even 404 requests)
Fixes #6756.
2016-06-03 10:29:50 -05:00
Jonathan A. Sternberg 7729e10a8f Merge pull request #6765 from influxdata/js-6233-show-tag-values-performance
Update SHOW TAG VALUES to use a fast dedupe iterator
2016-06-02 22:32:44 -05:00
Jonathan A. Sternberg 1e84b22407 Update SHOW TAG VALUES to use a fast dedupe iterator
Include a benchmark test for the fast dedupe iterator.
2016-06-02 22:03:59 -05:00
Nathaniel Cook 6e0c5698c1 Merge pull request #6766 from influxdata/nc-count-zero
Count and Sum return 0 for empty intervals
2016-06-02 08:45:08 -06:00
Jason Wilder cd336095ca Merge pull request #6768 from influxdata/jw-disable-open
Allow creating shards in a disabled state
2016-06-02 08:34:51 -06:00
Jason Wilder ee4267bd05 Merge pull request #6767 from influxdata/jw-unlock
Fix sporadic write failures with influx_stress
2016-06-01 19:25:48 -06:00
Jason Wilder 579923d95f Fix sporadic write failures with influx_stress
This Unlock was moved which seems to create a deadlock situation
sometimes under high write load.  This deadlock causes writes to
fail with timeouts.
2016-06-01 17:25:47 -06:00
Jason Wilder a74ea4cbf4 Allow creating shards in a disable state
For restoring a shard, we need to be able to have the shard open,
but disabled.  It was racy to open it and then disable it separately
since writes/queries could occur in between that time.
2016-06-01 16:17:18 -06:00
Nathaniel Cook ce74fe0b06 count and sum return 0 for empty intervals 2016-06-01 15:53:23 -06:00
David Norton 1f390ee290 Merge pull request #6732 from influxdata/dn-batch-cq-writes2
batch SELECT INTO writes
2016-06-01 13:24:24 -04:00
Edd Robinson ae9a57094e Merge pull request #6763 from influxdata/er-monitor-dl
Fix deadlock in monitor
2016-06-01 18:09:54 +01:00
Edd Robinson 774e398612 Fix deadlock in monitor 2016-06-01 17:46:01 +01:00
David Norton 62f3b4486a batch SELECT INTO writes 2016-06-01 12:05:23 -04:00
Jason Wilder 05ec9599b7 Merge pull request #6744 from influxdata/jw-shard-enabled
Add ability to disable shards
2016-05-31 11:05:05 -06:00
Jason Wilder d0023dee5d Convert inline errors to constants 2016-05-31 10:51:54 -06:00
Jason Wilder 1ff8ecf4fb Add ability to disable shards
Disabling a shard causes all writes and queries to a shard to return
an error.  This also disables compactions for the shard.
2016-05-31 10:51:54 -06:00
Edd Robinson baf5d505e6 Merge pull request #6754 from influxdata/er-fs
Prevent ReadFloatBlock from panicking when no values
2016-05-31 16:41:29 +01:00
Edd Robinson 003c30989a Check for no values 2016-05-31 16:28:17 +01:00
Jason Wilder 2eaa12ef4b Merge pull request #6745 from influxdata/fastpath-locking-in-cache-entries
Low-contention path for pre-existing cache entries.
2016-05-31 08:53:33 -06:00
rw dcec206f2e Dedup `.RUnlock` between two conditionals. 2016-05-29 10:20:58 -07:00
rw 1b160d1af0 Low-contention path for pre-existing cache entries.
This change appears to increase bulk ingestion throughput by 2x-3x in
multiprocessor environments.
2016-05-28 23:50:11 -07:00
Jason Wilder dd58101061 Merge pull request #6743 from influxdata/jw-parse-key
Optimize series key parsing on startup
2016-05-27 15:00:42 -06:00
joelegasse 876c65acf8 Merge pull request #6741 from influxdata/jl-monitor-doc
Update comment for SetPointsWriter in the monitoring service
2016-05-27 15:31:18 -04:00
Jason Wilder 619c3c4229 Merge pull request #6735 from influxdata/jw-backup
Switch backup to use shard.Snapshot
2016-05-27 11:19:15 -06:00
Jason Wilder ca13cb9932 Update changelog 2016-05-27 10:43:37 -06:00
Jason Wilder ff1447202c Reduce lock contention in Measurement.AddSeries 2016-05-27 10:30:08 -06:00
Jason Wilder 84c776bf2a Skip allocating string in unescapeString 2016-05-27 10:30:08 -06:00
Jason Wilder ff2475bf7c Prevent allocation in unesecapeTag 2016-05-27 10:30:08 -06:00
Jason Wilder 97ad5fd2e6 Add ParseKey benchmark 2016-05-27 10:30:08 -06:00
Jason Wilder f6ee765873 Merge pull request #6742 from influxdata/jw-utc-test
Use UTC for expected times in TestServer_Query_LargeTimestamp
2016-05-27 10:27:04 -06:00
Jason Wilder 0fb82d8787 Use UTC for expected times in TestServer_Query_LargeTimestamp 2016-05-27 09:46:07 -06:00
Jason Wilder 11959005f4 Switch backup to use shard.Snapshot
This switch the backup shard call to use the shard Snapshot that
internally creates a snapshot by hardlinking all of the TSM and
tombstone files instead.  This reduces the time that the FileStore
is locked and will allow for larger shards to be backup more easily.
2016-05-27 09:30:25 -06:00
joelegasse 8c3ef8d8ae Merge pull request #6730 from influxdata/jl-date-fix
Delay parsing of date/time strings until needed
2016-05-27 10:41:52 -04:00