Commit Graph

12273 Commits (b299937d180cf6964053d9bab27f83dde8ea34b8)

Author SHA1 Message Date
Jeffrey Smith II d252866e18 chore: Merge remote-tracking branch 'origin/main' into smith/remove-transactions-main 2023-05-15 12:35:22 -04:00
wiedld d087160112 chore: update naming conventions, and use assert_histogram in tests 2023-05-15 09:26:15 -07:00
wiedld de3ff7aa2d chore: update MockAuthorizer to use return call pattern 2023-05-15 09:26:09 -07:00
wiedld 199daee0f6 chore: make AuthorizerInstrumentation use a constant topic (metric name) within the registry 2023-05-15 08:52:09 -07:00
wiedld d8661d043b chore: use new authorizer metric decorator, in the router 2023-05-15 08:52:06 -07:00
wiedld db76a85a4d chore: create duration metric decorator for Authorizer 2023-05-15 08:36:24 -07:00
wiedld 6969d94cda
Merge pull request #7740 from influxdata/authz/refactor-interface
refactor: Authorizer trait, and the explicit contract of IoxAuthorizer
2023-05-15 08:09:25 -07:00
wiedld 867fd39dbf
Merge branch 'main' into authz/refactor-interface 2023-05-15 08:03:10 -07:00
kodiakhq[bot] 41ec673f6f
Merge pull request #7789 from influxdata/cn/move-peas
fix: Have data_types depend on generated_types rather than the other way around
2023-05-15 14:42:10 +00:00
kodiakhq[bot] e14bc925db
Merge branch 'main' into cn/move-peas 2023-05-15 14:36:18 +00:00
Jeffrey Smith II 09dc622078 chore: Merge remote-tracking branch 'origin/main' into smith/remove-transactions-main 2023-05-15 10:06:11 -04:00
Andrew Lamb 7735e7c95b
chore: Update DataFusion again (#7777)
* chore: Update datafusion again

* 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-05-15 12:38:45 +00:00
Dom 6aa634c1b9
Merge branch 'main' into cn/move-peas 2023-05-15 13:29:42 +01:00
Dom 8543c3ca1f
Merge pull request #7775 from kayagokalp/kayagokalp/7764
refactor: accept `impl Into<String>` instead of `&str` for schema methods
2023-05-15 11:42:43 +01:00
Dom b9857545e6
Merge branch 'main' into kayagokalp/7764 2023-05-15 11:37:19 +01:00
Dom Dwyer 7f52959d29
perf: move column names for Schema construction
When converting from a ColumnsByName into a schema::Schema instance,
move the column names instead of cloning them.
2023-05-15 12:31:19 +02:00
Dom Dwyer 160628a7f8
refactor: impl intoIterator for ColumnsByName
Allows the ColumnsByName to be converted into an iterator yielding owned
column names & schema.
2023-05-15 12:30:11 +02:00
Kaya Gökalp 5fe8affb18
refactor: accept NamespaceName with Namespace create (#7774)
Co-authored-by: Dom <dom@itsallbroken.com>
2023-05-15 10:03:55 +00:00
Dom 6257918d4c
Merge branch 'main' into kayagokalp/7764 2023-05-15 11:01:08 +01:00
Dom 9c5028676e
Merge pull request #7791 from influxdata/dependabot/cargo/pin-project-1.1.0
chore(deps): Bump pin-project from 1.0.12 to 1.1.0
2023-05-15 10:55:53 +01:00
Stuart Carnie 7ba619a32b
feat: outer GROUP BY pushed down to subqueries; more Cloud 2 examples 2023-05-15 15:31:20 +10:00
Stuart Carnie e75a95bca7
chore: clippy 🧹 2023-05-15 15:30:39 +10:00
CircleCI[bot] f51ff7bb45 chore: Run cargo hakari tasks 2023-05-15 02:03:37 +00:00
dependabot[bot] fba9836f2a
chore(deps): Bump pin-project from 1.0.12 to 1.1.0
Bumps [pin-project](https://github.com/taiki-e/pin-project) from 1.0.12 to 1.1.0.
- [Release notes](https://github.com/taiki-e/pin-project/releases)
- [Changelog](https://github.com/taiki-e/pin-project/blob/main/CHANGELOG.md)
- [Commits](https://github.com/taiki-e/pin-project/compare/v1.0.12...v1.1.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-15 02:02:32 +00:00
Stuart Carnie 62a4c02836
feat: Handle default FILL behaviour for subqueries 2023-05-15 11:22:26 +10:00
Stuart Carnie c77c4b3d23
feat: support nested aggregate subqueries 2023-05-15 09:31:06 +10:00
Stuart Carnie 0dd1826e3c
feat: add the merged tag set for the `Select` query 2023-05-15 09:30:28 +10:00
Stuart Carnie f7a8850f62
chore: docs 2023-05-15 09:29:45 +10:00
Stuart Carnie 914d2a9e02
chore: docs 2023-05-15 07:27:47 +10:00
Stuart Carnie 553476c646
fix: time should be added to all subqueries of arbitrary depth 2023-05-15 07:22:24 +10:00
Stuart Carnie 4e96f814db
chore: Improve docs 2023-05-15 07:21:36 +10:00
Stuart Carnie e0941a9875
Merge branch 'main' into sgc/issue/6879_subquery_01 2023-05-15 07:19:20 +10:00
wiedld e1333ed227 chore: update description of errors returned from Authorizer trait.
Co-authored-by: Dom <dom@itsallbroken.com>
2023-05-13 16:32:21 -07:00
kayagokalp cb0fb92d86 refactor: remove borrowed from impl of ColumnsByName for Schema 2023-05-13 15:39:06 +03:00
wiedld 75d285a83a test: fix IoxAuthorizeService mock to not return valid for unrecognized tokens 2023-05-12 15:31:14 -05:00
wiedld 509fab2de0 test: add test demonstrating the behavior when a token is invalid 2023-05-12 15:31:14 -05:00
wiedld 518d10d4c0 refactor: set explicit boundaries btwn the AuthzServer communication failure, versus an invalid token response from the server 2023-05-12 15:31:14 -05:00
wiedld 62d83b9219 test: add tests for IoxAuthorizer contract 2023-05-12 15:31:12 -05:00
wiedld ea3029ee3f refactor: break out Authorizer trait versus IoxAuthorizer struct.
* make the boundaries more evident
* also make explicit what actions are tied to the IoxAuthorizer client (a.k.a. the client connection & request)
2023-05-12 15:28:58 -05:00
wiedld 4c30e7e04d refactor: Authorizer trait should have a single interface for requested permissions()
* returns an intersection of requested_perms and actual perms_on_token
* returns ok if any of the requested_perms is within the actual perms_on_token
2023-05-12 15:28:58 -05:00
Carol (Nichols || Goulding) 14007808bd
fix: Move remaining conversions between data types and proto into data_types
And have data_types depend on generated_types rather than vice versa.
2023-05-12 13:31:04 -04:00
Carol (Nichols || Goulding) 1770d0f4d8
fix: Move ingester-querier gRPC communication to its own crate 2023-05-12 13:28:30 -04:00
Carol (Nichols || Goulding) 4c7f96ead8
fix: Remove unused delete predicate proto conversion code 2023-05-12 11:27:46 -04:00
Dom Dwyer dfe1a7dec8
perf(router): parallel write replication
This commit changes the write replication loop to concurrently write to
N distinct upstream ingesters, instead of the previous sequential logic.
2023-05-12 17:04:32 +02:00
Dom Dwyer bf93014bb7
feat: concurrent lending iterator
Changes the UpstreamSnapshot to be suitable for concurrent use. This
type contains the core logic to enable a caller to uphold the
responsibility of ensuring replicated writes land on distinct ingesters
in the presence of concurrent replication.

The clients within the snapshot are returned to at most one concurrent
caller at a time, by tracking the state of each client as a FSM:

                        ┌────────────────┐
                     ┌─▶│   Available    │
                     │  └────────────────┘
                     │           │
                   drop       next()
                     │           │
                     │           ▼
                     │  ┌────────────────┐
                     └──│    Yielded     │
                        └────────────────┘
                                 │
                              remove
                                 │
                                 ▼
                        ┌────────────────┐
                        │      Used      │
                        └────────────────┘

Once a client has been yielded it will not be yielded again until it is
dropped (transitioning the FSM from "yielded" to "available" again,
returning it to the candidate pool of clients) or removed (transitioning
to "used", permanently preventing it from being yielded to another
caller).
2023-05-12 17:04:32 +02:00
Dom Dwyer cdaf99268c
refactor: owned client in UpstreamSnapshot
Changes then UpstreamSnapshot to return owned clients, instead of
references to those clients.

This will allow the snapshot to have a 'static lifetime, suitable for
use across tasks.
2023-05-12 16:59:49 +02:00
Dom Dwyer dc27ae5fbf
refactor: eliminate impossible error
Because the number of candidate upstreams is checked to exceed the
number of desired data copies before starting the write loop, and
because the parallelism of the write loop matches the number of desired
data copies, it's not possible for any thread to observe an empty
snapshot.

This commit removes the unreachable error condition for clarity.
2023-05-12 16:59:49 +02:00
Dom Dwyer 465158e08e
test(router): replication prop/invariant fuzzing
Adds a property-based test of the RPC write handler's replication logic,
ensuring:

    1. If the number of healthy upstreams is 0, NoHealthyUpstreams is
       returned and no requests are attempted.

    2. Given N healthy upstreams (> 0) and a replication factor of R:
       if N < R, "not enough replicas" is returned and no requests are
       attempted.

    3. Upstreams that return an error are retried until the entire
       write succeeds or times out.

    4. Writes are replicated to R distinct upstreams successfully, or
       an error is returned.

    5. One an upstream write is ack'd as successful, it is never
       requested again.

    6. An upstream reporting as unhealthy at the start of the write is
       never requested (excluding probe requests).

These properties describe a mixture of invariants (don't replicate your
two copies of a write to the same ingester) and expected behaviour of
the replication logic (optimisations like "don't try writes when you
already know they'll fail").

This passes for the single-threaded replication logic used at the time
of this commit, and will be used to validate correctness of a concurrent
replication implementation - a concurrent approach should uphold these
properties the same way a single-threaded implementation does.
2023-05-12 16:59:48 +02:00
Dom Dwyer cf622c1b91
test: MockWriteClient tracks ACK response count
Changes the MockWriteClient to track how many success responses it has
returned in response to a write request.
2023-05-12 16:59:48 +02:00
Dom Dwyer ac656ab1f9
refactor: clearer NoHealthyUpstreams error name
Renames NoUpstreams -> NoHealthyUpstreams as it's confusing because we
also have "not enough replicas" which could be no upstreams? This has a
slightly clearer meaning.
2023-05-12 16:59:47 +02:00