Commit Graph

12856 Commits (e1ec33104886452a46b26e18ca4bd1764f7e8e31)

Author SHA1 Message Date
Edd Robinson ce584f7b34 Merge pull request #8968 from darkliquid/client-500-resp
Make client errors more helpful on downstream errs
2017-10-26 16:20:42 +01:00
Mark Rushakoff e8d13cebbd Merge pull request #9012 from influxdata/mr-packaging-fixes
Packaging fixes
2017-10-26 08:16:37 -07:00
Edd Robinson 2ea2abb001 Remove possibility of race when dropping shards
Fixes #8819.

Previously, the process of dropping expired shards according to the
retention policy duration, was managed by two independent goroutines in
the retention policy service. This behaviour was introduced in #2776,
at a time when there were both data and meta nodes in the OSS codebase.
The idea was that only the leader meta node would run the meta data
deletions in the first goroutine, and all other nodes would run the
local deletions in the second goroutine.

InfluxDB no longer operates in that way and so we ended up with two
independent goroutines that were carrying out an action that was really
dependent on each other.

If the second goroutine runs before the first then it may not see the
meta data changes indicating shards should be deleted and it won't
delete any shards locally. Shortly after this the first goroutine will
run and remove the meta data for the shard groups.

This results in a situation where it looks like the shards have gone,
but in fact they remain on disk (and importantly, their series within
the index) until the next time the second goroutine runs. By default
that's 30 minutes.

In the case where the shards to be removed would have removed the last
occurences of some series, then it's possible that if the database was already at its
maximum series limit (or tag limit for that matter), no further new series
can be inserted.
2017-10-26 16:15:13 +01:00
Edd Robinson c8a679421f Update CHANGELOG.md 2017-10-26 15:41:30 +01:00
Edd Robinson 77977af685 Add repro test for #8819 2017-10-26 14:47:30 +01:00
Edd Robinson 1629ec7f5f Add tests to Retention service 2017-10-26 14:47:30 +01:00
Edd Robinson a37fca1199 Add Store mock 2017-10-26 14:47:30 +01:00
Andrew Montgomery-Hurrell 2ed0d2d1c9
Make client errors more helpful on downstream errs
When a downstream server such as a proxy or loadbalancer between
influxdb and the client produces an error, the client currently does
not make this very obvious.

This change introduces checks on both the content type and the
influx version header to identify whether a request was served by
influxdb itself and returns a more appropriate error in the cases
where it can be determined a downstream issue is at play.
2017-10-26 11:56:29 +01:00
Mark Rushakoff b4d56be43a Fix static linux packaging 2017-10-25 16:20:21 -07:00
Mark Rushakoff bbae6e7674 Name 386 packages i386 instead of 386
Fixes backwards-compatible package naming.
2017-10-25 15:53:35 -07:00
Stuart Carnie af00235e99 Merge pull request #9001 from influxdata/sgc-ifql
IFQL storage APIs
2017-10-25 15:33:56 -07:00
Mark Rushakoff 3cf32a9358 Fix checksum command
When building only darwin, it would fail due to nothing matching *.deb.
2017-10-25 14:56:09 -07:00
Stuart Carnie dc04eaa8f3 Amendments based on feedback
* Fprint* functions
* No nakedness
* clarify panic messages
* spacing between case statements
* remove break in favor of return
* remove goto in favor of for { continue }
2017-10-25 13:38:07 -07:00
Stuart Carnie b8a6ee7c12 store command to query storage RPC APIs 2017-10-25 13:38:07 -07:00
Stuart Carnie 415ed14c53 storage service
* storage service is disabled by default
* default port 8082
* RPC interface generated using yarpc via service.proto
2017-10-25 13:38:07 -07:00
Stuart Carnie c39f1ad748 Add batch cursor support to tsdb and tsm1
* batch cursors return slices of timestamps and values to reduce call
  overhead. Significantly improved iteration.
* added CreateCursor API to Shard, Engine
* moved build*Cursor to code gen
2017-10-25 13:38:07 -07:00
Stuart Carnie 3e28323a10 Simplified Decode*Block functions
* array has already been sized correctly
* eliminates bounds checking for each element access
* reduces decoding of 30,000,000 points via storage API from
  584ms to 540ms on average
2017-10-25 13:38:07 -07:00
Stuart Carnie fb40c5b825 Update Godeps 2017-10-25 13:38:07 -07:00
Stuart Carnie 0bee9c7068 Merge pull request #9011 from influxdata/sgc-9007
fixes #9007
2017-10-25 13:37:01 -07:00
Stuart Carnie c51ba16287 fixes #9007 2017-10-25 13:08:55 -07:00
Edd Robinson 34836cebee Merge pull request #9009 from influxdata/er-8989-measurement-panic
Fix race in Measurement index
2017-10-25 18:20:03 +01:00
Edd Robinson 0f4c251148 Update CHANGELOG 2017-10-25 13:34:44 +01:00
Edd Robinson 47bd069315 Fix race in Measurement index
Fixes #8989 and #8633.

Previously when issuing commands involving a regex check, walking
through the tags keys/values on a measurement, using the measurement's
index, would be racy.

This commit adds a new `TagKeyValue` type that abstracts away the
multi-layer map we were using as an inverted index from tag keys and
values to series ids. With this abstraction we can also make concurrent
access to this inverted index goroutine safe.

Finally, this commit fixes a very old bug in the index which will affect
any query using a regex. Previously we would always check _every_ tag
against a regex for a measurement, even when we had found a match.
2017-10-25 13:34:21 +01:00
Diego Reiriz 350d736b52 Updated Queries.md
Updated Queries.md to add example statements to Select, GroupBy and Delete
2017-10-25 09:05:52 +02:00
Stuart Carnie 24c769fca3 Merge pull request #9005 from influxdata/sgc-query-interrupt
return query.ErrQueryInterrupted for read on InterruptCh
2017-10-24 14:23:33 -07:00
Stuart Carnie 63d7310572 update CHANGELOG 2017-10-24 14:17:02 -07:00
Stuart Carnie b7579340fe return query.ErrQueryInterrupted for read on InterruptCh 2017-10-24 14:10:28 -07:00
Jason Wilder 955829e7c3 Merge pull request #9003 from influxdata/jw-delete-regression
Delete series in batches
2017-10-24 13:54:33 -06:00
Jason Wilder cbbbe8bedb Delete series in batches
This fixes a regression where deleting series keys would happen
one at a time instead of in bulk.
2017-10-24 11:06:21 -06:00
Stuart Carnie 0bd10eadf0 Merge pull request #9000 from influxdata/sgc-template
Add updated template for EXPLAIN ANALYZE
2017-10-23 16:20:00 -07:00
Stuart Carnie 02a05e86ee Add missing template changes for EXPLAIN ANALYZE 2017-10-23 14:46:36 -07:00
Ben Johnson 63324c2435 Merge pull request #8995 from benbjohnson/tsi-sort-log-tag-values
Sort & validate TSI key value insertion.
2017-10-23 10:46:24 -06:00
Ben Johnson 5a77238f30
Sort & validate TSI key value insertion. 2017-10-23 10:46:01 -06:00
Ben Johnson 6aaa77241a Merge pull request #8963 from benbjohnson/streaming-inmem2tsi
Streaming inmem2tsi conversion.
2017-10-20 15:14:53 -06:00
Ben Johnson 5af2d73867
CHANGELOG 2017-10-20 15:14:39 -06:00
Ben Johnson 1f4e070b3a
Switch to use tsm1.CacheLoader. 2017-10-20 15:14:17 -06:00
Ben Johnson ea43660a55
Streaming inmem2tsi conversion.
Changes the `influx_inspect inmem2tsi` tool to stream each TSM/WAL
file and convert to a TSI index instead of loading the entire shard's
in-memory index first.
2017-10-20 15:14:17 -06:00
Stuart Carnie 21db403342 Merge pull request #8993 from influxdata/sgc-32bit-fixes
fix overflow for 32-bit architecture
2017-10-20 10:58:56 -07:00
Stuart Carnie ac3bf300d3 fix overflow for 32-bit architecture 2017-10-20 10:22:28 -07:00
Stuart Carnie 9119c6ff9a Merge pull request #8991 from influxdata/sgc-go18-fix
make (*T).Helper() optional for Go 1.8 compatibility
2017-10-20 09:35:51 -07:00
Stuart Carnie 4150f64711 Merge pull request #8992 from influxdata/sgc-explain-cl
Update CHANGELOG for EXPLAIN ANALYZE feature
2017-10-20 09:03:02 -07:00
Stuart Carnie 47a2f8745e make (*T).Helper() optional 2017-10-20 08:59:50 -07:00
Stuart Carnie d7b73f9b02 Update CHANGELOG 2017-10-20 08:58:45 -07:00
Stuart Carnie 618f0d0aa7 Merge pull request #8947 from influxdata/sgc-explain
EXPLAIN ANALYZE implementation
2017-10-20 08:35:13 -07:00
Stuart Carnie e9313876ab EXPLAIN ANALYZE
* Introduces EXPLAIN ANALYZE command, which
  produces a detailed tree of operations used to
  execute the query.

introduce context.Context to APIs

metrics package

* create groups of named measurements
* safe for concurrent access

tracing package

EXPLAIN ANALYZE implementation for OSS

Serialize EXPLAIN ANALYZE traces from remote nodes

use context.Background for tests

group with other stdlib packages

additional documentation and remove unused API

use influxdb/pkg/testing/assert

remove testify reference
2017-10-20 08:01:37 -07:00
Jonathan A. Sternberg 4cdb7828d4 Merge pull request #8990 from influxdata/js-pid-file-code-cleanup
Code cleanup for removing the pid file
2017-10-20 09:36:18 -05:00
Jonathan A. Sternberg 75b8d9cd4f Code cleanup for removing the pid file 2017-10-20 09:17:16 -05:00
Jonathan A. Sternberg 8c42345c69 Merge pull request #8987 from influxdata/js-8983-remove-pid-file
Remove the pidfile after the server has exited
2017-10-20 09:16:00 -05:00
Jonathan A. Sternberg 2005a8c8e5 Remove the pidfile after the server has exited 2017-10-19 16:33:59 -05:00
Jonathan A. Sternberg f58a194ee0 Merge pull request #8980 from influxdata/js-8780-prevent-deadlock-during-collectd-shutdown
Prevent deadlock during collectd, graphite, opentsdb, and udp shutdown
2017-10-19 16:33:38 -05:00