Commit Graph

11395 Commits (d4486bef3e3a6d1cd9d066c0cb0b01a03000165e)

Author SHA1 Message Date
Fraser Savage acdeee62e0
refactor(router): Remove unused catalog field on TestContextBuilder 2023-03-20 17:11:55 +00:00
Fraser Savage 1a2565b45a
refactor(router): Split TestContextBuilder namespace parameters
Most of the test cases set up a context with or without namespace
autocreation, while few set a retention period. This removes the
requirement to pass a retention period when enabling autocreation
or vice versa.
2023-03-20 17:04:14 +00:00
Fraser Savage 32a3c81ce9
refactor(router): Use builder pattern to construct TestContext
Using the builder pattern enables a more ergonomic workflow
for setting optional namespace creation semantics when constructing
the TestContext for the router.
2023-03-20 17:03:40 +00:00
Dom Dwyer 93ebb42fdd
refactor: stateful upstream iter for RPC balancer
Changes the router's RPC balancer to return a iterator of elements
starting from the given offset, that can remove elements from the
infinite/cycling iterator to prevent them from being yielded again.
2023-03-20 17:30:32 +01:00
Dom Dwyer f28ba2381d
test: assert all upstreams are (re)-tried
Adds a test ensuring requests are sent to all upstream ingesters until a
request succeeds.
2023-03-20 17:23:02 +01:00
Dom c0a53ae5a9
Merge pull request #7261 from influxdata/dom/seqnumset-range
fix: full u64 range in SequenceNumberSet
2023-03-20 14:10:35 +00:00
Dom Dwyer 8f9e4d21c7
chore: workspace-hack update
Add proptest to workspace-hack.
2023-03-20 14:24:58 +01:00
Dom Dwyer 0a2cb33f7d
test: property test SequenceNumberSet operations
Adds proptests to assert correctness of set operations against a
SequenceNumberSet, by ensuring they match those of a known-good
implementation from the stdlib (HashSet).

Ensure (de-)serialisation correctness by asserting a round trip results
in equal sets.
2023-03-20 14:23:43 +01:00
Dom Dwyer 5680710e75
fix: full u64 range in SequenceNumberSet
Prior to this commit, the SequenceNumberSet accepted values up to
u32::MAX (approx 4.2 billion) which works out to be ~50 days of
continious ID allocation at 1k writes/s.

This commit changes the SequenceNumberSet to accept the full range of a
u64, with the caveat that outside of the u32 range, values may be
ordered incorrectly. See:

    https://github.com/influxdata/influxdb_iox/issues/7260

Fortunately values from SequenceNumberSet are used as an identity, and
never for ordering. We should remove the PartialOrd bounds on
SequenceNumber once Kafka has been cleaned up to encode this in the type
system.
2023-03-20 14:15:30 +01:00
kodiakhq[bot] 89c55981b8
Merge pull request #7251 from influxdata/dom/wal-ref-empty-waker
refactor(wal): file management sequencing helpers
2023-03-20 10:53:08 +00:00
kodiakhq[bot] 67ab2e46ca
Merge branch 'main' into dom/wal-ref-empty-waker 2023-03-20 10:45:26 +00:00
dependabot[bot] 36b0a2fa8e
chore(deps): Bump io-lifetimes from 1.0.7 to 1.0.8 (#7254)
Bumps [io-lifetimes](https://github.com/sunfishcode/io-lifetimes) from 1.0.7 to 1.0.8.
- [Release notes](https://github.com/sunfishcode/io-lifetimes/releases)
- [Commits](https://github.com/sunfishcode/io-lifetimes/compare/v1.0.7...v1.0.8)

---
updated-dependencies:
- dependency-name: io-lifetimes
  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: Dom <dom@itsallbroken.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-03-20 10:45:13 +00:00
dependabot[bot] c828d47863
chore(deps): Bump clap from 4.1.9 to 4.1.11 (#7255)
Bumps [clap](https://github.com/clap-rs/clap) from 4.1.9 to 4.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/v4.1.9...v4.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>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-03-20 10:38:09 +00:00
dependabot[bot] dfb60b9685
chore(deps): Bump rustix from 0.36.9 to 0.37.2 (#7257)
* chore(deps): Bump rustix from 0.36.9 to 0.37.2

Bumps [rustix](https://github.com/bytecodealliance/rustix) from 0.36.9 to 0.37.2.
- [Release notes](https://github.com/bytecodealliance/rustix/releases)
- [Commits](https://github.com/bytecodealliance/rustix/compare/v0.36.9...v0.37.2)

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

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

* chore: Run cargo hakari tasks

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: CircleCI[bot] <circleci@influxdata.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-03-20 10:31:27 +00:00
dependabot[bot] afb38d2199
chore(deps): Bump is-terminal from 0.4.4 to 0.4.5 (#7258)
Bumps [is-terminal](https://github.com/sunfishcode/is-terminal) from 0.4.4 to 0.4.5.
- [Release notes](https://github.com/sunfishcode/is-terminal/releases)
- [Commits](https://github.com/sunfishcode/is-terminal/compare/v0.4.4...v0.4.5)

---
updated-dependencies:
- dependency-name: is-terminal
  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>
2023-03-20 10:24:18 +00:00
dependabot[bot] 626fb62009
chore(deps): Bump bitflags from 1.3.2 to 2.0.2 (#7256)
* chore(deps): Bump bitflags from 1.3.2 to 2.0.2

Bumps [bitflags](https://github.com/bitflags/bitflags) from 1.3.2 to 2.0.2.
- [Release notes](https://github.com/bitflags/bitflags/releases)
- [Changelog](https://github.com/bitflags/bitflags/blob/main/CHANGELOG.md)
- [Commits](https://github.com/bitflags/bitflags/compare/1.3.2...2.0.2)

---
updated-dependencies:
- dependency-name: bitflags
  dependency-type: direct:production
  update-type: version-update:semver-major
...

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

* chore: Run cargo hakari tasks

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: CircleCI[bot] <circleci@influxdata.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-03-20 10:16:43 +00:00
Dom 76373d69dc
Merge pull request #7259 from influxdata/dependabot/cargo/dirs-5.0.0
chore(deps): Bump dirs from 4.0.0 to 5.0.0
2023-03-20 10:08:34 +00:00
CircleCI[bot] 0ac6ddf057 chore: Run cargo hakari tasks 2023-03-20 02:02:12 +00:00
dependabot[bot] dea6ad9e93
chore(deps): Bump dirs from 4.0.0 to 5.0.0
Bumps [dirs](https://github.com/soc/dirs-rs) from 4.0.0 to 5.0.0.
- [Release notes](https://github.com/soc/dirs-rs/releases)
- [Commits](https://github.com/soc/dirs-rs/commits)

---
updated-dependencies:
- dependency-name: dirs
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-20 02:00:36 +00:00
Christopher M. Wolff 866f9cefa1
feat: add null-as-missing gap filling (#7245)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-03-17 20:34:45 +00:00
Andrew Lamb 96c2094302
refactor(iox_query): extract influxrpc planner to its own crate (#7241)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-03-17 18:48:55 +00:00
Martin Hilton 13657d5bcc
feat(authz): authorization service client and write integration (#7216)
* feat(authz): add authorization client.

Add a new authz crate to provide the interface for making authorization
checks from within IOx. This includes the default client that uses
the influxdata.iox.authz.v1 gRPC protocol. This feature is not used
by any IOx component yet.

* feat: optional authorization on write path

Support optionally enabling authorization checks on the /api/v2/write
handler. If an authrorizer is configured then the handler will
attempt to retrieve a token from the request's Authorization header.
If no such token exists then a response with a 401 error code is
returned. If the token is not valid, or does not have write permission
for the requested namespace then a response with a 403 error is
returned.

* chore: add unit test for authz in write handler

Add unit tests that test the correct functioning of the /api/v2/write
handler when an Authorizer is configured.

* chore(authz): use lazy connection

Change the initialization of the authz client to use a lazy connection.
This allows the client to be initialised synchronously.

* chore: Run cargo hakari tasks

* fix(authz): protolint complaints

* fix: authz tests

* fix: benches and lint

* chore: Update clap_blocks/src/authz.rs

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

* chore: Update authz/src/lib.rs

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

* chore: Update clap_blocks/src/authz.rs

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

* chore: review suggestions

* chore: review suggestions

Apply a number of suggestions from review comments. The main
behavioural change is that if the authz service is configured
applictions will perform a probe request to ensure it can communicate
before continuing startup.

* chore: Update router/src/server/http.rs

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

---------

Co-authored-by: CircleCI[bot] <circleci@influxdata.com>
Co-authored-by: Marko Mikulicic <mkm@influxdata.com>
Co-authored-by: Dom <dom@itsallbroken.com>
2023-03-17 15:20:14 +00:00
Andrew Lamb 28cb56767c
fix: Rename crate `influxdb_line_protocol` to `influxdb-line-protocol` (#7244)
* fix: Rename crate `influxdb_line_protocol` to `influxdb-line-protocol`

* fix: hakari config

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-03-17 13:19:50 +00:00
Dom Dwyer fba15cb521
refactor: wal file process completion notification
Allow a caller to await processing of a submitted WAL segment in the WAL
reference tracker.

This allows callers to (optionally) order operations that should happen
after the file has been processed.
2023-03-17 14:16:58 +01:00
Dom Dwyer 1958541460
refactor: waker for empty WAL files
Implement a waker primitive, allowing a caller to be woken once there
are no inactive WAL files.

This enables a caller to sequence operations to happen after deletion of
inactive WAL files.
2023-03-17 14:16:58 +01:00
Dom Dwyer 094ea0e73b
refactor(test): disambiguate waker
The "wal waker" is a waker that is invoked when a WAL file is deleted.
If there's more than one waker floating around, this can be a confusing
name.
2023-03-17 14:16:57 +01:00
Andrew Lamb 2bc495b29e
feat(flightsql): Support `GetTableTypes` metadata API (#7242)
* feat(flightsql): Support `GetTableTypes` metadata API

* chore: comment about possible optimization

* chore: fix logical conflict
2023-03-17 13:12:23 +00:00
dependabot[bot] f0fc79ee3b
chore(deps): Bump assert_cmd from 2.0.9 to 2.0.10 (#7248)
Bumps [assert_cmd](https://github.com/assert-rs/assert_cmd) from 2.0.9 to 2.0.10.
- [Release notes](https://github.com/assert-rs/assert_cmd/releases)
- [Changelog](https://github.com/assert-rs/assert_cmd/blob/master/CHANGELOG.md)
- [Commits](https://github.com/assert-rs/assert_cmd/compare/v2.0.9...v2.0.10)

---
updated-dependencies:
- dependency-name: assert_cmd
  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-03-17 10:35:10 +00:00
dependabot[bot] cc7f4201ba
chore(deps): Bump clap from 4.1.8 to 4.1.9 (#7247)
Bumps [clap](https://github.com/clap-rs/clap) from 4.1.8 to 4.1.9.
- [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/v4.1.8...v4.1.9)

---
updated-dependencies:
- dependency-name: clap
  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>
2023-03-17 09:46:58 +00:00
Marco Neumann 20ec47b00b
feat: virtual chunk order col (#7240)
* feat: introduce `CHUNK_ORDER_COLUMN_NAME`

* feat: impl `ChunkOrder` everywhere

* feat: `ChunkOrder::get`

* feat: emit chunk order column for `RecordBatchesExec`

* feat: `chunk_order_field`

* feat: chunk order col for parquet chunks

* feat: optional chunk order col handling for dedup

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-03-17 09:39:21 +00:00
dependabot[bot] 982e1ab96c
chore(deps): Bump io-lifetimes from 1.0.6 to 1.0.7 (#7246)
Bumps [io-lifetimes](https://github.com/sunfishcode/io-lifetimes) from 1.0.6 to 1.0.7.
- [Release notes](https://github.com/sunfishcode/io-lifetimes/releases)
- [Commits](https://github.com/sunfishcode/io-lifetimes/compare/v1.0.6...v1.0.7)

---
updated-dependencies:
- dependency-name: io-lifetimes
  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>
2023-03-17 09:28:35 +00:00
Marco Neumann 3e40de3cd4
feat: recover desired output sort in in `extract_chunks` (#7233)
This is helpful so that optimizer passes to forget the sort key, esp.
when the run after `DedupNullColumns` and `DedupSortOrder`.

For #6098.

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-03-17 09:19:10 +00:00
Andrew Lamb 3fb4fad784
refactor(iox_query): Rename `prepare_sql` to `sql_to_physical_plan` (#7226)
* refactor(iox_query): Rename `prepare_sql` to `sql_to_physical_plan`

* fix: logical conflict
2023-03-16 19:12:15 +00:00
Andrew Lamb f2cda34a61
chore(influxdb_line_protocol): add description to cargo metadata (#7243) 2023-03-16 18:27:27 +00:00
Andrew Lamb 43167fe585
chore(influxdb_line_protocol): Prepare `influxdb_line_protocol` for crates.io release (#7195)
* chore(influxdb_line_protocol): Remove ffi feature

* chore(influxdb_line_protocol): Remove workspace dependencies

* docs(influxdb_line_protocol): add initial readme and release instructions

* chore: Run cargo hakari tasks

* chore: Exclude influxdb_line_protocol from hakari checks and the workspace hack features

* feat: Add a link to nom in the docs

* docs: Copy edit documentation and comments

* fix: Mark the line protocol Error as non-exhaustive

So that we can easily add more error variants in the future.

* fix: Remove some functions from the public API

* fix: Make split_lines pub again

Oops, we're actually depending on this being pub in other parts of IOx
🙈

* docs: Add doc comments so everything on the crate docs page has a description

* chore: Add homepage, readme and repo links

* fix: use cargo-rdme

* chore: Add comment to hakari.toml

* chore: Increase version to `1.0.0`

* fix: fix LineProtocolBuilder link

---------

Co-authored-by: CircleCI[bot] <circleci@influxdata.com>
Co-authored-by: Carol (Nichols || Goulding) <carol.nichols@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-03-16 17:55:10 +00:00
kodiakhq[bot] e2ba5c486a
Merge pull request #7239 from influxdata/cn/little-move
refactor: Move timeout with progress to its own module
2023-03-16 17:47:32 +00:00
Carol (Nichols || Goulding) 46b94c1362
refactor: Rename module and file to just timeout 2023-03-16 13:40:28 -04:00
Carol (Nichols || Goulding) 85687ecd4c
refactor: Move timeout with progress to its own module 2023-03-16 11:50:23 -04:00
kodiakhq[bot] 34206bdcbb
Merge pull request #7224 from influxdata/cn/timeout
feat: Don't add a partition to skipped_compactions if it makes progress
2023-03-16 14:48:45 +00:00
kodiakhq[bot] 11aa3571c7
Merge branch 'main' into cn/timeout 2023-03-16 14:42:10 +00:00
Andrew Lamb 3f0073807f
chore(flightsql): `insta`ize flightsql end to end tests (#7236)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-03-16 14:41:49 +00:00
Andrew Lamb 7dfaa05e8a
chore: Update datafusion again (#7208)
* chore: update datafusion again

* fix: update test

* fix: use table_reference

* fix: clean up import

* chore: Run cargo hakari tasks

---------

Co-authored-by: CircleCI[bot] <circleci@influxdata.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-03-16 14:34:40 +00:00
Andrew Lamb 0c36c60d66
refactor(flightsql): simplfy parameterized statement generation (#7232)
* docs: Add doc link to command enum

* refactor(flightsql): simplfy parameterized statement generation

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-03-16 14:27:21 +00:00
Marco Neumann 45d23f7652
refactor: `extract_chunks` return arrow schema (#7231)
Similar to #7217 there is no need to convert the arrow schema to an IOx
schema. This also makes it easier to handle the chunk order column in #6098.

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-03-16 14:19:52 +00:00
Dom f76be3fa1b
Merge pull request #7237 from influxdata/dom/split-wal-reffer
chore: split reference_tracker module into submods
2023-03-16 14:13:10 +00:00
Dom 7889b41234
Merge branch 'main' into dom/split-wal-reffer 2023-03-16 13:36:26 +00:00
Dom Dwyer 78c8429caa
chore: split reference_tracker module into submods
Breaks the reference_tracker module into sub-modules - this keeps the
code a little tidier. Soon I'll add more code, so this one file was
getting really big!
2023-03-16 14:35:29 +01:00
Marco Neumann d2874f5c02
test: fix chunk boundaries for retention query tests (#7235)
See code comment, found while working on #6098.
2023-03-16 13:14:08 +00:00
Dom 4fb92d8f46
Merge pull request #7234 from influxdata/dom/remove-clone
refactor: remove Clone derive on CompletedPersist
2023-03-16 11:17:09 +00:00
Dom Dwyer 43d174b891
refactor: remove Clone derive on CompletedPersist
This type is exposed as an Arc-wrapped (reference counted) shared item
to avoid cloning the underlying data, and as such this type should not
be cloned directly.
2023-03-16 11:55:01 +01:00