Commit Graph

13254 Commits (dac0db21960c871c298924269d198a8b01849724)

Author SHA1 Message Date
Andrew Lamb c3788ee2b8
chore: Update datafusion pin (#8223) 2023-07-12 18:18:41 +00:00
Dom Dwyer 7bd6e90830
perf: only send metadata for relevant partitions
When partition pruning is possible, it skips sending the data for
partitions that have no affect on the query outcome.

This commit does the same for the partition metadata - these frames can
form a significant portion of the query response when the row count is
low, and for pruned partitions have no bearing on the query result.
2023-07-12 18:38:43 +02:00
Dom 5232cfea1d
Merge pull request #8051 from influxdata/dom/gossip-basic
feat: gossip primitive
2023-07-12 17:21:33 +01:00
Dom 2bd7af6ca6
Merge branch 'main' into dom/gossip-basic 2023-07-12 17:11:59 +01:00
Fraser Savage 7e595eca88
test(router): Assert RPC write span contexts can be parsed as encoded
This test aims to add some assertion that the span context is correctly
encoded into an RPC write request as long as the [`TraceHeaderParser`]
is responsible for decorating the requests extensions with the added
information.
2023-07-12 16:41:40 +01:00
kodiakhq[bot] 5f63407f24
Merge pull request #8083 from influxdata/cn/query-catalog-with-either-partition-identifier
feat: Query the catalog with PartitionHashId if you have it, otherwise with PartitionId
2023-07-12 14:56:29 +00:00
Dom 1fce6d7b86
Merge branch 'main' into dom/gossip-basic 2023-07-12 15:53:49 +01:00
kodiakhq[bot] e73116a122
Merge branch 'main' into cn/query-catalog-with-either-partition-identifier 2023-07-12 14:51:02 +00:00
Fraser Savage 729851be58
test(ingester): Integration test for RPC write trace context inheritrance 2023-07-12 15:48:41 +01:00
Dom 61325e2593
Merge pull request #8219 from influxdata/dom/query-tracing
refactor(ingester): emit spans for query handler
2023-07-12 14:24:15 +01:00
Fraser Savage 458b1bf1a6
feat(ingester): Extract SpanContext from RPC write request
Ensure that if a `SpanContext` type is present in the request that the
trace ID is used for spans in the RPC write path.
2023-07-12 14:22:58 +01:00
Dom Dwyer af56985d70
refactor(ingester): emit span for query handler
Emit a span that covers the entire flight query handler.
2023-07-12 14:42:43 +02:00
Fraser Savage 5a37c92c2c
feat(router): Send tracing SpanContext header to ingester during RPC write 2023-07-12 11:30:50 +01:00
Dom ceecd11064
Merge branch 'main' into dom/gossip-basic 2023-07-12 10:50:57 +01:00
dependabot[bot] b8f1c8f68a
chore(deps): Bump rustix from 0.38.3 to 0.38.4 (#8217)
Bumps [rustix](https://github.com/bytecodealliance/rustix) from 0.38.3 to 0.38.4.
- [Release notes](https://github.com/bytecodealliance/rustix/releases)
- [Commits](https://github.com/bytecodealliance/rustix/compare/v0.38.3...v0.38.4)

---
updated-dependencies:
- dependency-name: rustix
  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-07-12 09:28:30 +00:00
Dom c6a4ab0225
Merge pull request #8218 from influxdata/dependabot/cargo/serde_json-1.0.102
chore(deps): Bump serde_json from 1.0.100 to 1.0.102
2023-07-12 10:22:37 +01:00
dependabot[bot] d74f047b06
chore(deps): Bump serde_json from 1.0.100 to 1.0.102
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.100 to 1.0.102.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.100...v1.0.102)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-12 02:00:42 +00:00
Marko Mikulicic ebe1f4c91d
fix: Implement influxql ExecutionPlan::children (#8215) 2023-07-12 00:01:02 +00:00
Andrew Lamb f33891b9fe
fix(all-in-one): Run compactor in all-in-one mode (#8214)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-07-11 21:14:07 +00:00
wiedld d43300635e
Revert "feat(idpe-17789): scheduler job_status() (#8202)" (#8213)
This reverts commit 3dabccd84b.
2023-07-11 10:33:56 -07:00
Joe-Blount c5a4912399 chore: add compactor tracing test case 2023-07-11 10:43:09 -05:00
Joe-Blount 23aff4afc4 chore: add more useful info to compactor tracing 2023-07-11 10:42:32 -05:00
wiedld 3dabccd84b
feat(idpe-17789): scheduler job_status() (#8202)
* feat(idpe-17789): scheduler job_status() (#8121)

This block of work moves into the scheduler some of the specific downstream actions affiliated with compaction outcomes. Which responsibilities stay in the compactor, versus moved to the scheduler, roughly followed the heuristic of whether the action (a) had an impact on global catalog state (a.k.a. commits and partition skipping), (b) whether it's logging affiliated with compactor health (e.g. ParitionDoneSink logging outcomes) versus system health (e.g. logging commits), and (c) reporting to the scheduler on any errors encountered during compaction. This boundary is subject to change as we move forward.

Also, a noted caveat (TODO) on this commit. We have a CompactionJob which is used to track work handed off to each compactor. Currently it still uses the partition_id for tracking, but the followup PR will start moving the compactor to have more CompactionJob uuid awareness.
2023-07-11 08:41:12 -07:00
Andrew Lamb b24f9c81ba
chore: Update DataFusion pin, updates for API changed (#8199) 2023-07-11 13:36:38 +00:00
Dom aaaa669bfb
Merge branch 'main' into cn/query-catalog-with-either-partition-identifier 2023-07-11 10:47:56 +01:00
dependabot[bot] 2d5decf108
chore(deps): Bump regex-syntax from 0.7.3 to 0.7.4 (#8206)
Bumps [regex-syntax](https://github.com/rust-lang/regex) from 0.7.3 to 0.7.4.
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/compare/regex-syntax-0.7.3...regex-syntax-0.7.4)

---
updated-dependencies:
- dependency-name: regex-syntax
  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-07-11 09:27:00 +00:00
dependabot[bot] f3b6c8bf15
chore(deps): Bump rustls from 0.21.3 to 0.21.5 (#8207)
Bumps [rustls](https://github.com/rustls/rustls) from 0.21.3 to 0.21.5.
- [Release notes](https://github.com/rustls/rustls/releases)
- [Commits](https://github.com/rustls/rustls/compare/v/0.21.3...v/0.21.5)

---
updated-dependencies:
- dependency-name: rustls
  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>
2023-07-11 09:21:38 +00:00
Martin Hilton 9111cd517f
feat(influxql): PERCENTILE function (#8187)
* feat(influxql): support TOP and BOTTOM  functions

Add support for the TOP and BOTTOM functions which return the first
n rows in some ordered data set.

* fix: clippy

* refactor(influxql): use window aggregates for selectors

Change the implentation of ProjectionType::Selector to use a window
aggregate, rather than an aggregate with a custom selector function.
This is in preparation for implementing PERCENTILE.

* feat(influxql): PERCENTILE selector

Add a selector for the row containing the nth percentile of a
partition. This is the behaviour used when a single selector function
is used in an influxql query.

* feat(influxql): PERCENTILE aggregator

Add the PERCENTILE aggregation function for when the PERCENTILE
function is used in an aggregating projection. This implementation
buffers all non-null field values in memory in order to perform the
operation and therefore could be an expensive operation. This is
necessary for compatibility with earlier influxdb versions.

* refactor(influxql): move PERCENTILE implementation out of plan

The plan module is getting rather full of user-defined function
implementations. This breaks the new functions used to implement
percentile into some new top-level modules for aggregate and window
UDFs.

* fix: doc-lint

* chore: refactor `find_enumerated`

* chore: use `s` in format string

* chore: include the unexpected selector function in the error

* chore(influxql): review suggestions

Added some addition comments to help understanding.

Changed the handling os slector functions such that FIRST, LAST,
MAX & MIN behave the same as they did before PERCENTILE was added.

* chore(influxql): make percent_row_number a window UDF

Now that user-defined window functions are available make the
percent_row_number function be one of those. this allows the values
to be calculated for the entire window partition in one go.

For some reason the user-defined window function cannot return NULL
values. This function uses 0 where it would otherwise use NULL, as
row numbering starts at 1.

---------

Co-authored-by: Stuart Carnie <stuart.carnie@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-07-11 05:33:16 +00:00
Joe-Blount 16939c849d chore: add tracing to compactor 2023-07-10 16:36:24 -05:00
Carol (Nichols || Goulding) f20e9e6368
fix: Add index on parquet_file.partition_hash_id for lookup perf 2023-07-10 13:40:03 -04:00
Carol (Nichols || Goulding) 22c17fb970
feat: Abstract over which partition ID type we're using to list Parquet files 2023-07-10 13:40:01 -04:00
Carol (Nichols || Goulding) c1e42651ec
feat: Abstract over which partition ID type we're using to compare and swap sort keys 2023-07-10 13:39:19 -04:00
Carol (Nichols || Goulding) eec31b7f00
feat: Abstract over which partition ID type we're using to get a partition from the catalog 2023-07-10 10:43:20 -04:00
kodiakhq[bot] 5521310005
Merge pull request #8094 from influxdata/savage/individually-sequence-partitions-within-writes
feat(ingester): Assign individual sequence numbers for writes per partition
2023-07-10 14:39:39 +00:00
Fraser Savage dec0244bff
refactor(e2e): Wait 100ms between queries in debug::build_catalog test 2023-07-10 15:27:30 +01:00
Fraser Savage 7e17b54f2a
Merge branch 'main' into savage/individually-sequence-partitions-within-writes 2023-07-10 15:19:45 +01:00
Fraser Savage 0978aa0551
fix(e2e): Add small busy-loop to debug::build_catalog test to assert only on non-empty results 2023-07-10 15:13:37 +01:00
Joe-Blount 83febf3eef
Merge pull request #8192 from influxdata/jrb_62_index_partition_tbl_on_createdat
chore: create index on created_at in partition table
2023-07-10 08:44:57 -05:00
Joe-Blount fdecf96103
Merge branch 'main' into jrb_62_index_partition_tbl_on_createdat 2023-07-10 08:38:12 -05:00
kodiakhq[bot] 5fa861abab
Merge branch 'main' into savage/individually-sequence-partitions-within-writes 2023-07-10 12:48:37 +00:00
Dom Dwyer c2273e6488
docs: remove outdated comment 2023-07-10 14:27:08 +02:00
Dom Dwyer 701da1363c
refactor: remove panic on impossible error
Remove the logical complexity of error handling for an error that cannot
occur.

This was an artifact of pre-PR refactoring - the error being returned
SHOULD never be reached, as the only error returned is the "your message
is too big" error, and that's not possible because the message size is
validated in the GossipHandle::broadcast() method before it reaches the
reactor.
2023-07-10 14:10:03 +02:00
Dom Dwyer a686580ffa
test: multiple messages in single test
This ensures various reused scratch buffers are wiped between uses.
2023-07-10 14:03:57 +02:00
Dom Dwyer 71625043e2
test: remove dbg!() 2023-07-10 14:02:57 +02:00
Dom Dwyer 060f1b2ed6
docs: unwrap correctness docs
Describe the possible reasons a socket recvfrom() would cause a panic.
2023-07-10 14:01:11 +02:00
Dom Dwyer 991692d2fb
refactor: short/long panic message 2023-07-10 13:51:40 +02:00
Dom Dwyer bee1b45c13
build: reuse path var
DRY the path var.
2023-07-10 13:48:01 +02:00
Dom Dwyer 118aefe2d2
chore: use workspace crate config
Inherit version/authors/edition from the workspace.
2023-07-10 13:39:52 +02:00
Dom Dwyer 7880f9287f
chore: add license 2023-07-10 12:11:16 +02:00
Dom Dwyer 58c4874880
chore: workspace_hack support
Add workspace_hack and whitelist the import.
2023-07-10 12:11:15 +02:00