Commit Graph

1268 Commits (d5719f9be290aefd81e3dd059bd14517af6dcc60)

Author SHA1 Message Date
Stuart Carnie dbdb24e3dd
Merge branch 'main' into sgc/issue/7829_time_bounds 2023-05-30 15:46:53 +10:00
Stuart Carnie 600ed6652c
refactor: rewrite time-range expressions to a single range
Fixes gap filling, which was confused by multiple lower or upper
time bounds.
2023-05-30 15:46:45 +10:00
dependabot[bot] bfc395a30d
chore(deps): Bump comfy-table from 6.1.4 to 6.2.0 (#7883)
Bumps [comfy-table](https://github.com/nukesor/comfy-table) from 6.1.4 to 6.2.0.
- [Release notes](https://github.com/nukesor/comfy-table/releases)
- [Changelog](https://github.com/Nukesor/comfy-table/blob/main/CHANGELOG.md)
- [Commits](https://github.com/nukesor/comfy-table/compare/v6.1.4...v6.2.0)

---
updated-dependencies:
- dependency-name: comfy-table
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Dom <dom@itsallbroken.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-05-29 09:22:56 +00:00
Christopher M. Wolff 2a07b53879
feat: add more tag predicate rewrite logic for InfluxQL (#7869)
* feat: add more tag predicate rewrite logic for InfluxQL

* chore: cargo fmt

* chore: fmt

* test: add more tests

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-05-26 21:53:52 +00:00
Andrew Lamb 1ff76b7bf2 chore: use workspace dependencies for `object_store` 2023-05-26 07:03:42 -04:00
wiedld 7bcde3c544
chore(7618): trace ingester response encoding v2 (#7820)
* test: integration test for tracing of queries to the ingester

* chore: add FlightFrameEncodeRecorder to record spans per each polling result

* refactor(trace): impl TraceCollector for Arc

Allow any Arc-wrapped TraceCollector implementation to be used as a
TraceCollector. This avoids needing to as_any() and downcast later.

* test: assert FlightFrameEncodeRecorder trace spans

This test exercises the FlightDataEncoder wrapped with the trace
decorator (FlightFrameEncodeRecorder) when executing against a data
source that yields data after varying numbers of Stream polls.

This test passing will validate the FlightFrameEncodeRecorder correctly
instruments the amount of time a client spends waiting on the
FlightDataEncoder to acquire or encode a protocol frame, but also
ensures the decorator correctly accounts for varying behaviours allowed
through the Stream abstraction. It does this by simulating a data source
that is not always immediately ready to provide data, such as a buffer
wrapped in a contended async mutex.

* refactor: move tracing decorator into separate mod

* fix: record spans

* refactor(test): update test

The frame encoder is not one-to-one - it emits two frames for the first
data payload, a schema and a payload. This commit updates the test to
account for it!

* refactor: remove unneeded mut ref, and use enum state method which panics when in a (should be unreachable) state

* chore: add more docs to FlightFrameEncodeRecorder and related

---------

Co-authored-by: Dom Dwyer <dom@itsallbroken.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-05-26 09:40:16 +00:00
Carol (Nichols || Goulding) c3117e7eb8
fix: Return 'already exists' errors from namespace and table gRPC APIs
When appropriate, rather than internal errors.
2023-05-25 13:19:33 -04:00
Andrew Lamb cdd519424d
feat(cli): Automatically send influx-trace-id, and improve help text (#7830)
* feat(cli): Automatically send influx-trace-id, and improve tracing CLI help

* fix: remove random ra

* fix: clippy

* fix: Update influxdb_iox/src/main.rs

Co-authored-by: Chunchun Ye <14298407+appletreeisyellow@users.noreply.github.com>

* refactor: Use Vec<String>

* fix: clippy

---------

Co-authored-by: Chunchun Ye <14298407+appletreeisyellow@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-05-25 09:43:55 +00:00
Marco Neumann bc18c6dc5f
refactor: re-land #7815. (#7852)
* refactor: consolidate pruning code

Let's have a single chunk pruning implementation in our code, not two.

Also removes a bit of crust from `QueryChunk` since it is technically no
longer responsible for pruning (this part has been pushed into the
querier for early pruning and bits for the `iox_query_influxrpc` for
some RPC shenanigans).

* test: regression test for incident

* fix: chunk pruning

* docs: add some test notes
2023-05-24 09:46:49 +00:00
Dom Dwyer e61fb3a78c
test: remove line numbers from asserts
I don't think the tests are that specific that they need to assert the
line.
2023-05-23 14:55:43 +02:00
Dom Dwyer 928a4d163e
build: remove unused dependencies from crates
This commit fixes loads of crates (47!) had unused dependencies, or
mis-configured dependencies (test deps as normal deps).

I added the "unused_crate_dependencies" to all crates to help prevent
this mess from growing again!

    https://doc.rust-lang.org/beta/nightly-rustc/rustc_lint_defs/builtin/static.UNUSED_CRATE_DEPENDENCIES.html

This has the minor downside of false-positives when specifying
dev-dependencies for test/bench binaries - these are files in /test or
/benches (not normal tests). This commit includes a workaround,
importing them in lib.rs (gated by a feature flag). I think the
trade-off of better dependency management is worth it!
2023-05-23 14:55:43 +02:00
Marco Neumann c5ee3250f7
fix: flaky `service::tests::test_log_on_panic` (#7850)
* refactor: remove line number from test

* refactor: clean up code

* fix: flaky `service::tests::test_log_on_panic`

This seems to be a really rare issue. So provoking it requires a lot of
tests. This can be done (using `fish`):

```console
$ while cargo with "parallel -n0 {bin} {args} ::: $(seq 10)" -- test -p service_grpc_influxrpc --lib -- --test-threads 20; echo; end
```

Fixes #7838.

* fix: panic handler construction

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-05-23 12:17:49 +00:00
Stuart Carnie d9feed3374
Merge branch 'main' into sgc/issue/7794_subquery_inconsistency 2023-05-23 09:52:28 +10:00
kodiakhq[bot] b9bcaf1aa0
Merge branch 'main' into savage/wal-regenerate-lp-cli-command 2023-05-22 16:18:44 +00:00
Fraser Savage 14b197ead7
refactor(cli): List all errors at the end of WAL LP regeneration 2023-05-22 16:58:45 +01:00
Marco Neumann 31b8813760
feat: hide `system.queries` table from prod by default (#7810)
Introduce a new header called `iox-debug` which when set enables certain
debug features. The first one will be the `system.queries` table which
is a process-local, namespace-scoped query log. In most prod setups this
is only useful for debugging and will confuse the user a lot because
when multiple queries are deployed then the K8s routing decides which
pod/process the users hits. This leads to an inconsistent view. However
the log is still useful for debugging.

This also wires the "debug header set" flag through the Flight ticket,
because JDBC proved (integration tests FTW!) that headers are only
passed to `GetFlightInfo` but not to `DoGet` and the ticket must encode
all the relevant information.

Closes #7119.

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-05-22 12:29:24 +00:00
Stuart Carnie ed9a16c4ad
chore: Add test to validate compatibility 2023-05-22 16:23:21 +10:00
Fraser Savage 44ec835191
docs: formatting fix of doc comment
Co-authored-by: Andrew Lamb <alamb@influxdata.com>
2023-05-19 14:02:56 +01:00
Christopher M. Wolff 90a25a3ff0
chore: update DataFusion (#7825)
* chore: update DataFusion

* chore: Run cargo hakari tasks

---------

Co-authored-by: CircleCI[bot] <circleci@influxdata.com>
2023-05-18 17:51:16 +00:00
Andrew Lamb 6344fe8c3f
chore: Add rationale for `clippy::future_not_send` (#7822)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-05-18 16:58:56 +00:00
Andrew Lamb e97c48b388
feat: download catalog objects as part of `remote store get-table` (#7779)
* feat: download catalog objects as part of remote store get-table

* fix: fix future_not_send

* fix: reorder import order

* chore: reduce repetition of `Error` in naming

* fix: improve the partition filtering API

* fix: clarify export comment

* fix: make index printing consistent

* fix: improve skip message

* chore: add extra clippy lints to inmport_export crate

* fix: comments

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-05-18 16:52:43 +00:00
Fraser Savage c263585d94
feat(cli): Add table ID `debug wal regenerate-lp` command implementation
This adds a command to `influxdb_iox` that can take a WAL segment file
and regenerate all write operation entries, writing to stdout or namespaced
files within a target directory, using table ID as the measurement name
in the case where there is no catalog access at point of regeneration.
2023-05-18 17:20:41 +01:00
Dom Dwyer 82500720e4
refactor(cli): update replication help text
The replication flag defines the total number of copies of each write -
slightly less confusing than the additional copies it was previously,
and matches with the actual code.
2023-05-18 16:01:12 +02:00
Andrew Lamb 042a6a66d5
refactor: remove old tsm import code (#7804)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-05-18 10:51:24 +00:00
Carol (Nichols || Goulding) 9cc2169ce2
fix: Rename Step::WaitForPersisted2 to Step::WaitForPersisted 2023-05-17 17:02:59 -04:00
Carol (Nichols || Goulding) 6785dcfd37
fix: Correct invalid test setups that the detector now detects 2023-05-17 17:00:17 -04:00
Carol (Nichols || Goulding) 45e47af974
test: Add an invalid test configuration checker
If the test setup calls `Step::Persist` to persist on-demand, that
means it shouldn't be used with `ChunkStage::Parquet`, which tries to
persist as fast as possible. This will fail the test with a hopefully
helpful message to prevent this.
2023-05-17 16:58:50 -04:00
Marco Neumann 62fed73bcd
refactor: upgrade DataFusion to `19b03240920ad63cac916b42951754c0337bdac8#19b03240920ad63cac916b42951754c0337bdac8` (#7813)
I need:

- https://github.com/apache/arrow-datafusion/pull/6226.

Changes in code due to:

- https://github.com/apache/arrow-datafusion/pull/6332

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-05-17 13:57:12 +00:00
Andrew Lamb 1ff11d0856
refactor: Change catalog configuration so it is entirely dsn based / support end to end testing without postgres (#7736)
* refactor: Change catalog configuration so it is entirely dsn based / support end to end testing without postgres

Restores code from https://github.com/influxdata/influxdb_iox/pull/7708

Revert "revert: PR #7708"

This reverts commit c9cfe05f8d.

* fix: merge

* fix: Update new test
2023-05-17 13:36:25 +00:00
Marco Neumann 7e64264eef
refactor: remove `RedudantSort` optimizer pass (#7809)
* test: add dedup test for multiple partitions and ranges

* refactor: remove `RedudantSort` optimizer pass

Similar to #7807 this is now covered by DataFusion, as demonstrated by
the fact that all query tests (incl. explain tests) still pass.

The good thing is: passes that are no longer required don't require any
upstreaming, so this also closes #7411.
2023-05-17 09:30:04 +00:00
Nga Tran ca12f1c03d
fix: correctly recurse in `ParquetSortness` (#7778)
* test: reproducer for idpe_17556

* fix: `ParquetSortness` and partial opt

1. correctly handle cases where `ParquetSortness` would optimize one
   child branch but not the other
2. handle cases where `ParquetSortness` recusion should stop a bit
   clearer (using `TreeNodeRewriter`)
3. rename query tests to be a bit clearer
4. add test case with many (but not too many) duplicate files and an
   ingester (basically a prod use case where the compactor is slightly
   behind)

---------

Co-authored-by: Marco Neumann <marco@crepererum.net>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-05-17 06:09:23 +00:00
Stuart Carnie d7ab96c879
Merge branch 'main' into sgc/issue/6879_subquery_01 2023-05-17 07:20:08 +10:00
wiedld a4ad4fe69e
fix(4895): handle measurement missing, null bytes, and `=` in measurement names (#7759)
* test: add tests for the desired contract for parsing measurements from line protocol
* fix: restrict null chars in measurement
* chore: make an explicit Measurement type
* refactor: have iox lp parser match influxdb contract, for acceptance of eq in measurements
* test: create end_to_end test to confirm same write-then-read behavior with `=` in measurements, is the same as influxdb
2023-05-16 10:48:39 -07:00
Andrew Lamb c077dec0e0
refactor: rename `import` to `iox_import_export` (#7799)
* refactor: rename `import` crate to `import_export`

* chore: Consolidate tsm import/export

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-05-16 17:10:17 +00:00
Stuart Carnie 5a813fb61f
chore: Simplify first queries 2023-05-16 10:18:34 +10:00
Stuart Carnie d2fe92f71e
chore: Add additional queries to be fixed by #7794 2023-05-16 10:05:04 +10:00
Stuart Carnie 2e30442a86
Merge branch 'main' into sgc/issue/6879_subquery_01 2023-05-16 09:15:03 +10:00
wiedld 867fd39dbf
Merge branch 'main' into authz/refactor-interface 2023-05-15 08:03:10 -07:00
Stuart Carnie 7ba619a32b
feat: outer GROUP BY pushed down to subqueries; more Cloud 2 examples 2023-05-15 15:31:20 +10:00
Stuart Carnie 62a4c02836
feat: Handle default FILL behaviour for subqueries 2023-05-15 11:22:26 +10:00
Stuart Carnie c77c4b3d23
feat: support nested aggregate subqueries 2023-05-15 09:31:06 +10:00
Stuart Carnie 4e96f814db
chore: Improve docs 2023-05-15 07:21:36 +10:00
Stuart Carnie e0941a9875
Merge branch 'main' into sgc/issue/6879_subquery_01 2023-05-15 07:19:20 +10:00
wiedld ea3029ee3f refactor: break out Authorizer trait versus IoxAuthorizer struct.
* make the boundaries more evident
* also make explicit what actions are tied to the IoxAuthorizer client (a.k.a. the client connection & request)
2023-05-12 15:28:58 -05:00
Carol (Nichols || Goulding) 1770d0f4d8
fix: Move ingester-querier gRPC communication to its own crate 2023-05-12 13:28:30 -04:00
dependabot[bot] bd1d1f648c
chore(deps): Bump serde from 1.0.162 to 1.0.163 (#7780)
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.162 to 1.0.163.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.162...v1.0.163)

---
updated-dependencies:
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-12 13:07:56 +00:00
Stuart Carnie f4a19fc6c1
fix: Aggregate subqueries with push-down `GROUP BY tags` 2023-05-12 16:53:16 +10:00
Stuart Carnie 87dca540a7
feat: More subqueries succeeding 2023-05-12 13:55:42 +10:00
Stuart Carnie 0c391de410
Merge branch 'main' into sgc/issue/6879_subquery_01 2023-05-11 06:02:09 +10:00
Dom 8baf82071f
Merge branch 'main' into dependabot/cargo/console-subscriber-0.1.9 2023-05-10 10:12:24 +01:00