Commit Graph

6760 Commits (0bd7941a187588299f4141d7f6e47fff67da4643)

Author SHA1 Message Date
Markus Westerlind 0bd7941a18
fix(REPL): Don't buffer lines until a trailing semicolon is found and add history hinting (#3630)
* fix(REPL): Don't buffer lines until a trailing semicolon is found

The repl would silently buffer all lines until a trailing semicolon were found which
resulted in some very confusing error messages as I would input invalid commands followed
by a command I thought were valid, except I'd still get an error due to the previous command being buffered.

This uses rustyline's helper feature to detect incomplete input (no trailing semicolon) and makes
it accept multiline input until the input is completed.

I also included some of rustyline's default hint and highlighting while I was at it.

* chore: cargo clippy

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-02-03 17:11:01 +00:00
Marco Neumann b3b2d9b623
feat: catalog setup CLI command (#3627)
Closes #3509.

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-02-03 14:16:21 +00:00
Andrew Lamb ab3c7573f5
test: add end to end for read_filter and empty string predicates (#3619)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-02-03 14:05:32 +00:00
Marco Neumann 50cff27b01
chore: remove rdkafka dependency (#3625)
All features are now covered by rskafka. This also removes the need to
specify a server ID for write buffer consumers. This was only used for
rdkafka since there we needed to specify a consumer group, even though
we did not use any transactions.
2022-02-03 13:33:56 +00:00
Marco Neumann bc4b7f8a5b
test: ensure that rskafka and rdkakfa work together (#3624)
* chore: upgrade rskafka + enable snappy support

* test: ensure that rskafka and rdkakfa work together

Before removing rdkafka ensure that:

- rskafka can consume existing messages produced by rdkafka so we do not
  need to drain existing topics
- rdkafka can consume new messages produced by rskafka so we can roll
  back

I ran the whole `write_buffer` test suite (including the newly added
tests) using Apache Kafka as well as Redpanda.

* test: ensure we handle consumer offset in error case correctly

* docs: explain test setup

Co-authored-by: Andrew Lamb <alamb@influxdata.com>

Co-authored-by: Andrew Lamb <alamb@influxdata.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-02-03 12:52:42 +00:00
kodiakhq[bot] 77b8aa35ff
Merge pull request #3626 from influxdata/dom/extract-ns-cache
refactor: extract NamespaceSchema cache
2022-02-03 12:40:21 +00:00
kodiakhq[bot] 3197ea945b
Merge branch 'main' into dom/extract-ns-cache 2022-02-03 12:30:37 +00:00
Dom 2e9b97a4ab
docs: fix typo
Co-authored-by: Andrew Lamb <alamb@influxdata.com>
2022-02-03 12:30:16 +00:00
Andrew Lamb 77b80e7618
fix(InfluxQL): treat null tags as `''` rather than `null` in storagerpc queries (#3557)
* fix(InfluxQL): treat null tags as `''` rather than `null` in storage rpc queries

* test: add one more case

* fix: Update comment

Co-authored-by: Raphael Taylor-Davies <1781103+tustvold@users.noreply.github.com>

Co-authored-by: Raphael Taylor-Davies <1781103+tustvold@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-02-03 12:14:43 +00:00
Paul Dix ce46bbaada
feat: wire up the write buffer to the ingester process (#3533)
This adds the scaffolding for the ingester server to consume data from Kafka. This ingests data in an in memory structure while creating records in the catalog for any partitions that don't yet exist.

I've removed catalog_update.rs in ingester for now. That was mostly a placeholder and will be going in a combination of handler.rs and data.rs on my next PR which will have some primitive lifecycle wired up.

There's one ugly bit here where the DML write is cloned because it's getting borrowed to output spans and metrics. I'll need to follow up with a refactor to make it so that the DML write's tables can be consumed without it gumming up the metrics stuff.

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-02-03 11:47:28 +00:00
Andrew Lamb a5045de02c
fix: remove incorrect comment (#3622)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-02-03 11:06:29 +00:00
Dom 30b670274e
Merge branch 'main' into dom/extract-ns-cache 2022-02-03 11:02:39 +00:00
Raphael Taylor-Davies 3aebb394f0
Merge pull request #3617 from influxdata/combine-non-overlapping-chunks
feat: combine non-overlapping chunks without deletes
2022-02-03 10:55:08 +00:00
Dom Dwyer 3cc4481616 refactor: extract NamespaceSchema cache
Breaks the in-memory cache of NamespaceSchema out into a decoupled type
that can be shared across multiple DML handlers.
2022-02-03 10:01:07 +00:00
kodiakhq[bot] a2ed6a1b75
Merge branch 'main' into combine-non-overlapping-chunks 2022-02-02 20:47:51 +00:00
Andrew Lamb 766bf9826c
refactor: remove unecessary #allow lints (#3615)
* refactor: remove unecessary #allow lints

* fix: clippy

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-02-02 20:23:08 +00:00
Carol (Nichols || Goulding) a534136ccc
fix: Correct a 'long' argument name so the ingester command can run (#3621)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-02-02 20:09:41 +00:00
Andrew Lamb c4a234e83c
feat: Allow sql test runner to compare sorted output (#3618)
* refactor: Add Query struct

* feat: Implement sorted checking

* refactor: port some sql tests over

* fix: fmt

* fix: Apply suggestions from code review

Co-authored-by: Edd Robinson <me@edd.io>

Co-authored-by: Edd Robinson <me@edd.io>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-02-02 19:59:52 +00:00
Andrew Lamb 429d59f1b6
feat: Simplify predicates in the `InfluxRpcFrontend` before using them (#3588)
* feat: normalize + simplify RPC predicates before using them

* docs: Update predicate/src/rpc_predicate.rs

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-02-02 19:46:57 +00:00
kodiakhq[bot] 48daede8d7
Merge pull request #3576 from influxdata/dom/schema-validation
feat(router2): write schema validation!
2022-02-02 19:36:45 +00:00
Raphael Taylor-Davies 8a8de19fb5 feat: combine non-overlapping chunks without deletes 2022-02-02 16:40:30 +00:00
kodiakhq[bot] 9079baf19a
Merge branch 'main' into dom/schema-validation 2022-02-02 16:27:35 +00:00
Andrew Lamb 030a2cb4c1
chore: Update datafusion (#3613)
* chore: Update datafusion

* fix: update for latest DF API

* fix: another API change

* fix: clippy

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-02-02 16:27:11 +00:00
kodiakhq[bot] 6de8ed4adc
Merge branch 'main' into dom/schema-validation 2022-02-02 16:05:41 +00:00
Carol (Nichols || Goulding) 62a2ad289b
feat: Implement deserializing IoxMetadata from protobuf (#3589)
Fixes #3587.

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-02-02 16:05:21 +00:00
kodiakhq[bot] 8c5f12cd99
Merge pull request #3610 from influxdata/feat/catalogue-cli-update-topic
feat: catalog CLI command with update subcommand
2022-02-02 15:47:26 +00:00
kodiakhq[bot] 61f8764326
Merge branch 'main' into feat/catalogue-cli-update-topic 2022-02-02 15:38:05 +00:00
Raphael Taylor-Davies b2669a8525
feat: increase trace buffer size (#3614)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-02-02 15:37:50 +00:00
Luke Bond 6da15d9690 chore: cleanup catalog CLI output & args
Co-authored-by: Marco Neumann <marco@crepererum.net>
2022-02-02 15:30:19 +00:00
Luke Bond 15827a534b feat: catalog CLI command with update subcommand 2022-02-02 15:30:19 +00:00
Marko Mikulicic c2bd9945de
fix: Use recommended ubuntu mirror (#3612)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-02-02 15:27:07 +00:00
Dom Dwyer 26c033d529 style: return directly 2022-02-02 15:20:48 +00:00
Andrew Lamb 55daf95b48
refactor: Consolidate more query_test DbSetups (#3607)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-02-02 15:16:56 +00:00
Andrew Lamb 5d5310351b
refactor: Move query_test readme to standard location (#3608)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-02-02 15:06:13 +00:00
Dom Dwyer 4744c5804e refactor: remove Dashmap
Swap Dashmap for a regular RwLock<HashMap<..,>> due to soundness issues:

    https://rustsec.org/advisories/RUSTSEC-2022-0002
2022-02-02 14:04:53 +00:00
Dom Dwyer 39d489d9e7 refactor: enable schema validation
Adds the SchemaValidator to the DML handler stack - this adds it into
the request path in router2.
2022-02-02 14:04:14 +00:00
Dom Dwyer 6598023726 feat: cache NamespaceSchema in validator
Adds an in-memory cache of table schemas to the SchemaValidator DML
handler.

The cache pulls from the global catalog when observing a column for the
first time, and pushes the column type to set it for subsequent requests
if it does not exist (this pull & push is done by atomically by the
catalog in an "upsert" call).

The in-memory cache is sharded by namespace, with each shard guarded by
an individual lock to minimise contention between readers (the expected
average case) and writers (only when adding new columns/tables).

Relies on the catalog to serialise new column creation and validate
parallel creation requests.
2022-02-02 13:04:53 +00:00
Dom Dwyer c81f207298 feat: schema validation
Implements a write schema validation DML handler, denying requests that
conflict with the schema within the global catalog. Additive schema
changes are accepted, incrementally updating the global catalog schema.

Deletes are passed through unchanged and unvalidated.
2022-02-02 13:04:53 +00:00
Dom Dwyer f9f9beac36 refactor: get_schema_by_name no Option
Fetching a NamespaceSchema always succeeds and never returns None.
2022-02-02 13:04:53 +00:00
Marko Mikulicic 7b2b5b7ebd
chore: Use ubuntu mirror in test_perf (#3609) 2022-02-02 12:37:44 +00:00
kodiakhq[bot] dc1718421a
Merge pull request #3606 from influxdata/er/feat/rpc_cli
feat: add skeleton `storage` CLI command
2022-02-02 12:06:47 +00:00
Edd Robinson 5441682207 feat: add support for parsing predicate 2022-02-02 11:02:33 +00:00
Edd Robinson 08901c13cd feat: support parsing timerange 2022-02-02 11:02:33 +00:00
Edd Robinson a424d1c912 feat: shell command read_filter 2022-02-02 11:02:33 +00:00
Edd Robinson c1f5994660
refactor: move sql parsing -> RPC predicate into own crate (#3604)
* chore: create crate

* refactor: move module to new crate
2022-02-02 10:41:57 +00:00
Marco Neumann 9567acd621
feat: expose all relevant configs for rskafka write buffers (#3599)
* feat: expose all relevant configs for rskafka write buffers

* refactor: `CreationConfig` => `TopicCreationConfig`
2022-02-02 09:35:54 +00:00
kodiakhq[bot] 6b3851242e
Merge pull request #3602 from influxdata/alamb/null_not_null
fix: handle IS NULL / IS NOT NULL during rpc rewrite
2022-02-01 22:52:04 +00:00
Andrew Lamb b03c900174 fix: handle IS NULL / IS NOT NULL during rpc rewrite 2022-02-01 13:48:58 -05:00
kodiakhq[bot] 323d873a37
Merge pull request #3600 from influxdata/alamb/case_fold
feat: Fold past CASE blocks / translate to boolean CASE
2022-02-01 18:11:55 +00:00
Andrew Lamb 0570662da2 feat: Fold past CASE blocks / translate to boolean CASE 2022-02-01 12:24:33 -05:00