Commit Graph

7096 Commits (aaec1c7828139e47296665c84aeea4c974026118)

Author SHA1 Message Date
Andrew Lamb 9588b43a90
fix: Make errors in rewriting return `Error` rather than a `panic` (#3767)
* test: add test for predicate errors

* fix: Return errors properly rather than panic

* fix: handle errors in influxrpc planner

* fix: appease clippy

* fix: tests

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-02-17 15:39:14 +00:00
kodiakhq[bot] 9d25e5bac3
Merge pull request #3764 from influxdata/dom/router2-metrics
feat: router2 metrics
2022-02-17 15:25:16 +00:00
kodiakhq[bot] c89fa3701e
Merge branch 'main' into dom/router2-metrics 2022-02-17 15:16:39 +00:00
Dom Dwyer 52fd2af851 refactor: DML handler metric name labels
Emit metrics labelled with "handler=<name>" and a common metric name,
instead of constructing metrics prefixed with the DML handler name.
2022-02-17 15:11:20 +00:00
Dom Dwyer 4d54f8b42c refactor: remove migration create schema 2022-02-17 14:41:32 +00:00
Dom Dwyer 44e9eaf92b test(iox_catalog): isolated catalog tests
This commit changes the iox_catalog test harness so that each test is
run in an independent, randomly generated schema to avoid concurrent
tests interfering with each other.

Each test creates a randomly-named schema, grants permissions to the new
schema, runs the full migration stack against the new schema, and then
executes the code under test.
2022-02-17 14:19:01 +00:00
Dom Dwyer 3b378418f7 refactor: do not specify schema in migrations
Allow the caller to set the Postgres schema a migration should be
applied to, rather than restricting the migration to a specific,
hard-coded schema.

BREAKING CHANGE: manually adds a new migration that precedes the
existing migration to ensure the iox_catalog schema exists before
applying the migration. You'll probably have to drop any existing
databases and migrate from scratch:

    sqlx database drop; sqlx database create;
2022-02-17 14:15:58 +00:00
Marco Neumann b1215805a8
fix: upgrade rskafka for bugfixes and race-free start offsets (#3775)
This fixes the concerns that were brought up during the review of #3748.
2022-02-17 11:22:25 +00:00
kodiakhq[bot] da2a1badc7
Merge pull request #3771 from influxdata/er/tracing/gen_trace
feat: generate a trace ID when using gRPC client
2022-02-16 19:32:39 +00:00
Edd Robinson 44d3d76ab9
Merge branch 'main' into er/tracing/gen_trace 2022-02-16 19:23:15 +00:00
Carol (Nichols || Goulding) 90da060156
feat: Add namespace and sequencer id fields to IngesterQueryRequest protobuf (#3766)
Fixes #3753.

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-02-16 19:21:15 +00:00
Edd Robinson 690ec2fa79
Merge branch 'main' into er/tracing/gen_trace 2022-02-16 19:06:23 +00:00
Edd Robinson 7a2b43f1fb refactor: emit trace ID information 2022-02-16 19:01:14 +00:00
Edd Robinson e4e9b56930 feat: add support for auto-generating a query trace 2022-02-16 18:08:49 +00:00
Carol (Nichols || Goulding) 37c65fc24f
fix: Use a string literal with unreachable (#3768)
This should have been taken care of with the update to Rust 2021
Edition, but rustc had a bug [1]. The bug will be fixed in Rust 1.59, which
means this code will stop compiling.

[1] https://github.com/rust-lang/rust/pull/93179
2022-02-16 16:44:48 +00:00
Dom Dwyer d6d0ae8d80 feat: add instrumentation to request pipeline
Wraps the sharded write buffer, schema validator, partitioner and
overall request handler in instrumentation to record call latencies and
export them via the /metrics endpoint.
2022-02-16 14:00:49 +00:00
Dom Dwyer 40e5b19301 feat: metric instrumentation for DML handlers
Adds a decorator type over a DmlHandler implementation that records call
latency for writes & deletes, broken down by result (success/error).
2022-02-16 14:00:49 +00:00
Dom Dwyer 92fe507e52 feat: instrumented namespace cache
Decorates the NamespaceCache with a set of cache get hit/miss counters,
and put insert/update counters to expose cache behaviour.
2022-02-16 14:00:49 +00:00
kodiakhq[bot] a3e15ade62
Merge pull request #3746 from influxdata/dom/mb-partitioning
feat(router2): MutableBatch partitioning
2022-02-16 11:39:28 +00:00
kodiakhq[bot] d0965bb0b2
Merge branch 'main' into dom/mb-partitioning 2022-02-16 11:30:42 +00:00
Marko Mikulicic 4655d4b4f1
docs: Improve iox_catalog testing docs (#3760)
* docs: Improve iox_catalog testing docs

* fix: Update iox_catalog/README.md

Co-authored-by: Dom <dom@itsallbroken.com>

Co-authored-by: Dom <dom@itsallbroken.com>
2022-02-16 10:23:53 +00:00
Nga Tran ea814e9aa4
feat: API and steps to prepare data to send back to the Querier per its request (#3756)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-02-16 02:45:58 +00:00
Paul Dix f542045485
feat: wire up persistence in ingester (#3685)
This adds persistence into the ingester with a lifecycle manager. The persist operation must still be updated to keep track of the min_unpersisted_sequence_number for each sequencer.
2022-02-16 00:13:40 +00:00
kodiakhq[bot] 5be546173a
Merge pull request #3751 from influxdata/er/logging
refactor: influxRPC operation logging
2022-02-15 20:18:11 +00:00
Edd Robinson 7c8ea53d03
Merge branch 'main' into er/logging 2022-02-15 20:09:36 +00:00
jaymebrd 4a35547af4
chore: The k8s-iox promotion is no longer used and can be removed (#3749) 2022-02-15 17:20:27 +00:00
Luke Bond a66e29e5b3
chore: port sqlx-hotswap-pool over from conductor (#3750)
* chore: port sqlx-hotswap-pool over from conductor

Co-authored-by: Marko Mikulicic <mkm@influxdata.com>

* chore: workspace hack fixes

* fix: unique schema per test db connection

* fix: adjust search path in catalog pg tests to see if it fixes test schema issue

* fix: actually fixed sqlx hotswap pool test

Co-authored-by: Marko Mikulicic <mkm@influxdata.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-02-15 16:18:36 +00:00
Nga Tran 0b3f76462d
feat: build Query Plan that queries QueryableBatch with filters (#3742)
* feat: initial implementaion the Query Plan that query QueryableBatch with filters

* fix: read_filter of QueryableBatch should provide the shema of the columns/projection it needs

* chore: Apply suggestions from code review

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

* chore: address review comment

Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
2022-02-15 16:06:26 +00:00
Edd Robinson 7ac9e216c4 refactor: use same log message 2022-02-15 14:36:55 +00:00
Edd Robinson 8a5ea29190 refactor: add measurement to log 2022-02-15 14:31:26 +00:00
Marco Neumann 44ee0166a0
fix: start Kafka write buffer stream at "earliest" offset, not at "0" (#3748) 2022-02-15 13:36:59 +00:00
Marco Neumann 9e7a27b344
fix: default Kafka topic name is `iox-shared` (#3747)
Do NOT use underscores in the Kafka topic because this is not supported
by Kafka. This was initially fixed by #3555 but reverted by #3623.
2022-02-15 12:34:46 +00:00
Andrew Lamb a30803e692
chore: Update datafusion, update `arrow`/`parquet`/`arrow-flight` to 9.0 (#3733)
* chore: Update datafusion

* chore: Update arrow

* fix: missing updates

* chore: Update cargo.lock

* fix: update for smaller parquet size

* fix: update test for smaller parquet files

* test: ensure parquet_file tests write multiple row groups

* fix: update callsite

* fix: Update for tests

* fix: harkari

* fix: use IoxObjectStore::existing

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-02-15 12:10:24 +00:00
Dom Dwyer e055800039 refactor: enable Partitioner in request pipeline
Adds the Partitioner DML handler into the handler stack, modifying the
input types of down-stream handlers to accept the partitioned data.
2022-02-15 11:34:33 +00:00
dependabot[bot] 89105ccfab
chore(deps): Bump tokio-util from 0.6.9 to 0.7.0 (#3743)
Bumps [tokio-util](https://github.com/tokio-rs/tokio) from 0.6.9 to 0.7.0.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/commits)

---
updated-dependencies:
- dependency-name: tokio-util
  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>
2022-02-15 11:33:41 +00:00
Dom Dwyer c64e9f0d40 refactor: namespace auto-creator generic input
Changes the NamespaceAutocreation handler to be generic over any
WriteInput.

This allows the NamespaceAutocreation layer to be placed anywhere in the
handler stack, without needing a prior transformation or specific write
type.
2022-02-15 11:29:33 +00:00
Dom Dwyer 92218ce8aa feat: write partitioner
Implements a write partitioning DML handler that splits per-table
MutableBatch instances into per-partition, per-table MutableBatch and
concurrently calls the inner DML handler with each.
2022-02-15 11:29:32 +00:00
Dom Dwyer 5c254339fa test: MockDmlHandler generic over write input
Allow the MockDmlHandler to capture any input type given to the write()
method. This lets us reuse the mock across all handler implementations,
regardless of their expected write input type.
2022-02-15 11:27:16 +00:00
Dom Dwyer e99922d518 refactor: parametrise DML handler input type
Allow a DML handler to specify the write input type on which it
operates.

This allows us to construct a write handler pipeline that transforms the
request as it passes through the various handlers. We'll use this to
implement a handler that annotates a normal set of table writes with the
partition key, modifying downstream handlers to expect this annotated
input.
2022-02-15 11:23:45 +00:00
Marco Neumann 4db27eec68
fix: defined behaviour when seeking to an unknown sequence number (#3745)
* chore: upgrade rskafka

* refactor: less cloning

* fix: defined behaviour when seeking to an unknown sequence number

The new, defined behavior is: "return an error once and then end the
stream".

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

Co-authored-by: Edd Robinson <me@edd.io>
2022-02-15 11:08:01 +00:00
dependabot[bot] 1cd51b6071
chore(deps): Bump hyper from 0.14.16 to 0.14.17 (#3744)
Bumps [hyper](https://github.com/hyperium/hyper) from 0.14.16 to 0.14.17.
- [Release notes](https://github.com/hyperium/hyper/releases)
- [Changelog](https://github.com/hyperium/hyper/blob/master/CHANGELOG.md)
- [Commits](https://github.com/hyperium/hyper/compare/v0.14.16...v0.14.17)

---
updated-dependencies:
- dependency-name: hyper
  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>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-02-15 10:23:46 +00:00
Marco Neumann c6e374a025
feat: allow catalog access w/o a transaction (#3735)
* feat: allow catalog access w/o a transaction

Now the caller has the full control if they want to use a transaction or
not.

* fix: remove non-transaction-safe `create_many`

* fix: remove unnecessary transactions
2022-02-15 10:15:36 +00:00
dependabot[bot] 2626e4891d
chore(deps): Bump tracing-subscriber from 0.3.7 to 0.3.8 (#3741)
Bumps [tracing-subscriber](https://github.com/tokio-rs/tracing) from 0.3.7 to 0.3.8.
- [Release notes](https://github.com/tokio-rs/tracing/releases)
- [Commits](https://github.com/tokio-rs/tracing/compare/tracing-subscriber-0.3.7...tracing-subscriber-0.3.8)

---
updated-dependencies:
- dependency-name: tracing-subscriber
  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>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-02-14 20:51:21 +00:00
dependabot[bot] 60a7f87645
chore(deps): Bump serde_json from 1.0.78 to 1.0.79 (#3739)
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.78 to 1.0.79.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.78...v1.0.79)

---
updated-dependencies:
- dependency-name: serde_json
  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>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-02-14 20:42:54 +00:00
Raphael Taylor-Davies 26fd5273f0
feat: static database configuration (#2436) (#3732)
* feat: static database configuration (#2436)

* chore: fmt

* feat: don't base64 encode UUIDs in ServerConfigFile

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-02-14 19:42:49 +00:00
Carol (Nichols || Goulding) 85aa019f50
feat: Turn protobuf predicates into predicate::Predicate (#3707)
* feat: Turn protobuf predicates into predicate::Predicate

* fix: Take buf lint's suggestions

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-02-14 17:56:56 +00:00
Luke Bond d39cf0158b
chore: update gitops adapter k8s deps (via dependabot) (#3736)
* chore: update gitops adapter k8s deps (via dependabot)

* chore: workspace hack updates

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-02-14 17:47:15 +00:00
Nga Tran d1c71ba5d8
feat: predicate pushdown for Ingester's QueryableBatch (#3728)
* feat: predicate pushdown for Ingester's QueryableBatch

* chore: comment cleanup

* chore: Apply suggestions from code review

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

* refactor: address review comments

Co-authored-by: Edd Robinson <me@edd.io>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-02-14 17:28:52 +00:00
Marco Neumann cf5a5b77cb
fix: use encoded data size estimation instead of mutable batch (#3734)
For sparse data the PB-encoded data (our Kafka wire format) is way
smaller than the MutableBatch (up to a factor 20). So lets use this one
to estimate the size during batching.
2022-02-14 16:58:38 +00:00
Raphael Taylor-Davies c79050254f
refactor: traitify database configuration (#2436) (#3730)
* refactor: traitify database configuration (#2436)

* chore: review feedback

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-02-13 09:26:44 +00:00