Commit Graph

556 Commits (efdc6e592bb60a5357d90c045834d8943b4822c9)

Author SHA1 Message Date
Lorenzo Affetti ef238ae064 skipping failing e2e tests 2019-08-06 12:48:32 +02:00
j. Emrys Landivar (docmerlin) b303d54584 perf(query): hoist bucket lookups so we do not look up per table
perf(query): hoist bucket lookups so we do not look up per table
2019-08-05 16:02:33 -05:00
j. Emrys Landivar (docmerlin) 24c1f21e4e WIP 2019-08-05 13:16:51 -05:00
Christopher M. Wolff 42bb664aaf
feat(query): add storage request duration metric (#14534)
influxdata/idpe#4126
2019-08-02 08:53:14 -07:00
Jonathan A. Sternberg e4c89cbe0c
feat(query/stdlib): push down exists operator to storage (#14538)
The `exists` operator now gets pushed down to storage correctly. If
`exists` is used on a tag, then it will be rewritten to `tag != ""`
which is how storage defines if a tag exists. If `not exists` is used,
then it will use `tag == ""` which is how you would query storage for
only if a tag doesn't exist.

The `tag == ""` and `tag != ""` are different. For `tag == ""`, the
predicate is impossible for the storage layer to return true with.
Ideally, we would just rewrite this to return nothing and we wouldn't
bother with even querying storage. Instead, we just do not rewrite this
predicate because it cannot be rewritten to make sense with storage. If
we see `tag != ""`, it is the only one that can be passed through as-is
because `tag != ""` returns the same values as `exists tag`. It will
return true for every non-null value.
2019-08-02 09:31:10 -05:00
Christopher M. Wolff e142f6ca7c
fix(query): add LookupName method to dependency interfaces (needed by flux to()) (#14498) 2019-08-01 10:10:43 -07:00
George b2fe0d1d63
fix(tasks): surface flux errors on pre-auth check (#14492) 2019-07-31 11:46:28 +02:00
Christopher Wolff 3855ad9f33 chore: update Flux to v0.37.2 2019-07-24 12:57:37 -07:00
Christopher Wolff 63c0f40548 fix(query): use auth-wrapped org and bucket services for query 2019-07-19 20:02:53 -06:00
Jonathan A. Sternberg 47b032464f
refactor(query): handle flux errors in the query controller instead of http (#14368)
If we handle the flux errors in the query controller, it makes it so we
are handling the errors in the location where the happen rather than at
a layer further up the stack.

This should simplify it so the errors are handled in this single
location instead.
2019-07-18 11:43:15 -05:00
Jonathan A. Sternberg ee7ff84d8b
feat(query/stdlib): update influxdb sources to use flux error codes (#14346)
Update the influxdb sources to be annotated with flux error codes. This
will enable us to identify different response codes for these
operations.
2019-07-16 09:15:46 -05:00
Nathaniel Cook e59c72b245 fix(tests): update e2e tests for new flux executetest methods 2019-07-12 11:15:58 -06:00
Nathaniel Cook 92a4ee53cf fix(query): skip tests 2019-07-12 11:15:58 -06:00
Jonathan A. Sternberg a0f585bd56
fix(query/stdlib): remove skip from the flux e2e tests (#14253)
The underlying bug that caused them to be flaky has been fixed.
2019-07-03 12:03:22 -05:00
Nathaniel Cook 11a4b911b0 fix(query/influxql): use explicit mergeKey parameter 2019-07-03 09:48:31 -06:00
Jonathan A. Sternberg 3d9b9fe36f
chore(query): disable flaky end to end tests for flux (#14231) 2019-06-28 10:15:47 -05:00
Adam d85ef69e19 Merge remote-tracking branch 'origin/master' into flux-staging 2019-06-19 13:38:49 -04:00
Adam 1d84bf6516 fix(stdlib/testing): skip flaky test regexp_replaceAllString 2019-06-18 16:25:59 -04:00
roshie548 15f66d1b98 moved field declaration line 2019-06-18 08:51:34 -07:00
roshie548 f45d616eaa added test case 2019-06-18 08:51:34 -07:00
roshie548 13b397bb3c fix(stdlib): Fixed to() creating too many rows for multiple fields
If a table has multiple field values, to() no longer writes rows multiple times.
2019-06-18 08:51:34 -07:00
Christopher Wolff e495ca3e27 fix(query): recover from panics during compiler and start steps
Fixes influxdata/idpe#3409.
2019-06-11 08:41:13 -07:00
Jonathan A. Sternberg 65dabb0774
Merge branch 'master' into flux-staging 2019-06-06 11:22:04 -05:00
Lorenzo Affetti 5f8796aca6
Merge pull request #14044 from influxdata/fix/gen-promql
fix(promql): synch generated code
2019-06-05 17:53:51 +02:00
Jonathan A. Sternberg 42c8ce3481
fix(query/stdlib): remove skips for tests that were flaky from table.Do (#14048) 2019-06-03 11:56:25 -05:00
Lorenzo Affetti 6e4c66e21f fix(promql): synch generated code 2019-06-03 17:47:59 +02:00
Jonathan A. Sternberg c6bb1ef4e2
fix(query/control): queue size test was flaky (#14030)
In the QueueSize test, it was possible that after the `done` channel was
closed, one of the queries from the queue would begin executing. If all
three began executing before the shutdown was done, the third would
block on attempting to send a value to the `executing` channel and it
would never finish so the controller would report that shutdown failed.

This increases the queue size to a combination of the concurrency quota
and the queue size so all of the started queries will never block when
sending a signal to the executing channel.
2019-05-31 08:59:45 -05:00
Christopher Wolff 6d3cf4b71e test(query): update typo in Flux in test
This test started failing as a result of influxdata/flux/#1312.
2019-05-30 16:29:31 -07:00
Jonathan A. Sternberg 2b1c1ec143
fix(storage/reads): fix the storage tables to work correctly with multiple transformations (#14016)
The storage table reader will now work correctly when there are multiple
outputs. The table interface now implements the new table and column
reader interfaces and works properly with `execute.CopyTable`. The
source uses `execute.CopyTable` to buffer the table in memory when there
are multiple output transformations.
2019-05-30 12:31:54 -05:00
Jonathan A. Sternberg c560e27e1d
chore(flux): update to Flux v0.31.1 (#14015) 2019-05-29 15:48:23 -05:00
Jonathan A. Sternberg 21c80f3e93
refactor(query/control): move the controller from flux to influxdb (#13991)
The controller implementation is primarily used by influxdb so it
shouldn't be part of the flux repository. This copies the code from flux
to influxdb so it can be removed from the next flux release.
2019-05-29 09:04:34 -05:00
Jonathan A. Sternberg ebdbc394fc
chore(flux): update to Flux v0.31.0 (#14002)
* refactor(storage/reads): update the table implementation for the interface change (#13994)

* chore(flux): update to Flux v0.31.0
2019-05-28 17:24:26 -05:00
docmerlin (j. Emrys Landivar) fa849d5c0b chore(testing) skip flakey test 2019-05-28 10:49:16 -05:00
Nathaniel Cook 8ebd6c8315 chore(query): add missing skip tests from merge 2019-05-15 10:18:08 -06:00
Lorenzo Affetti 44fb090468 test(flux/e2e): export skip list 2019-05-13 19:14:52 +02:00
Adam ae25f0c448 Merge remote-tracking branch 'origin/master' into flux-staging 2019-05-09 15:29:00 -04:00
Jonathan A. Sternberg dd56c23343
fix(query/influxql): update transpiler for moved/renamed code (#13740)
The `databases()` function was moved into the `influxdata/influxdb/v1`
package and so it wouldn't work anymore. The `percentile()` call was
changed to `quantile()` and the argument was changed to `q`. This also
updates `median()` to use `median()` since we now produce AST's and not
the spec so we can use the `median()` definition instead.
2019-05-09 11:22:32 -05:00
Adam 415f698491
Merge pull request #13830 from influxdata/fix/to_heterogeneous
Fix/to heterogeneous
2019-05-08 16:45:46 -04:00
Adam 397c33a0dc fix(stdlib/influxdata): fix influxdb.to function to process heterogeneous tables 2019-05-08 09:37:43 -04:00
jlapacik dc59629f69 fix(influxdb): better error message when range not pushed down
Fixes https://github.com/influxdata/flux/issues/1224.
2019-05-07 09:59:58 -07:00
jlapacik faab75968b refactor(storage): remove Read method from Store interface 2019-05-03 11:02:20 -07:00
jlapacik 7333847e2a refactor(influxdb): remove and/or transfer duplicated tests 2019-05-03 11:02:20 -07:00
jlapacik 0ce05e7ad6 refactor(influxdb): remove old FromProcedureSpec 2019-05-03 11:02:20 -07:00
Lorenzo Affetti 33418aac2c test(flux/e2e): skip flaky window_generate_empty test 2019-05-02 18:19:07 +02:00
jlapacik e50508a349 feat(influxdb): enable group pushdown rule
Closes #13623.
2019-05-01 10:35:10 -07:00
jlapacik 95aa194498 feat(storage): ReadGroup RPC definitions and storage reader 2019-05-01 10:35:10 -07:00
jlapacik 5f87134ca8 feat(query): physical group operation and pushdown rule
test(query): group pushdown rule
2019-05-01 10:35:10 -07:00
Jonathan A. Sternberg 1a254a3293
feat(stdlib): enable the tag keys optimization for meta queries (#13705) 2019-04-30 21:32:47 -05:00
Stuart Carnie fb39ac39ce
fix(storage): Store.Read behavior changed to return unsorted series keys
Closes #13581
2019-04-26 10:38:59 -07:00
Jonathan A. Sternberg 46d2d0012b fix(storage): translate _measurement and _field to the proper strings (#13662)
The RPC call should translate `_measurement` and `_field` to their
proper shortened byte strings when requesting the tag values.

This also fixes the planner rewrites to return the root node even when
no rewrite happened as this is required by the planner.
2019-04-26 10:36:51 -07:00
Nathaniel Cook e651b020b2 refactor(query): enable new planner rules and remove old rules 2019-04-25 11:16:11 -07:00
Ben Johnson 01bfcf822b
Merge point parse & explode (#12377)
Merge point parse & explode
2019-04-24 10:30:16 -06:00
Ben Johnson 272f340c30
Merge point parse & explode. 2019-04-24 10:12:15 -06:00
Jonathan A. Sternberg 5e77bd1e28
feat(query): implement the read tag values rpc call in the query engine (#13559)
If a pattern is seen that matches the `v1.tagValues(...)` call, then it
will be replaced with a direct RPC call to read the tag values for the
selected tag key which should be better optimized than reading from the
storage engine tsm1 files.
2019-04-23 12:56:35 -05:00
Nathaniel Cook bc17af2118
Merge pull request #13569 from influxdata/flux-staging
chore(dep): update Flux to v0.27.0
2019-04-22 18:34:39 -06:00
Kelvin Wang 7a72c363f2 remove org from bucket 2019-04-22 18:39:05 -04:00
Kelvin Wang 9d44ac3635 rename bucket organization to org 2019-04-22 18:39:01 -04:00
Nathaniel Cook a49d1696dc Merge branch 'master' into flux-staging 2019-04-22 14:25:33 -06:00
Christopher M. Wolff c9f94d4ee8
refactor(query): add parameters to query controller config (#13554)
Recently added to controller config:
  ConcurrencyQuota
  MemoryBytesQuotaPerQuery
  QueueSize
2019-04-22 12:11:32 -07:00
Jonathan A. Sternberg e5657ca62b
feat(query): implement the read tag keys rpc call in the query engine (#13513)
If a pattern is seen that matches reading the tag keys, it will be
replaced with a direct RPC call to read the tag keys which should be
better optimized than reading from the storage engine tsm1 files.
2019-04-22 14:09:44 -05:00
Jonathan A. Sternberg c98c29c1d1
feat(query): add push down rule for filters to read range procedure (#13512)
The read range procedure that uses the new rpc endpoints will now accept
filters using the same rules as the previous physical from procedure
spec.
2019-04-18 18:18:41 -05:00
Nathaniel Cook 4c77e3598b Merge branch 'master' into flux-staging 2019-04-18 11:01:22 -06:00
Nathaniel Cook 4c1cdd2095 fix(query): add panic stack to logs for query logging recovery 2019-04-18 10:57:43 -06:00
Nathaniel Cook 07f98e31e7 fix(query): fix misc tests with new master Flux 2019-04-18 10:51:35 -06:00
Todd Persen cd64ec8718 Fix typos in miscellaneous packages 2019-04-17 13:30:22 -07:00
Nathaniel Cook 8b918539db Merge branch 'master' into flux-staging 2019-04-17 12:26:10 -06:00
Mark Rushakoff d0517f288a fix(query): return statistics even in encoder error case
The ProxyQueryServiceAsyncBridge was not returning statistics when there
was an encoder error. Because the encoder was just writing to an
io.Writer, it was possible that a remote disconnect could happen and
statistics could not be reported.
2019-04-16 09:51:13 -07:00
jlapacik 89bf535602
test(stdlib): skip flaky range test (#13405) 2019-04-15 10:08:50 -07:00
Christopher M. Wolff 77f1b0da4b fix(query): re-enable some from/to bucket tests (#13334) 2019-04-12 07:15:27 -07:00
Adam 29df88127f refactor(query/preauthorizer): preauthorizer now uses a BucketsAccessed method that accepts AST (#13302) 2019-04-12 07:15:27 -07:00
jlapacik 20b492bb13 refactor(influxql): compile with planner options (#13288) 2019-04-12 07:15:27 -07:00
Christopher M. Wolff 6c3f1a05b9 refactor(query): allow code to compile despite BucketsAccessed (#13282)
BucketsAccessed doesn't work currently with a private flux.Spec.
See this issue: https://github.com/influxdata/influxdb/issues/13278

This set of changes just allows code to compile until #13278 is fixed.
Note that preauthorization is not working in the meantime.

Fixes #13275.
2019-04-12 07:15:27 -07:00
Christopher M. Wolff 5e09aa178b fix(query): make mock Query close its results channel (#13242) 2019-04-12 07:15:27 -07:00
Christopher M. Wolff 16b9158b39 refactor(task): make tasks use new Query interface (#13219)
Fixes #12883.
2019-04-12 07:15:27 -07:00
Christopher M. Wolff dec149d22d refactor(query): update testing InfluxQL testing compiler to use new interface (#13107)
Fixes influxdata/flux#1099.
2019-04-12 07:15:27 -07:00
Nathaniel Cook f37e65f26c fix(query): change logging bridge to be a service instead
It is no longer necessary for the query logging to be a bridge as the
stats are available for consumption from the ProxyQueryService.
This change changes the logging bridge to directly implement the proxy
query service instead of implementing a bridge.
2019-04-11 14:46:45 -06:00
Jacob Marble f56c42794b
chore(tracing): Cleanup (#13296)
* chore(tracing): Cleanup

* broken test

* fix unused var

* fix test
2019-04-10 19:28:21 -07:00
kelwang be674622c6
Revert "fix(inmem): remove the old inmem implementation" 2019-04-09 14:24:40 -04:00
kelwang d0022dfd5c
Merge pull request #13039 from zhulongcheng/rm-inmem-impl
fix(inmem): remove the old inmem implementation
2019-04-09 13:06:50 -04:00
jlapacik 8078b915fd refactor(storage): ReadFilter storage operation 2019-04-08 15:59:37 -07:00
zhulongcheng cacd6a8223 fix(inmem): replace inmem.Service with kv.Service 2019-04-08 15:18:38 +08:00
Jonathan A. Sternberg 72726cbe85
Merge branch 'master' into flux-staging 2019-04-01 10:59:43 -05:00
Lorenzo Affetti c4ae25ca39
Merge pull request #12812 from influxdata/test/memory-limits
test(launcher): test for query memory limits and launcher test helpers
2019-03-28 15:48:16 +01:00
Christopher M. Wolff f945b84642
refactor(stdlb): Change plan.PlanNode to plan.Node (#12906) 2019-03-27 14:19:04 -07:00
Nathaniel Cook ca6f2ad0c6 Merge branch 'master' into flux-staging 2019-03-27 09:42:48 -06:00
Lorenzo Affetti 90a48c74f6 test(launcher): test for query memory limits and launcher test helpers 2019-03-27 15:50:35 +01:00
Lorenzo Affetti a49bb73c04 chore: update Flux to v0.23.0 2019-03-26 18:04:18 +01:00
Christopher M. Wolff 56e688beee
fix(query): add Check method to query service interfaces (#12866)
Fixes influxdata/idpe#2756.
2019-03-25 20:05:44 -07:00
Lorenzo Affetti d18c6e5ffe
fix(query/stdlib/influxdb): return error on point explosion (#12774) 2019-03-20 15:45:31 +01:00
jlapacik adbfddb0ef
Flux staging (#12760)
* deps: update flux-staging to master of both influxdb and flux (#12698)

* test(stdlib): skip failing window test due to new trigger optimization (#12708)

* chore: update Flux to v0.22.0
2019-03-19 22:19:24 -07:00
Mark Rushakoff 490499267b fix(query): allow multiple calls to Release proxy bridge iterator
The asyncStatsResultIterator used inside QueryServiceProxyBridge assumed
that Release would only be called once. The godoc for ResultIterator
specifies that it is safe to call Release multiple times. Now, you can
do that without causing Release to block indefinitely.
2019-03-19 16:06:43 -07:00
jlapacik 9324d5c1a1
test(stdlib): skip failing window test due to new trigger optimization (#12708) 2019-03-19 09:16:47 -07:00
Jonathan A. Sternberg 862f168967
deps: update flux-staging to master of both influxdb and flux (#12698) 2019-03-18 16:13:02 -05:00
jlapacik 124a2c6b6c test(stdlib): fix mismatched planner node types (#12695) 2019-03-18 14:54:48 -05:00
Jonathan A. Sternberg 0d045630c8
fix(query): release the query results before requesting statistics (#12622)
The statistics are only finalized after release is called. Defer a call
to release to ensure they are released, but explicitly release on
success to ensure that the statistics are finalized from all sources
before returning them.
2019-03-14 11:12:53 -05:00
Jonathan A. Sternberg e3ac5ffecf
feat(query/mock): create a mock object for the query interface (#12628) 2019-03-14 11:08:48 -05:00
Kelvin Wang dcc052b1c2 fix(query): fix same bucket name with different orgs 2019-03-08 20:37:05 -05:00
Jacob Marble 603a1f26e0 use tracing.StartSpanFromContext 2019-03-07 12:12:31 -07:00
Jacob Marble ed4e3e130b return n with error 2019-03-07 12:12:31 -07:00
Jacob Marble 9541e861a3 goimports -w -local github.com/influxdata/influxdb 2019-03-07 12:12:31 -07:00