Commit Graph

13114 Commits (7b385600fd08165ab645b0cfe2fcd75bf47603f5)

Author SHA1 Message Date
wiedld 5d19fa3635
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-06 09:15:59 -07:00
Dom ecc5072197
Merge pull request #8006 from influxdata/7899/wal-disk-metrics
feat(7899): wal disk metric
2023-07-06 15:04:06 +01:00
Dom a005f344d8
Merge branch 'main' into 7899/wal-disk-metrics 2023-07-06 14:44:11 +01:00
Dom Dwyer d46a5f0c51
refactor: update metrics out of phase
Emit the metrics out-of-phase with the metric scraper.
2023-07-06 15:36:30 +02:00
Dom Dwyer d979739576
perf: read disks once, resolve mount point once
Instead of refreshing every metric in the System every 10 seconds,
refresh only the disk statistics for the disk we're interested in.

Additionally resolve the parent disk for the directory path once,
instead of each loop.
2023-07-06 15:33:35 +02:00
dependabot[bot] b2c1532d3a
chore(deps): Bump regex from 1.8.4 to 1.9.0 (#8160)
* chore(deps): Bump regex from 1.8.4 to 1.9.0

Bumps [regex](https://github.com/rust-lang/regex) from 1.8.4 to 1.9.0.
- [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/1.8.4...1.9.0)

---
updated-dependencies:
- dependency-name: regex
  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: Dom <dom@itsallbroken.com>
2023-07-06 12:48:27 +00:00
dependabot[bot] bbcf3f0556
chore(deps): Bump toml from 0.7.5 to 0.7.6 (#8161)
Bumps [toml](https://github.com/toml-rs/toml) from 0.7.5 to 0.7.6.
- [Commits](https://github.com/toml-rs/toml/compare/toml-v0.7.5...toml-v0.7.6)

---
updated-dependencies:
- dependency-name: toml
  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-06 12:35:47 +00:00
Andrew Lamb c55367366f
fix: return error rather than panic on unsupported predicate (#8158)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-07-06 11:29:22 +00:00
Fraser Savage bea9dbf7ab
test(ingester): Integration test dropping of persisted WAL segments
This adds an integration test that writes some data to the ingester,
waits for the WAL to be rotated and then ensures that the segment file
has been dropped.
2023-07-06 12:12:58 +01:00
dependabot[bot] a6df3a4b36
chore(deps): Bump clap from 4.3.10 to 4.3.11 (#8162)
Bumps [clap](https://github.com/clap-rs/clap) from 4.3.10 to 4.3.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.3.10...v4.3.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>
2023-07-06 10:15:25 +00:00
dependabot[bot] 26a6113a37
chore(deps): Bump async-trait from 0.1.70 to 0.1.71 (#8163)
Bumps [async-trait](https://github.com/dtolnay/async-trait) from 0.1.70 to 0.1.71.
- [Release notes](https://github.com/dtolnay/async-trait/releases)
- [Commits](https://github.com/dtolnay/async-trait/compare/0.1.70...0.1.71)

---
updated-dependencies:
- dependency-name: async-trait
  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-06 09:58:51 +00:00
Marco Neumann 1670966119
fix: send flight keep-alives (#8144)
* fix: send flight keep-alives

This was tested using a local nginx proxy and a small modication to the
IOx source code: insert `make_stream_slow` into `GetStream::new` just
between `let query_results = ...` and
`let innr = FlightDataEncoderBuilder::new()...`.

Fixes https://github.com/influxdata/idpe/issues/17824 .

* fix: typo

* refactor: reduce keep-alive interval to 5s
2023-07-06 09:53:31 +00:00
dependabot[bot] bc6bf2d8e5
chore(deps): Bump smallvec from 1.10.0 to 1.11.0 (#8164)
Bumps [smallvec](https://github.com/servo/rust-smallvec) from 1.10.0 to 1.11.0.
- [Release notes](https://github.com/servo/rust-smallvec/releases)
- [Commits](https://github.com/servo/rust-smallvec/compare/v1.10.0...v1.11.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-06 09:43:27 +00:00
dependabot[bot] c7dbb0ceb4
chore(deps): Bump regex-syntax from 0.7.2 to 0.7.3 (#8165)
Bumps [regex-syntax](https://github.com/rust-lang/regex) from 0.7.2 to 0.7.3.
- [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.2...regex-syntax-0.7.3)

---
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>
2023-07-06 09:28:25 +00:00
dependabot[bot] adddaf5d82
chore(deps): Bump rustix from 0.38.2 to 0.38.3 (#8166)
Bumps [rustix](https://github.com/bytecodealliance/rustix) from 0.38.2 to 0.38.3.
- [Release notes](https://github.com/bytecodealliance/rustix/releases)
- [Commits](https://github.com/bytecodealliance/rustix/compare/v0.38.2...v0.38.3)

---
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>
2023-07-06 09:08:38 +00:00
dependabot[bot] a25fd6015d
chore(deps): Bump rustls from 0.21.2 to 0.21.3 (#8167)
Bumps [rustls](https://github.com/rustls/rustls) from 0.21.2 to 0.21.3.
- [Changelog](https://github.com/rustls/rustls/blob/main/RELEASE_NOTES.md)
- [Commits](https://github.com/rustls/rustls/commits)

---
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: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-07-06 09:01:12 +00:00
Martin Hilton dfffdc1d90
feat(influxql): support TOP and BOTTOM functions (#8143)
* refactor(iox_query_influxql): expand select projection

Change the SELECT projection in the planner to make it clearer how
each projection type works.

* 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

* chore: Use array / slice destructuring

* chore: review suggestion in iox_query_influxql/src/plan/planner.rs

Co-authored-by: Stuart Carnie <stuart.carnie@gmail.com>

---------

Co-authored-by: Stuart Carnie <stuart.carnie@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-07-06 07:08:45 +00:00
wiedld 36e7f53f9b
Merge branch 'main' into 7899/wal-disk-metrics 2023-07-05 13:52:43 -07:00
wiedld a02f7e7f3f chore: rename disk protection to DiskSpaceMetric 2023-07-05 13:47:07 -07:00
wiedld aa68a7acbe refactor: make into single struct 2023-07-05 13:38:49 -07:00
wiedld 66da61a0fe refactor: calculate raw metrics, not percentage
* remove calculation of percentage available
 * only record raw numbers
2023-07-05 13:34:40 -07:00
wiedld b961bc79c4 refactor: move the background task handler onto the parent IngesterGuard
* follow the pattern of the periodic wal rotation
* do NOT follow the pattern of the wal.flusher_task
2023-07-05 13:13:13 -07:00
wiedld b4b89699cd refactor: make struct signature be (path, registry)
* the metric attributes are hardcoded to the path
* the duration (frequency) of the background task is hardcoded
* the tick.await now occurs after the first metric recording, such that the test doesn't have to wait 15 seconds.
2023-07-05 12:51:23 -07:00
Fraser Savage 15b22728cc
feat(ingester): Drop WAL segments once all writes are persistent
This implements `PersistCompletionObserver` for the `WalReferenceHandle`
so that it can be given to the persist handle and notified of persist
completions in order to drop WAL segments once all writes are
persistent.
2023-07-05 16:09:03 +01:00
Joe-Blount 405c9e31a3
Merge pull request #8124 from influxdata/jrb_57_avoid_redundant_partition_analysis
fix: don't redundantly evaluate the same partitions for compaction
2023-07-05 09:33:57 -05:00
Fraser Savage b4a5d994d7
refactor(ingester): Use multi-table write op test util for wal_sink test 2023-07-05 15:28:30 +01:00
Fraser Savage 9ca0abfe0d
feat(ingester): WIP - WAL reference tracking of unbuffered writes
This commit updates the DML sink for the write-ahead log to notify the
reference tracker of writes that have been committed to the log, but
failed to be applied to the buffer tree.
2023-07-05 15:28:28 +01:00
Joe-Blount 38cfc58cc0 fix: don't redundantly evaluate the same partitions for compaction 2023-07-05 09:27:31 -05:00
Fraser Savage f481ce7070
refactor(ingester): Expose `SequenceNumberSet` for each ingest op
This allows code shuttling around ingest operations to know how the
operation has sequenced without having to fiddle about with the value.
2023-07-05 15:23:42 +01:00
Fraser Savage fd8a89deea
feat(ingester): WIP - WAL rotate task uses reference tracker for delete
This is the first commit in line to connect the WAL segment reference
tracker actor up to the rest of the ingester. It removes the segment file
deletion and hacky sleep from the rotate task, deferring to the actor
for deletion tracking.
2023-07-05 15:23:37 +01:00
Fraser Savage 7b2ef53c7b
refactor(ingester): Notify `SequenceNumberSet` when tracking unbuffered writes
Writes now contain multiple sequence numbers, so the WAL reference
actor must be notified of *all* sequence numbers contained for a write
that failed to be applied to the buffer.
2023-07-05 15:13:29 +01:00
Dom 8b70e0cb33
Merge pull request #8154 from influxdata/dom/optimised-partition-pushdown
perf(ingester): projection pushdown to data source
2023-07-05 15:07:19 +01:00
Dom af12edec38
Merge branch 'main' into dom/optimised-partition-pushdown 2023-07-05 15:01:13 +01:00
Fraser Savage 2da99f8032
refactor: Use `const` instead of unnecessary lazy_static
Co-authored-by: Carol (Nichols || Goulding) <193874+carols10cents@users.noreply.github.com>
2023-07-05 14:42:55 +01:00
Fraser Savage e74a7a7dd4
test(wal): Test correct assignment of write per-partition sequence numbers
This adds extra test coverage for the ingester's WAL replay & RPC write
paths, as well as the WAL E2E tests, to ensure that all sequence numbers
present in a WriteOperation/WalOperation are encoded and present when
decoded.
2023-07-05 14:42:47 +01:00
Fraser Savage e6e09d0c15
feat(ingester): Assign individual sequence numbers for writes per partition
This commit asks the oracle for a new sequence number for each table
batch of a write operation (and thus each partition of a write) when
handling an RPC write operation before appending the operation to the
WAL. The ingester now honours the sequence numbers per-partition when
WAL replay is performed.
2023-07-05 14:29:27 +01:00
Fraser Savage 54a8f7d007
feat(data_types): Add `Extend<SequenceNumberSet>` for `SequenceNumberSet`
Although callers could manually extend the sequence number set by continually
adding in an iterator loop or a fold expression, this enables other
combinator patterns when dealing with collections of sequence number
sets.
2023-07-05 14:23:18 +01:00
Fraser Savage 30939cfe96
refactor(wal): Remove op-level `sequence_number`, use per table map
This commit removes the op-level sequence number from the proto
definition, now reading and writing solely to the per table (and thus
per partition) sequence number map. Tables/partitions within the same
write op are still assigned the same number for now, so there should be
no semantic different
2023-07-05 14:20:43 +01:00
kodiakhq[bot] 5815df5e6d
Merge pull request #8069 from influxdata/savage/use-u64-for-sequence-number
refactor(ingester): Use unsigned sequence number, remove its `Sqlx::Type`
2023-07-05 13:01:10 +00:00
kodiakhq[bot] 70a6e60415
Merge branch 'main' into savage/use-u64-for-sequence-number 2023-07-05 12:55:44 +00:00
Dom Dwyer 7d0e3637ed
perf(ingester): projection pushdown to data source
Prior to this change projection pushdown was implemented as a filter,
which meant a query using it would take the following steps:

    * Query arrives
    * Find necessary partition data
    * Copy all the partition data into a RecordBatch
    * Filter that RecordBatch to apply the projection
    * Return results to caller

This is far from ideal, as the underlying partition data is copied in
its entirety and then the unneeded columns discarded - a pure waste!

After this PR, the projection is pushed down to the point of RecordBatch
generation:

    * Query arrives
    * Find necessary partition data
    * Copy only the projected columns to a RecordBatch
    * Return results to the caller

This minimises the amount of data copying, which for large amounts of
data should lead to a meaningful performance improvement when querying
for a subset of columns. It also uses a slightly more efficient
projection implementation by using a single pass over the columns (still
O(n) but less constant overhead).
2023-07-05 13:44:11 +02:00
Dom Dwyer 226ad2b100
test(ingester): query projection
Add an integration test driving query projection through the ingester.
2023-07-05 13:44:11 +02:00
Dom Dwyer 54a08853fe
test(ingester): split write / query tests
Split the write & query integration tests into their own modules for
clarity.
2023-07-05 13:44:10 +02:00
Dom Dwyer 09974c66db
perf: short-circuit QueryAdaptor row count check
Don't inspect every RecordBatch when checking for at least one row -
stop as soon as 1 row is observed.
2023-07-05 13:44:09 +02:00
Dom Dwyer a17bd3bded
refactor: don't Arc-wrap RecordBatch instances
RecordBatch are internally ref-counted, so don't Arc wrap them again.
2023-07-05 13:44:09 +02:00
Dom Dwyer 8f0ae77184
test(bench): ingester query & projection
Benchmark query performance against a variety of row/column counts, with
and without projection.
2023-07-05 13:44:08 +02:00
Marco Neumann 35d93f9475
fix: include `PartitionHashId` in size estimations (#8153)
As for the other types: size estimations are conservative, so we assume
the value behind the `Arc` is owned by the estimating party.
2023-07-05 10:42:39 +00:00
dependabot[bot] 3827257f94
chore(deps): Bump thiserror from 1.0.40 to 1.0.41 (#8149)
Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.40 to 1.0.41.
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.40...1.0.41)

---
updated-dependencies:
- dependency-name: thiserror
  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-05 09:25:14 +00:00
Marco Neumann 9c65185068
refactor: normalize catalog metric names (#8152)
Use the same prefix for all metrics of the same repo type. This makes
reading dashboards way easier.

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-07-05 09:18:39 +00:00
dependabot[bot] 7c771ce6f3
chore(deps): Bump serde_json from 1.0.99 to 1.0.100 (#8147)
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.99 to 1.0.100.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.99...v1.0.100)

---
updated-dependencies:
- dependency-name: serde_json
  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-07-05 09:12:11 +00:00