Commit Graph

258 Commits (aff5e6d69a839e99eb553bad04152acb57998e2c)

Author SHA1 Message Date
Andrew Lamb 087dbd3eca
fix: fix heappy + update docs (#4917)
* docs: Update heap profiling documentation

* fix: fix heappy builds

* fix: do not run cli tests with heappy

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-06-21 19:53:28 +00:00
Marco Neumann 66c7d95312
refactor: use new ingester<>querier wire protocol (#4867)
* refactor: use new ingester<>querier wire protocol

Use and document the new and more flexible ingester<>querier wire
protocol.

Note that the ingester does NOT stream the response data yet, but the
internal data structures would allow that. A follow-up change will
adjust the ingester code to stream the data.

Ref #4849.

* fix: typos

Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>

* refactor: clarify naming and public interface

* test: add schema assertion to `ingester_response_to_record_batches`

Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
2022-06-16 08:02:28 +00:00
Carol (Nichols || Goulding) 874ef89daa
feat: Make specifying the write buffer, and thus getting a sharder, optional in querier 2022-06-15 10:01:45 -04:00
Marco Neumann 3bd24b67ba
feat: extend flight client to accept multiple (changing) schemas (#4853)
* feat: extend flight client to accept multiple (changing) schemas

See #4849.

Originally I intended not to use Flight at all for the new
ingester<>querier protocol. However since flight also deals with
dictionary batches and multiple batches and the gRPC protocol that I
would write would look very similar, I will use Flight with a bit more
flexible message types.

The rough idea for the protocol is the following stream:

- for each partition:
  1. "none" message with partition metadata
  2. for each chunk (can have different schemas under certain
     circumstances):
     1. "schema" message (resets dictionary state)
     2. (optional) dictionary batch messages
     3. one or more "record batch" message

The nice thing about it is that the same arrow client works also for the
existing client<>querier protocol since there we just send:

1. "schema" message (no app metadata)
2. (optional) dictionary batch messages
3. zero, one or more "record batch" message (no app metadata)

* refactor: separate high- and low-level flight client

It is very unlikely that a user will use the high-level batch-producing
functionality and the low-level stuff within the same session. So let's
split this into to clients (high-level uses the low-level one
internally) to avoid confusion.

Also add documentation on our protocol handling.

* refactor: enumerate all variants in match statement to better catch errors in the future
2022-06-15 11:38:08 +00:00
Carol (Nichols || Goulding) 1c7cbaf5ae
refactor: Use DurationHistogram in more places 2022-06-09 14:20:51 -04:00
Andrew Lamb 1472ec272f
refactor: consolidate duplicate testing logic (#4708)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-06-01 20:02:13 +00:00
Dom Dwyer 1caeb04869 test(e2e): do not mangle prod database
Unset the all env vars for the following CLI e2e tests:

    * default_mode_is_run_all_in_one
    * default_run_mode_is_all_in_one

This prevents them from executing against the "prod" catalog, running
migrations and inserting values to the prod database specified in the
prod DSN env (INFLUXDB_IOX_CATALOG_DSN).
2022-06-01 17:12:12 +01:00
Dom Dwyer 60de97ac26 test(e2e): ensure "partition pull" writes files
Adds a test case covering the "remote partition pull" command configured
with file-based object storage.
2022-06-01 16:41:57 +01:00
Dom Dwyer 6d647fb7a9 refactor: warn for silly object store configs
Warn when downloading files to an in-memory object store.

The "remote partition pull" command downloads parquet files from an
object store via a router, and saves them locally. It's pretty unlikely
the user intends to download those files to memory of the CLI process
which then exits when the pull is complete, throwing away the downloaded
files, but this is the default.
2022-06-01 16:41:57 +01:00
Andrew Lamb 700a1de8f3
fix: fix at least one intermittent failure (#4711) 2022-05-26 21:24:37 +00:00
Andrew Lamb 633117e595
feat: avoid catalog access on each query (#4650)
* feat: cache catalog access on query

* fix: Apply suggestions from code review

Co-authored-by: Carol (Nichols || Goulding) <193874+carols10cents@users.noreply.github.com>

Co-authored-by: Carol (Nichols || Goulding) <193874+carols10cents@users.noreply.github.com>
2022-05-26 20:44:22 +00:00
Marko Mikulicic 9ddb0a816e
fix: Return panic message in internal error (#4693)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-05-25 15:11:17 +00:00
Marco Neumann a08a91c5ba
fix: ensure querier cache is refreshed for partition sort key (#4660)
* test: call `maybe_start_logging` in auto-generated cases

* fix: ensure querier cache is refreshed for partition sort key

Fixes #4631.

* docs: explain querier sort key handling and test

* test: test another version of issue 4631

* fix: correctly invalidate partition sort keys

* fix: fix `table_not_found_on_ingester`
2022-05-25 10:44:42 +00:00
Marko Mikulicic cdbe546e50
fix: return gRPC error on panic (#4686) 2022-05-25 07:06:25 +00:00
Andrew Lamb a8d5f7f5f7
test: add debug output to test (#4684) 2022-05-24 19:57:11 +00:00
Marco Neumann 9c1ffc2b0d
test: panic handling, add compactor to end to end test harness (#4677)
* feat: add test gRPC client

* test: start compactor in mini cluster

* test: assert panic handling

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-05-24 14:55:26 +00:00
Marco Neumann 2029bd16ba
feat: enable debugging of failed querier->ingester requests (#4659)
* feat: enable debugging of failed querier->ingester requests

- extend `query-ingester` CLI to allow usage of predicates
- on failed requests: log all information that required for the CLI
- test the "ingester fails" scenario

* test: explain

Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>

* docs: improve

Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>

* refactor: move b64 pred. serde into a single crate

Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
2022-05-23 15:37:31 +00:00
Carol (Nichols || Goulding) 30e53fd09c
fix: Rename end-to-end NG tests to not contain NG
Connects to #4450.
2022-05-12 16:09:07 -04:00
Carol (Nichols || Goulding) 48e6e5713d
fix: Rename test_helpers_end_to_end_ng to test_helpers_end_to_end
Connects to #4450.
2022-05-12 16:09:07 -04:00
Carol (Nichols || Goulding) 78bbe629b2
feat: Add more logging to understand the flaky multi ingester test better (#4580)
* feat: Increase logging to investigate multi ingester flaky test

* feat: Temporarily disable a test while logging is increased in CI

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-05-12 20:05:05 +00:00
Carol (Nichols || Goulding) 2079cf98f6
fix: Add back a test case that needs to check ingester for write info
Specifically because the querier doesn't know about the ingester.
2022-05-11 15:30:59 -04:00
Carol (Nichols || Goulding) 48b84b3bdf
feat: Querier can get write status from ingesters
Connects to influxdata/influxdb-iox-client-go#27.
2022-05-11 14:12:10 -04:00
Andrew Lamb b8cb4c3f2b
feat: Interrogate schema from querier (as well as router) (#4557)
* refactor: move SchemaService into `service_grpc_schema`

* feat: implement schema gRPC for querier

* chore: Run cargo hakari tasks

Co-authored-by: CircleCI[bot] <circleci@influxdata.com>
2022-05-10 20:55:58 +00:00
Andrew Lamb 03ee6840d0
feat: Add `debug namespaces` CLI command (#4556) 2022-05-10 18:35:05 +00:00
Andrew Lamb 84fd883688
feat: Add query_ingester CLI command (#4554)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-05-10 18:18:07 +00:00
Carol (Nichols || Goulding) fcd4815645
fix: Rename router2 to router 2022-05-06 14:51:52 -04:00
Carol (Nichols || Goulding) 485d6edb8f
refactor: Move IngesterQueryRequest to generated_types 2022-05-06 14:45:37 -04:00
Andrew Lamb 1d749b3b09 Merge remote-tracking branch 'origin/main' into cn/aio-default 2022-05-06 10:58:11 -04:00
Carol (Nichols || Goulding) 75356ab9e6
feat: Make top-level command optional; run all-in-one mode by default 2022-05-06 10:26:24 -04:00
Carol (Nichols || Goulding) 7cadb0192b
fix: Make all-in-one mode be the default run mode 2022-05-06 10:24:45 -04:00
Jake Goulding 041e758a6f
refactor: Move the `schema` command to `debug schema` 2022-05-06 09:48:30 -04:00
Andrew Lamb bc77f87ea9
feat: port influxrpc read_group and read_window_aggregate e2e test to NG (#4464)
port more
2022-04-29 16:13:32 +00:00
Carol (Nichols || Goulding) e5cbee9fa8
fix: Delete OG end-to-end tests 2022-04-29 10:32:21 -04:00
Andrew Lamb 6381ea60bb
chore: port remaining read_filter influxrpc tests to NG (#4383)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-04-29 14:06:50 +00:00
Andrew Lamb ed1ad858c0
chore: add some logging to flaky end to end test (#4465)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-04-29 11:06:06 +00:00
Paul Dix 8e48fcd620
feat: add remote pull partition (#4433)
Add lookup of partitions by table id to catalog.
Add API to catalog to return partitions by table id.
Add to client to return partitions by table id.
Add CLI to pull remote schema, partition, and parquet files into a local catalog and object store.
2022-04-28 21:04:27 +00:00
Andrew Lamb 63df3ceb6f
feat: share server processes in end to end test (#4387)
* feat: share server processes in end to end test

* fix: Apply suggestions from code review

Co-authored-by: Carol (Nichols || Goulding) <193874+carols10cents@users.noreply.github.com>

Co-authored-by: Carol (Nichols || Goulding) <193874+carols10cents@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-04-28 17:51:14 +00:00
Dom Dwyer 246af0c3ca test: remove hard-coded metric count
Prior to this commit, adding any metric to the catalog (and only the
catalog) would cause the end_to_end_ng_cases::metrics::test_metrics test
to fail due to asserting an exact number of metrics observed.

This commit changes the check condition to a more permisive >= rather
than ==.
2022-04-28 11:28:48 +01:00
dependabot[bot] a195973cfb
chore(deps): Bump clap from 3.1.11 to 3.1.12 (#4406)
* chore(deps): Bump clap from 3.1.11 to 3.1.12

Bumps [clap](https://github.com/clap-rs/clap) from 3.1.11 to 3.1.12.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v3.1.11...v3.1.12)

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

Signed-off-by: dependabot[bot] <support@github.com>

* fix: Update tests now that the clap crossed-streams bug has been fixed

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Carol (Nichols || Goulding) <carol.nichols@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-04-27 17:43:55 +00:00
Andrew Lamb bea4556749
chore: Ignore flaky OG end to end test (#4441)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-04-27 15:17:46 +00:00
二手掉包工程师 4b47d723b1
refactor: Rename time to iox_time (#4416)
Signed-off-by: hi-rustin <rustin.liu@gmail.com>

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-04-26 00:19:59 +00:00
Jake Goulding e3caf24954
feat: Rewrite the NG end-to-end metrics test (#4404)
* refactor: Expose data generation tool for wider use

* feat: Add a step for retrieving the server metrics

* refactor: Copy the OG end-to-end metrics test to NG

* feat: Rewrite the NG end-to-end metrics test

This is still broken because the the row timestamp metrics don't exist
in NG.

* fix: Test metrics relevant to NG

* refactor: Move the data generator to the test helper crate

* refactor: Extract a ReadFilter request builder into the test helper crate

* refactor: Make test helper request builder able to build other gRPC requests

Co-authored-by: Carol (Nichols || Goulding) <carol.nichols@gmail.com>
2022-04-25 19:47:56 +00:00
Carol (Nichols || Goulding) f482286ac9
fix: Update function name that was fixed upstream 2022-04-25 11:04:37 -04:00
Carol (Nichols || Goulding) 0bda66a01d
feat: Write end-to-end tests for the gRPC write API in NG
Fixes #3941.
2022-04-25 09:46:13 -04:00
Jake Goulding f92fa69c8c
fix: Typo in test helper method name (#4402)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-04-22 20:21:30 +00:00
Carol (Nichols || Goulding) 117569184e
feat: Port end-to-end logging test to NG (#4400)
* feat: Copy end-to-end logging test to NG

This was created with:

cp influxdb_iox/tests/end_to_end_cases/influxdb_ioxd.rs influxdb_iox/tests/end_to_end_ng_cases/logging.rs

* feat: Port logging test to NG end-to-end tests

And re-enable it, it was ignored.

* fix: Specify that an in-memory catalog should be used for the logging test

* fix: Check for gRPC instead of HTTP

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-04-22 18:05:43 +00:00
Andrew Lamb 14cb2f5674
fix: less async shenanigans in end to end tests (#4384)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-04-22 14:38:57 +00:00
Andrew Lamb ff902c40d2
chore: port debug end to end tests to NG (#4393)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-04-22 14:30:09 +00:00
dependabot[bot] e8bfd7a537
chore(deps): Bump clap from 3.1.10 to 3.1.11 (#4390)
* chore(deps): Bump clap from 3.1.10 to 3.1.11

Bumps [clap](https://github.com/clap-rs/clap) from 3.1.10 to 3.1.11.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v3.1.10...v3.1.11)

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

Signed-off-by: dependabot[bot] <support@github.com>

* fix: update tests for changes to clap

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-04-22 11:15:48 +00:00
Andrew Lamb c9c41f4aed
refactor: use `info!` rather `println!` in end to end tests (#4380)
* refactor: use `info!` rather `println!` in end to end tests

* chore: change from println to info in end_to_end_ng_cases too

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-04-22 10:01:20 +00:00