Commit Graph

12719 Commits (f97f5bcc82e6434d2bb4cbc39d3f64c11e4cfd06)

Author SHA1 Message Date
Edd Robinson 550fd4a8c2 Merge pull request #9017 from influxdata/er-8819-retention-index
Ensure retention service removes shards locally
2017-10-26 17:15:43 +01:00
Edd Robinson f7e0e41a94 Simplify representation of statements 2017-10-26 16:22:49 +01:00
Edd Robinson ce00830a29 Typo 2017-10-26 16:22:49 +01:00
Edd Robinson dd3206d796 Set column name for estimations 2017-10-26 16:22:48 +01:00
Edd Robinson bda6de9817 Add all versions of CARDINALITY commands 2017-10-26 16:22:48 +01:00
Edd Robinson 50d73497c5 CHANGELOG 2017-10-26 16:22:48 +01:00
Edd Robinson 1342046264 Rewrite sources appropriately 2017-10-26 16:22:31 +01:00
Edd Robinson ba9506764c SHOW FIELD KEY EXACT CARDINALITY 2017-10-26 16:22:31 +01:00
Edd Robinson c57e192984 SHOW TAG VALUES EXACT CARDINALITY 2017-10-26 16:22:31 +01:00
Edd Robinson 47c0840d5b SHOW TAG KEY EXACT CARDINALITY 2017-10-26 16:22:31 +01:00
Edd Robinson f80591bfa1 Implement MEASUREMENT cardinality estimation 2017-10-26 16:22:31 +01:00
Edd Robinson 3079b41f00 Implement series cardinality estimation 2017-10-26 16:22:31 +01:00
Edd Robinson 89a0ddf689 Add EXACT CARDINALITY variation 2017-10-26 16:22:31 +01:00
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