Commit Graph

11681 Commits (1c244403059cfcb6db1e06942eee4d45da53c0b5)

Author SHA1 Message Date
Carol (Nichols || Goulding) 5efc59d08a
docs: Fix out of date docs for test ChunkStage 2023-03-31 16:00:53 -04:00
Carol (Nichols || Goulding) 89d5cb7fb3
feat: Clarify test setup logging 2023-03-31 16:00:53 -04:00
Carol (Nichols || Goulding) 6335ed24fa
test: Use a setup that never persists for a test that expects ingester data
Fixes #7404.
2023-03-31 16:00:44 -04:00
kodiakhq[bot] e091738f19
Merge pull request #7388 from influxdata/cn/hardcoded-refactor
refactor: Clarify what's happening in the hardcoded compactor components
2023-03-31 19:58:31 +00:00
Carol (Nichols || Goulding) 90d07412ff
refactor: Extract functions for the different purposes of partition filters 2023-03-31 12:53:41 -04:00
Carol (Nichols || Goulding) 9a27736c65
docs: Fix some typos 2023-03-31 12:44:12 -04:00
Carol (Nichols || Goulding) a4a79bc640
test: Add a case where a partition's time is included in the max range 2023-03-31 12:42:27 -04:00
Carol (Nichols || Goulding) a32d536262
refactor: Extract a function to make the post-classification filters 2023-03-31 12:36:26 -04:00
Carol (Nichols || Goulding) 86dbd5c529
refactor: Extract function for creating the file classifier 2023-03-31 12:36:26 -04:00
Carol (Nichols || Goulding) 63d45532fb
refactor: Extract function for making the parquet files sink 2023-03-31 12:36:26 -04:00
Carol (Nichols || Goulding) eef943ceec
refactor: Extract function for making the scratchpad gen 2023-03-31 12:36:26 -04:00
Carol (Nichols || Goulding) fe0d3c17fd
refactor: Extract function for creating the df plan exec 2023-03-31 12:36:26 -04:00
Carol (Nichols || Goulding) 07c2c768e9
refactor: Extract a function for creating the df planner 2023-03-31 12:36:25 -04:00
Carol (Nichols || Goulding) 7bbf0fcd79
refactor: Import all components from super, not crate 2023-03-31 12:36:25 -04:00
Carol (Nichols || Goulding) 7d2d9dd6b7
refactor: Extract a function for creating the IR planner 2023-03-31 12:36:25 -04:00
Carol (Nichols || Goulding) d7fe50b7ed
refactor: Move logging and metrics of the commit component into where it's created 2023-03-31 12:36:25 -04:00
Carol (Nichols || Goulding) 821ad7f38c
refactor: Move logging and metrics into where the rest of the partition done sink is created 2023-03-31 12:36:25 -04:00
Carol (Nichols || Goulding) 682ed14b9e
refactor: Extract function for creating the round info source 2023-03-31 12:36:25 -04:00
Carol (Nichols || Goulding) 3ce062fd2e
refactor: Extract function for creating partition files source 2023-03-31 12:36:25 -04:00
Carol (Nichols || Goulding) 338ca030ab
refactor: Extract function for creating the partition info source 2023-03-31 12:36:25 -04:00
Carol (Nichols || Goulding) b5f233f037
refactor: Move all partition filter creation into the function for that purpose 2023-03-31 12:36:24 -04:00
Carol (Nichols || Goulding) b9727d2e17
refactor: Extract a function for creating partitions source, commit, and done sink 2023-03-31 12:36:24 -04:00
Carol (Nichols || Goulding) b7b15dff26
refactor: Extract function for making the partition stream
Trying to make the inputs and outputs more clear.
2023-03-31 12:36:24 -04:00
Carol (Nichols || Goulding) c51ec1cc9a
docs: Clean up typos and line wrapping
Found while reading.
2023-03-31 12:36:24 -04:00
Carol (Nichols || Goulding) e4d5c777d9
feat: Make catalog method not specific to compacting and take optional end time 2023-03-31 12:36:24 -04:00
Carol (Nichols || Goulding) 5afb9ccb73
fix: Remove TODO comment that is now done 2023-03-31 12:36:24 -04:00
Fraser Savage 3ad4cbe7a9
feat(router): Add grpc integration tests for namespace limit update
This adds additional testing coverage for updates to service protection
limits to a namespace, and how they affect subsequent writes that
exceed the limits.
2023-03-31 17:35:10 +01:00
Fraser Savage eba7eb7486
refactor(cli): DRY error definitions for namespace commands
Unused redefinitions of Error were made in namespace commands.
This commit removes those and consolidates error definition to the main
namespace CLI module.
2023-03-31 17:14:21 +01:00
Fraser Savage 30b292f3df
feat(cli): Update namespace service protection limits
This commit adds a client method to invoke the
UpdateNamespaceServiceProtectionLimits RPC API, providing a user
friendly way to do this through the IOx command line.
2023-03-31 17:14:20 +01:00
Fraser Savage 134967cddb
feat(namespace): Enable update of service protection limits over gRPC
This adds a message type to encapsulate service protection limits
for a namespace, an RPC to update any single limit and exposes
the limits on a namespace as part of the pre-existing Namespace message.
2023-03-31 17:14:19 +01:00
Phil Bracikowski 6cc2f03ea0
fix: default the write cli comment to the http default port. (#7394)
* fix: default the write cli command to the http default port.

The all-in-one write api is based on influxdb cloud's v2 http api, which
uses the 8080 http default port. This changeset will
allow 'influxdb_iox write' to work against default influxdb_iox
all-in-one without needing to use the --host option to change the port.

It should not change behavior for existing users of `--host`. It adds a
new configuartion option call `--http-host` to set the http port
separately from the gRPC one.

* fix: fmt
2023-03-31 14:59:24 +00:00
Dom Dwyer d322791d12
refactor: tidy NamespaceName construction errors
There was a mix of different ways of returning errors - this commit
unifies them, adds some documentation to the returned errors, and
removes the capitalisation.

Errors should be lower-case so they compose nicely like this:
    "something failed: super important error: inner error"
rather than:
    "something failed: Super important error: Inner error"
2023-03-31 16:27:26 +02:00
Dom Dwyer d3bb75e1b5
perf(router): avoid cloning valid org/bucket value
Changes the org/bucket to NamespaceName calls to move the values into
the constructor, allowing it to reuse them if they do not require
encoding (the common case) instead of forcing them to be cloned to
obtain a 'static NamespaceName.
2023-03-31 16:14:33 +02:00
Dom Dwyer 65034cfaa6
refactor: org & bucket parser on NamespaceName
Moves the function org_and_bucket_to_namespace() to be an associated
method (constructor) on the NamespaceName itself.
2023-03-31 16:12:49 +02:00
Dom Dwyer 259dc04937
refactor: move NamespaceName & related fn into mod
Moves the NamespaceName, associated errors and helper functions into
it's own module.
2023-03-31 15:58:09 +02:00
dependabot[bot] 275dad704e
chore(deps): Bump futures from 0.3.27 to 0.3.28 (#7397)
Bumps [futures](https://github.com/rust-lang/futures-rs) from 0.3.27 to 0.3.28.
- [Release notes](https://github.com/rust-lang/futures-rs/releases)
- [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/futures-rs/compare/0.3.27...0.3.28)

---
updated-dependencies:
- dependency-name: futures
  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-31 10:44:23 +00:00
dependabot[bot] 2884d13bd2
chore(deps): Bump futures-executor from 0.3.27 to 0.3.28 (#7398)
Bumps [futures-executor](https://github.com/rust-lang/futures-rs) from 0.3.27 to 0.3.28.
- [Release notes](https://github.com/rust-lang/futures-rs/releases)
- [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/futures-rs/compare/0.3.27...0.3.28)

---
updated-dependencies:
- dependency-name: futures-executor
  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-31 08:58:39 +00:00
dependabot[bot] d962d5b26f
chore(deps): Bump futures-util from 0.3.27 to 0.3.28 (#7395)
Bumps [futures-util](https://github.com/rust-lang/futures-rs) from 0.3.27 to 0.3.28.
- [Release notes](https://github.com/rust-lang/futures-rs/releases)
- [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/futures-rs/compare/0.3.27...0.3.28)

---
updated-dependencies:
- dependency-name: futures-util
  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-31 08:35:45 +00:00
Marco Neumann e3b802cd25
feat: "parquet sortness" optimizer pass (#7383)
* feat: "parquet sortness" optimizer pass

Trade wider fan-out for the not having to fully sort parquet files.

For #6098.

* test: rename

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>
2023-03-31 08:01:33 +00:00
Martin Hilton 052e190dd0
feat(service_grpc_flight): optional query authorization (#7351)
* feat(service_grpc_flight): optional query authorization

Add support for requiriing namespace-level authorization for
arrow flight based query requests. These are the flight SQL commands
as well as the IOx-specific SQL over flight and InfluxQL over flight
protocols.

Supports the optional configuration of an authorization sidecar,
in the same manner as is used in the router. If this is configured
then all arrow flight gRPC requests that are implemented will require
a valid authorization token to be supplied in the request. For a
multi-legged operation such as GetFlightInfo + DoGet required for
FlightSQL then a valid authorization is required for every request.

Ideally this support would be implemented using some sort of
interceptor, however the namespace isn't known until the request
processing has been started. The authorization check is performed
as soon as possible once the desired operation is known.

The legacy "storage" API has no authorization checks. Care should
be taken to ensure this API is never exposed to an untrusted network.

* chore(service_grpc_flight): review suggestions

Implement some suggestions from reviewers. The main change is adding
authorization checks to the handshake command.

* chore(service_grpc_flight): remove authorization of handshake

The Handshake call is used by existing clients to verify the
connection. These clients do not send a namespace header with the
request meaning there is nothing to authorize against. Remove this
authorization for now to avoid breaking existing clients.

* refactor: implement Authorizer trait on Option

Based on a suggestion from Dom implement the Authorizer trait on
Option<T: Authorizer> so that the call sites no longer need to check
if an authorizer is configured. This simplifies the code at the
call sites.

To maximise the utility the signature has changed so that a optional
token is now used. When no authorizer is configured this will not
be looked at. When a token is required a new error will be returned
if no token was supplied.

* fix: suggestions from clippy
2023-03-31 07:33:54 +00:00
Marco Neumann 2d7bff91b5
feat: allow gap-fill logical opt. to handle inline filters (#7384)
With #6098 our `TableProvider` will declare `supports_filter_pushdown`
as "exact" since we handle the predicate pushdown ourselves. This has
two effects:

1. The phys. plan no longer contains an additional `FilterExec` node
   even if we already do all the correct filtering. This will improve
   performance.
2. The logical plan no longer contains a `Filter` node but instead the
   predicate is part of the `TableScan`. This simplifies the logical
   plan.

For (2) we need to adjust the gap fill logical optimizer to find the
time range again. Otherwise the optimizer pass will fail (which is
currently somewhat swallowed by DataFusion even though it is logged) and
the physical plan will contain our placeholder UDFs that are not
executable.

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-03-31 06:09:51 +00:00
kodiakhq[bot] f2ae47f72e
Merge pull request #7392 from influxdata/cn/redo
fix: Only look at the current branch files' status when looking for concurrent modifications
2023-03-30 20:34:05 +00:00
kodiakhq[bot] a1389e5962
Merge branch 'main' into cn/redo 2023-03-30 20:27:25 +00:00
Phil Bracikowski 807082ae69
Merge pull request #7391 from influxdata/pjb-update-readme
chore: update readme after going through it.
2023-03-30 13:26:22 -07:00
Phil Bracikowski 144a0948a2
Merge branch 'main' into pjb-update-readme 2023-03-30 13:16:43 -07:00
Phil Bracikowski 4adb4975e1 chore: update readme after going through it. 2023-03-30 13:15:40 -07:00
Carol (Nichols || Goulding) 8718aaa148
fix: Change test file ID to match intent 2023-03-30 16:04:52 -04:00
Carol (Nichols || Goulding) c37f908349
docs: Update comments based on the new criteria for changed files 2023-03-30 16:04:51 -04:00
Carol (Nichols || Goulding) bf026d1f74
fix: Only log that we've detected changed files we're about to compact 2023-03-30 15:10:35 -04:00
Carol (Nichols || Goulding) 48b102f037
fix: Only check that existing files continue to exist at their current compaction level 2023-03-30 14:06:39 -04:00