Commit Graph

11644 Commits (1d3d7d422bbdfd52aa7f25c769da53f8e5d7e4af)

Author SHA1 Message Date
Dom 53a3264d14
Merge branch 'main' into dom/rpc-timeout-error 2023-03-23 16:07:04 +00:00
kodiakhq[bot] 1296eab093
Merge pull request #7306 from influxdata/cn/refactor
refactor: Organize compactor component responsibilities
2023-03-23 15:34:29 +00:00
kodiakhq[bot] acb491aa98
Merge branch 'main' into cn/refactor 2023-03-23 15:27:46 +00:00
Nga Tran 2379f00929
test: set max_l0_created_at appropriately for tests of many_files (#7304)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-03-23 15:27:28 +00:00
Carol (Nichols || Goulding) 98ec67c564
docs: Add suggested clarification comment 2023-03-23 11:20:06 -04:00
Nga Tran eb232cadc8
test: set max_l0_created_at approriately for tests in single_timestamp (#7305)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-03-23 15:19:31 +00:00
Carol (Nichols || Goulding) efa9732ff1
docs: Copy edit doc comments 2023-03-23 11:15:35 -04:00
Dom Dwyer e899dc70c0
feat: meaningful RPC write failure errors
Whenever an RPC write to an upstream ingester fails, it is retried after
an increasing delay, until the RPC_TIMEOUT is hit. Because of this, any
RPC write error would be returned as a "timeout", masking the underling
reason the write actually failed.

This commit pushes down the timeout logic, and retains the most recently
observed RPC write error, returning it to the user instead of the
timeout error.
2023-03-23 16:01:59 +01:00
Dom Dwyer e885eb9061
test(router): RPC error responses from RpcWrite
This PR changes the RpcWrite DmlHandler to facilitate testing using
mocked RPC client circuit breaker states, and assert the error response
for no healthy upstreams.
2023-03-23 16:01:58 +01:00
Dom Dwyer f3d96b6ed1
refactor(mock): iter for MockWriteClient returns
Instead of accepting a finite VecDeque of return values, allow the
MockWriteClient to take any dyn Iterator that yields the required
response type.
2023-03-23 16:01:57 +01:00
Dom Dwyer 68f948c70b
refactor: rename generic type parameter
Rename C -> T, to be consistent with the Balancer, and open up C for
consistent usage between the two.
2023-03-23 16:01:57 +01:00
Andrew Lamb e929053109
test(fligthsql): Schema test coverage for GetTables table_schema=true (#7313)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-03-23 14:13:42 +00:00
kodiakhq[bot] 23ae97cd17
Merge pull request #7314 from influxdata/savage/6995-namespace-cli-should-allow-deletion
feat(cli): Add namespace delete command
2023-03-23 13:54:32 +00:00
kodiakhq[bot] d5aa360ef0
Merge branch 'main' into savage/6995-namespace-cli-should-allow-deletion 2023-03-23 13:47:37 +00:00
Nga Tran 28bab6899a
test: set max_l0_created_at to more appropriately value for large_overlaps tests (#7303)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-03-23 13:47:16 +00:00
Fraser Savage 8471baf567
refactor(cli): e2e test assert namespace not in list after deletion 2023-03-23 13:43:43 +00:00
kodiakhq[bot] 7e553e73f4
Merge pull request #7288 from influxdata/dom/upstream-set-non-empty
refactor: non-empty RPC endpoint sets
2023-03-23 12:55:21 +00:00
kodiakhq[bot] 744c3e05f6
Merge branch 'main' into dom/upstream-set-non-empty 2023-03-23 12:47:56 +00:00
kodiakhq[bot] f029a42ac1
Merge pull request #7302 from influxdata/savage/add-hot-partition-persistence-metric
feat(persist): Add hot partition persistence counter metric
2023-03-23 12:31:15 +00:00
Fraser Savage 121bb4496f
Merge branch 'main' into savage/add-hot-partition-persistence-metric 2023-03-23 11:35:52 +00:00
Fraser Savage 3d545369ae
feat(persist): Do not capture partition ID for hot persist metric
Capturing this information has unbounded cardinality and is not
worth the performance and operational implications.
2023-03-23 11:33:17 +00:00
Fraser Savage 5735aae998
feat(cli): Add namespace delete command
This adds the CLI action to call the namespace soft-deletion
gRPC endpoint and an associated e2e CLI test.
2023-03-23 11:23:00 +00:00
dependabot[bot] 1c83b746c2
chore(deps): Bump rustix from 0.36.11 to 0.37.3 (#7308)
* chore(deps): Bump rustix from 0.36.11 to 0.37.3

Bumps [rustix](https://github.com/bytecodealliance/rustix) from 0.36.11 to 0.37.3.
- [Release notes](https://github.com/bytecodealliance/rustix/releases)
- [Commits](https://github.com/bytecodealliance/rustix/compare/v0.36.11...v0.37.3)

---
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-23 10:43:11 +00:00
Fraser Savage 3955b89e5f
Merge branch 'main' into savage/add-hot-partition-persistence-metric 2023-03-23 10:36:51 +00:00
Dom 4a074d48f2
Merge pull request #7309 from influxdata/dependabot/cargo/dotenvy-0.15.7
chore(deps): Bump dotenvy from 0.15.6 to 0.15.7
2023-03-23 10:33:22 +00:00
Dom 1ff3d8f8e4
Merge pull request #7310 from influxdata/dependabot/cargo/bitflags-2.0.2
chore(deps): Bump bitflags from 1.3.2 to 2.0.2
2023-03-23 10:32:59 +00:00
Dom Dwyer 19021ec3f3
refactor: disallow empty UpstreamSnapshot
This simplifies the semantics of upstream RPC endpoint snapshots; an
empty snapshot will never be returned, and therefore if the caller has a
snapshot, it contains at least one endpoint to attempt an RPC call
against.

This moves the "no upstream" error handling from a write-time error, to
a pre-write error.
2023-03-23 11:31:20 +01:00
Dom Dwyer d4486bef3e
refactor: access upstream count in UpstreamSnapshot
Adds a method to return the number of upstreams in an UpstreamSnapshot.
2023-03-23 11:31:20 +01:00
Fraser Savage 2fea22587a
Merge branch 'main' into savage/add-hot-partition-persistence-metric 2023-03-23 10:29:58 +00:00
CircleCI[bot] 76f23bd768 chore: Run cargo hakari tasks 2023-03-23 02:04:56 +00:00
dependabot[bot] 793dc28cf8
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>
2023-03-23 02:03:10 +00:00
dependabot[bot] 3a473d2374
chore(deps): Bump dotenvy from 0.15.6 to 0.15.7
Bumps [dotenvy](https://github.com/allan2/dotenvy) from 0.15.6 to 0.15.7.
- [Release notes](https://github.com/allan2/dotenvy/releases)
- [Changelog](https://github.com/allan2/dotenvy/blob/master/CHANGELOG.md)
- [Commits](https://github.com/allan2/dotenvy/compare/v0.15.6...v0.15.7)

---
updated-dependencies:
- dependency-name: dotenvy
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-23 02:02:33 +00:00
Stuart Carnie 08ef689d21
feat: Teach InfluxQL how to plan an aggregate query (#7230)
* feat: Display failed query

Allows a user to immediately identify the failed query.

* feat: API improvements to InfluxQL parser

* feat: Extend `SchemaProvider` trait to query for UDFs

* fix: We don't want the parser to panic on overflows

* fix: ensure `map_type` maps the timestamp data type

* feat: API to map a InfluxQL duration expression to a DataFusion interval

* chore: Copied APIs from DataFusion SQL planner

These APIs are private but useful for InfluxQL planning.

* feat: Initial aggregate query support

* feat: Add an API to fetch a field by name

* chore: Fixes to handling NULLs in aggregates

* chore: Add ability to test expected failures for InfluxQL

* chore: appease rustfmt and clippy 😬

* chore: produce same error as InfluxQL

* chore: appease clippy

* chore: Improve docs

* chore: Simplify aggregate and raw planning

* feat: Add support for GROUP BY TIME(stride, offset)

* chore: Update docs

* chore: remove redundant `is_empty` check

Co-authored-by: Christopher M. Wolff <chris.wolff@influxdata.com>

* chore: PR feedback to clarify purpose of function

* chore: The series_sort can't be empty, as `time` is always added

This was originally intended as an optimisation when executing an
aggregate query that did not group by time or tags, as it will produce
N rows, where N is the number of measurements queried.

* chore: update comment for clarity

---------

Co-authored-by: Christopher M. Wolff <chris.wolff@influxdata.com>
2023-03-23 01:13:15 +00:00
Joe-Blount 77948e3341
chore(iox/compactor): add test cases tracking max_l0_created_at (#7181)
* chore(iox/compactor): add test cases tracking max_l0_created_at

* chore(iox/compactor): add invariant check to simulator for misordered max_l0_created_at

* chore(iox/compactor): test updates for max_l0_created_at

This commit updates the newly added tests to comply with the new invariant check.
Several test cases are deleted because the changes to comply with the invariant make the permutations pointless.

* chore(iox/simulator): Add test cases hitting new invariant check for illegal max_l0_created_at

* chore: update previous tests to comply with new invariant

* chore: address comments

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-03-22 22:14:06 +00:00
Carol (Nichols || Goulding) 2b8db8d645
refactor: Move decision about what plan to create into IRPlanner 2023-03-22 17:03:04 -04:00
Carol (Nichols || Goulding) 4c551a3ce9
refactor: Move uuid merging further into plan building 2023-03-22 16:53:28 -04:00
Carol (Nichols || Goulding) 626dd236f9
refactor: Have run_plans take ownership of split_or_compact
Making this clone more explicit, higher up. Deleting the old files from
the catalog might only need the IDs, and the compaction levels for the
metrics, but that can be later.
2023-03-22 16:45:04 -04:00
Carol (Nichols || Goulding) a58ef38bb0
refactor: Move target_level into PlanIR
Because this info needs to stay with the rest of the plan info
2023-03-22 16:15:16 -04:00
Chunchun Ye 87708dc64a
feat(flightsql): Add filters to `GetTables` metadata endpoint (#7289)
* feat: add optional param to GetTables

* chore: add the third param to query plan

* feat: add table_types param

* chore: clippy

* test: add test cases with filters

* chore: update query to avoid SQL injection

* refactor: update where clause and cleanup

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-03-22 20:14:01 +00:00
Carol (Nichols || Goulding) a20c5dcd8b
refactor: Move the logic for getting the input paths into FilesToSplitOrCompact 2023-03-22 15:51:43 -04:00
Carol (Nichols || Goulding) e2dcf0b5e9
refactor: Share execute_plan calls between compact and split paths 2023-03-22 15:17:40 -04:00
Carol (Nichols || Goulding) 3235be572d
refactor: Inline run_split_plan in anticipation of combining more code 2023-03-22 15:08:16 -04:00
Carol (Nichols || Goulding) 91ac9627fa
refactor: Inline run_compaction_plan in anticipation of combining code with run_split_plan 2023-03-22 14:44:01 -04:00
Carol (Nichols || Goulding) 7100be4103
refactor: Inline run_split_plans in anticipation of combining with run_compaction_plan
Also set a capacity on the Vec to avoid some reallocations.
2023-03-22 14:18:44 -04:00
Carol (Nichols || Goulding) 45a32f80f9
refactor: Move the decision for making progress into the filter
And define the conditions for that decision on a type responsible for
the data that goes into that condition.

Also start moving away from methods that only work on one variant of
FilesToSplitOrCompact, and add a state for when FilesToSplitOrCompact
doesn't actually contain any files.
2023-03-22 13:24:09 -04:00
Carol (Nichols || Goulding) c0b99011c8
refactor: Make some names more consistent and less redundant
I can't ever remember whether it's "compact or split" or "split or
compact", so now I think it's always "split or compact".

Also remove "FilesTo" from the enum variants because "FilesTo" is in the
overall enum name.
2023-03-22 13:06:11 -04:00
Carol (Nichols || Goulding) a3fa986f6e
refactor: Give post-classification partition filter a separate trait
I want to change the types, but for now, this is mostly a copy of the
partition filter trait and setting up the associated
logging/metrics/mock.
2023-03-22 13:06:11 -04:00
Carol (Nichols || Goulding) 63bb4db6e9
refactor: Rename unable_to_compact to possible_progress 2023-03-22 13:06:11 -04:00
Carol (Nichols || Goulding) b78b3d3ee2
refactor: Rename UnableToCompactPartitionFilter to PossibleProgressFilter
I'm going to move all the decisions about whether there's progress to be
made or not into here.
2023-03-22 13:06:11 -04:00
Carol (Nichols || Goulding) 353eda377e
refactor: Reduce complexity where there's only one filter remaining
The vec and the AndFilter aren't needed because there's only one filter
happening in this spot now.
2023-03-22 13:06:11 -04:00