Commit Graph

12351 Commits (1dfdc303771273bbc9ba39f325e1f79cce296aa0)

Author SHA1 Message Date
liketic 1dfdc30377 Influx CLI: Make cli case insensitive 2017-09-08 23:20:54 +08:00
Paul Dix 975655af9b Merge pull request from influxdata/pd-changelog-for-from
Update CHANGELOG with Prometheus feature
2017-09-07 17:52:37 -04:00
Paul Dix 2e3c0a8171 Update CHANGELOG with Prometheus feature 2017-09-07 13:55:12 -04:00
Paul Dix f30eba380e Add support for Prometheus remote read and write API. ()
Adds a new package prometheus for converting from remote reads and writes to Influx queries and points. Adds two new endpoints to the httpd handler to support prometheus remote read at /api/v1/prom/read and remote write at /api/v1/prom/write.

The only thing used from Prometheus is the storage/remote files that are generated from the remote.proto file. Copied that file into promtheus/remote package to avoid an extra dependency.
2017-09-07 13:52:37 -04:00
Jonathan A. Sternberg e18425757d Merge pull request from influxdata/js-explain-cached-values
Include the number of scanned cached values in the iterator cost
2017-09-06 16:00:30 -05:00
Jonathan A. Sternberg 590be193e5 Include the number of scanned cached values in the iterator cost 2017-09-06 15:41:07 -05:00
Stuart Carnie 2f4315ccdf Merge pull request from influxdata/sgc-8787
Fixes 
2017-09-05 11:47:24 -07:00
Stuart Carnie aa6ef36051 update CHANGELOG 2017-09-05 11:22:18 -07:00
Stuart Carnie 4a6114028c exported UnloadIndex checks for ready state 2017-09-05 11:22:13 -07:00
Jonathan A. Sternberg 091ea5f9a5 Merge pull request from influxdata/js-explain-plan
Initial implementation of explain plan
2017-09-01 16:19:37 -05:00
Edd Robinson 51e886ba66 Merge pull request from oiooj/pr-cl
Fix panic when the engine already closed in a shard
2017-09-01 16:59:12 +01:00
Jonathan A. Sternberg 50d404e690 Initial implementation of explain plan
It prints the statistics of each iterator that will access the storage
engine. For each access of the storage engine, it will print the number
of shards that will potentially be accessed, the number of files that
may be accessed, the number of series that will be created, the number
of blocks, and the size of those blocks.
2017-09-01 09:01:10 -05:00
Jonathan A. Sternberg 006c8193a9 Merge pull request from emluque/6563-CancelQuery
 Support Ctrl+C to cancel a running query in the Influx CLI
2017-09-01 08:14:48 -05:00
emluque fa681edcb9 6563 Support Ctrl+C to cancel a running query in the Influx CLI
Solved the issue by using context on the http request on the client.
2017-09-01 08:02:27 -05:00
Jonathan A. Sternberg 0ef033f5dd Merge pull request from influxdata/js-reduce-walk-refs-memory-usage
Reduce how long it takes to walk the varrefs in an expression
2017-08-31 10:15:03 -05:00
Jonathan A. Sternberg 466fc9026e Reduce how long it takes to walk the varrefs in an expression
This is used quite a bit to determine which fields are needed in a
condition. When the condition gets large, the memory usage begins to
slow it down considerably and it doesn't take care of duplicates.
2017-08-31 09:33:45 -05:00
Joe LeGasse 732a0c2eaa Merge pull request from influxdata/jl-map-cleanup
cleanup: remove poor usage of ',ok' with maps
2017-08-31 09:18:42 -04:00
Ben Johnson 57d42ac4af Merge pull request from benbjohnson/1479-meta-queries
Use system cursors for measurement, series, and tag key meta queries.
2017-08-30 08:35:35 -06:00
Ben Johnson 1dbe0662d8
Use system cursors for measurement, series, and tag key meta queries. 2017-08-30 08:35:20 -06:00
David Norton 0da711675f Merge pull request from influxdata/dn-8638-influx_inspect
fix : inspect shouldn't err on missing file
2017-08-30 10:21:22 -04:00
David Norton 2aa446bf24 fix : inspect shouldn't err on missing file
influx_inspect walks the data and wal directories building a list of
files to export. It then opens, reads, and exports each. If the file was
deleted between the time it was added to the list and the time the
inspect tool attempts to read it, the file is now skipped without
emitting an error.
2017-08-30 09:59:03 -04:00
Joe LeGasse a95647b720 cleanup: remove poor usage of ',ok' with maps
There are several places in the code where comma-ok map retrieval was
being used poorly. Some were benign, like checking existence before
issuing an unconditional delete with no cleanup. Others were potentially
far more serious: assuming that if 'ok' was true, then the resulting
pointer retrieved from the map would be non-nil. `nil` is a perfectly
valid value to store in a map of pointers, and the comma-ok syntax is
meant for when membership is distinct from having a non-zero value.
There was only one or two cases that I saw that being used correctly for
maps of pointers.
2017-08-30 09:49:31 -04:00
Stuart Carnie dd01132937 Merge pull request from influxdata/sgc-inmem-deadlock
Fix deadlock when calling `SeriesIDsAllOrByExpr`
2017-08-29 16:38:43 -07:00
Stuart Carnie 9f7f225c10 update CHANGELOG 2017-08-29 16:16:10 -07:00
Stuart Carnie 51eb85193c release lock to avoid dead lock when calling WalkWhereForSeriesIDs
* WalkWhereForSeriesIDs may call SeriesIDs, which may attempt to
  upgrade from a `RLock` to a `Lock`, causing the dead lock
2017-08-29 16:12:51 -07:00
Stuart Carnie 1b69928054 Merge pull request from influxdata/sgc-inmem-race
fix race condition reading seriesByID map
2017-08-29 07:41:46 -07:00
kun 5d5225e77d Fix panic when engine closed in a shard 2017-08-29 17:22:45 +08:00
Stuart Carnie 4129c2a606 Merge branch 'master' into sgc-inmem-race 2017-08-28 15:49:10 -07:00
Jonathan A. Sternberg 10ad7ae6a0 Merge pull request from influxdata/js-8699-force-subqueries-to-match-ordering
Force subqueries to match the parent queries ordering
2017-08-28 16:12:58 -05:00
Jonathan A. Sternberg 1c7bafcd3e Force subqueries to match the parent queries ordering
Previously, subqueries would honor their own ordering. We never really
supported that and I have no idea if it would work since most parts in
the query engine assume that points are being delivered in only one
ordering.

Subqueries have now been modified so if a person tries to do different
ordering, they get an error when running the query. If they specify an
ordering in the top most query, that ordering gets propagated to all
subqueries.

Fixes .
2017-08-28 15:57:40 -05:00
Stuart Carnie 7a1a3ebe04 update CHANGELOG 2017-08-28 13:39:18 -07:00
Stuart Carnie 0ced270197 fix race condition reading map 2017-08-28 13:36:49 -07:00
Jonathan A. Sternberg dad6d95bf8 Merge pull request from influxdata/js-explain-walk
Walk through the explain statement
2017-08-28 14:24:57 -05:00
Jonathan A. Sternberg 47fd076b1d Walk through the explain statement 2017-08-28 12:45:39 -05:00
Jonathan A. Sternberg 37f4a7b19b Merge pull request from influxdata/js-explain-ast
Update parser and AST for explain statement
2017-08-28 12:02:30 -05:00
Jonathan A. Sternberg 5593eecda6 Update parser and AST for explain statement 2017-08-28 11:36:06 -05:00
Jonathan A. Sternberg 5dbcd1b06f Merge pull request from influxdata/js-refactor-validation
Refactor validation code and move it to the compiler
2017-08-28 11:35:24 -05:00
Jonathan A. Sternberg 285bdf3542 Merge pull request from influxdata/js-close-shard-group-after-creating-iterators
Close the query shard group after the iterators are created
2017-08-28 11:35:07 -05:00
Jonathan A. Sternberg d2fcb893e1 Close the query shard group after the iterators are created
Now, the prepared statement keeps the open resource and closing the open
resource created from `Prepare` is the responsibility of the prepared
statement.

This also nils out the local shard mapping after it is closed to prevent
it from being used after it is closed.
2017-08-28 09:46:11 -05:00
Jonathan A. Sternberg 5cdd1b1489 Fix the panic message for the new interval iterator 2017-08-26 17:36:32 -05:00
Jonathan A. Sternberg ef0ad3292d Remove unused functions in influxql/ast.go 2017-08-26 17:36:32 -05:00
Jonathan A. Sternberg 905e7fe05e Refactor validation code and move it to the compiler
This refactors the validation code so it is more flexible and performs a
small bit of work to make preparing and executing the query easier.

The general idea is that compilation will eventually do more heavy
lifting in creating the initial plan and prepare will construct an
actual plan rather than just doing some basic field rewriting.

This change at least sets us up for that change in the future and moves
the validation code to the query execution instead of in the parser.

This also frees up the parser to parse the complete AST without worrying
if the query itself is valid. That could be useful for client code that
wants to compile a partial query to an AST and then perform
modifications on the AST for some reason.
2017-08-26 17:36:32 -05:00
Jonathan A. Sternberg b61b030b8c Merge pull request from influxdata/js-refactor-select
Refactor the select call into three separate phases
2017-08-26 17:33:48 -05:00
Jonathan A. Sternberg 8738e72cf1 Refactor the select call into three separate phases
The first call is to compile the query. This performs some initial
processing that can be done before having any access to the shards. At
the moment, it does very little, but it's intended to be changed to
eventually perform initial validations of the query and create an
internal graph structure for the execution of the query.

The second call is to prepare the query. This step has access to the
shard mapper. Right now, it just maps the shards and rewrites the fields
of the query for any wildcards. In the future, it is intended to do the
above, but also to prepare the final directed acyclical graph that will
execute the query.

The third call is to select the query. This step is intended to create
all of the iterators for processing the query. At the moment, much of
the work intended for the second step is performed in the third step.
2017-08-25 07:50:13 -05:00
Jonathan A. Sternberg f7724b780a Add benchmark tests back 2017-08-25 07:50:02 -05:00
Jonathan A. Sternberg d46e8ffdae Merge pull request from influxdata/js-map-shards-interface
Pass the select options to the shard mapper again
2017-08-24 12:26:15 -05:00
Jonathan A. Sternberg 421a91d480 Pass the select options to the shard mapper again 2017-08-24 09:55:02 -05:00
Ben Johnson bd2963dc05 Merge pull request from influxdata/er-8695-iterators
Ensure that sorted heaps are merged correctly
2017-08-24 08:45:16 -06:00
Jonathan A. Sternberg 0eabef6c5d Merge pull request from influxdata/js-influxql-protobuf
Add back the protobuf marshaling inside of influxql
2017-08-24 09:40:48 -05:00
Edd Robinson 49d9077a61 Merge pull request from influxdata/er-8668-toml
Bump toml parser to relicensed MIT version
2017-08-24 11:03:14 +01:00