Commit Graph

13254 Commits (dac0db21960c871c298924269d198a8b01849724)

Author SHA1 Message Date
wiedld 8abce6b054 refactor(idpe-17789): rename partition_stream mod to compaction_job_stream mod 2023-07-24 18:40:15 -07:00
wiedld 74e48dccb8 refactor(idpe-17789): rename OncePartititionStream to OnceCompactionJobStream 2023-07-24 18:40:15 -07:00
wiedld 559f9a612d refactor(idpe-17789): rename EndlessPartititionStream to EndlessCompactionJobStream 2023-07-24 18:40:15 -07:00
wiedld 2f51333914 refactor(idpe-17789): rename PartitionStream to CompactionJobStream 2023-07-24 18:40:15 -07:00
wiedld 5afc6e6fce refactor(idpe-17789): in hardcoded components, change all references of partitions_source to compaction_jobs_source 2023-07-24 18:40:15 -07:00
wiedld 067b5038c8 refactor(idpe-17789): rename partitions_source mod to compaction_jobs_source mod 2023-07-24 18:40:15 -07:00
wiedld b53e435e0d refactor(idpe-17789): rename ScheduledPartitionsSource to ScheduledCompactionJobsSource 2023-07-24 18:40:15 -07:00
wiedld 0acf02e460 refactor(idpe-17789): rename RandomizeOrderPartitionsSourcesWrapper to RandomizeOrderCompactionJobsSourcesWrapper 2023-07-24 18:40:15 -07:00
wiedld 759a494724 refactor(idpe-17789): rename NotEmptyPartitionsSourceWrapper to NotEmptyCompactionJobsSourceWrapper 2023-07-24 18:40:15 -07:00
wiedld 0234b56533 refactor(idpe-17789): rename MockPartitionsSource to MockCompactionJobsSource 2023-07-24 18:40:15 -07:00
wiedld 4f2f4dec83 refactor(idpe-17789): rename MetricsPartitionsSourceWrapper to MetricsCompactionJobsSourceWrapper 2023-07-24 18:40:15 -07:00
wiedld 37313765ce refactor(idpe-17789): rename LoggingPartitionsSourceWrapper to LoggingCompactionJobsWrapper 2023-07-24 18:40:15 -07:00
wiedld 56f296e338 refactor(idpe-17789): rename PartitionsSource to CompactionJobsSource 2023-07-24 18:40:15 -07:00
wiedld bab6f239ea feat(idpe-17789): move Compactor abstractions PartitionsSource and PartitionStream to use CompactionJob 2023-07-24 18:40:04 -07:00
wiedld 817bd595ca chore(idpe-17789): make PartitionsSource be crate private for scheduler 2023-07-24 14:44:40 -07:00
wiedld 82d55fd6b6 refactor(idpe-17789): move PartitionsSource to be separate traits in scheduler vs compactor 2023-07-24 14:43:52 -07:00
wiedld 02088995b2
feat(idpe 17789): compactor to scheduler communication. `update_job_status()` and `end_job()` (#8216)
* 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.

* fix(idpe-17789): need to remove partition from uniqueness tracking, so it becomes available again

* refactor(idpe-17789): split up the single-use end_job() from the multi-use update_job_status()

* feat(idpe-17789): Commit is now a scheduler trait, only used externally in the compactor_test_utils

* feat(idpe-17789): Propagate errors pertaining to commit, in both the scheduler and the compactor.

* feat(idpe-17789): PartitionDoneSink should have different crate-private traits for scheduler versus comactor.

* feat(idpe-17789): PartitionDoneSink should propagate errors

* test(idpe-17789): integration tests suite

* test(idpe-17789): test documenting what skip request does (as outcome)

* refactor(idpe-17789): make the validate of the upgrade commit, versus replacement commit, more explicit.

* feat(idpe-17789): switch to using parking_lot Mutex within the scheduler
2023-07-24 12:01:28 -07:00
wiedld bf1e28ba96
refactor: implementations of PartitionsSource in compactor_scheduler should use the parking lot mutex (#8309) 2023-07-24 11:29:20 -07:00
NGA-TRAN ed4c77b822 chore: Merge branch 'main' into ntran/table_cli 2023-07-24 13:41:21 -04:00
Nga Tran 12e935af26
chore: Apply suggestions from code review
Co-authored-by: Carol (Nichols || Goulding) <193874+carols10cents@users.noreply.github.com>
2023-07-24 13:40:20 -04:00
Dom Dwyer 32414acb00
test(bench): ingester query partition pruning
Adds benchmarks that exercise partition pruning during query execution
within the ingester, for varying partition counts within a table, and
varying row counts within each partition.
2023-07-24 17:26:48 +02:00
Joe-Blount acf9da2336
fix: detect empty list in compactor before assert (#8323) 2023-07-24 15:02:47 +00:00
Joe-Blount 3985c28bdb
Merge pull request #8306 from influxdata/jrb_69_smooth_rate_limiter
chore: improve rate limiter accuracy
2023-07-24 09:04:47 -05:00
Joe-Blount 968a0fc574
Merge branch 'main' into jrb_69_smooth_rate_limiter 2023-07-24 08:52:55 -05:00
Marco Neumann e822374270
chore: build annotated OCI images (#8301)
* refactor: isolate docker build to script

* chore: add labels to docker image

* chore: export image as OCI

* chore: print image digest

* fix: convert to OCI BEFORE calculating digest

* fix: use digest of uploaded image, not of the local archive

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-07-24 13:28:04 +00:00
kodiakhq[bot] 6aaa7edcbe
Merge pull request #8321 from influxdata/savage/reject-time-as-tag-for-custom-partition-schemes
fix: Reject `time` as a tag value for custom partition templates
2023-07-24 12:18:57 +00:00
kodiakhq[bot] 234c72e4af
Merge branch 'main' into savage/reject-time-as-tag-for-custom-partition-schemes 2023-07-24 12:13:53 +00:00
Marco Neumann edf77c73d8
fix: avoid panic when clock goes backwards (#8322)
I've seen at least one case in prod where the UTC clock goes backwards.
The `TimeProvider` and `Time` interface even warns about that. However
there was a `Sub` impl that would panic if that happens and even though
this was documented, I think we can do better and just not offer a
panicky interface at all.

So this removes the `Sub` impl. and replaces all uses with
`checked_duration_since`.
2023-07-24 12:10:41 +00:00
Fraser Savage c834ec171f
test(router): Custom partition template API create using `time` tag value is rejected
This removes the double negative from the error message and adds
coverage at the router's gRPC API level for the rejection of the bad
TagValue value.
2023-07-24 13:07:04 +01:00
Fraser Savage aac4166bf0
fix: Reject `time` as a tag value for custom partition templates
Time has a special meaning and can be partitioned on by the strftime
formatter. It should not be used as a tag value part in a custom
partitioning template.
2023-07-24 12:49:13 +01:00
dependabot[bot] fca624a039
chore(deps): Bump sqlparser from 0.36.0 to 0.36.1 (#8312)
Bumps [sqlparser](https://github.com/sqlparser-rs/sqlparser-rs) from 0.36.0 to 0.36.1.
- [Changelog](https://github.com/sqlparser-rs/sqlparser-rs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sqlparser-rs/sqlparser-rs/compare/v0.36.0...v0.36.1)

---
updated-dependencies:
- dependency-name: sqlparser
  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-24 10:28:23 +00:00
dependabot[bot] b7ab20be0d
chore(deps): Bump either from 1.8.1 to 1.9.0 (#8314)
Bumps [either](https://github.com/bluss/either) from 1.8.1 to 1.9.0.
- [Commits](https://github.com/bluss/either/compare/1.8.1...1.9.0)

---
updated-dependencies:
- dependency-name: either
  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>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-07-24 10:23:38 +00:00
dependabot[bot] faa8d44492
chore(deps): Bump thiserror from 1.0.43 to 1.0.44 (#8315)
Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.43 to 1.0.44.
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.43...1.0.44)

---
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: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-07-24 10:18:44 +00:00
dependabot[bot] c6df58b30c
chore(deps): Bump nu-ansi-term from 0.48.0 to 0.49.0 (#8316)
Bumps [nu-ansi-term](https://github.com/nushell/nu-ansi-term) from 0.48.0 to 0.49.0.
- [Release notes](https://github.com/nushell/nu-ansi-term/releases)
- [Changelog](https://github.com/nushell/nu-ansi-term/blob/main/CHANGELOG.md)
- [Commits](https://github.com/nushell/nu-ansi-term/compare/v0.48.0...v0.49.0)

---
updated-dependencies:
- dependency-name: nu-ansi-term
  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>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-07-24 10:12:56 +00:00
dependabot[bot] cd31492e5b
chore(deps): Bump async-trait from 0.1.71 to 0.1.72 (#8317)
Bumps [async-trait](https://github.com/dtolnay/async-trait) from 0.1.71 to 0.1.72.
- [Release notes](https://github.com/dtolnay/async-trait/releases)
- [Commits](https://github.com/dtolnay/async-trait/compare/0.1.71...0.1.72)

---
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-24 10:07:18 +00:00
dependabot[bot] 1d1cc86912
chore(deps): Bump serde from 1.0.173 to 1.0.175 (#8318)
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.173 to 1.0.175.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.173...v1.0.175)

---
updated-dependencies:
- dependency-name: serde
  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-24 10:02:07 +00:00
kodiakhq[bot] 7b385600fd
Merge pull request #8305 from influxdata/savage/await-enqueue-rotation-returned-receiver-during-shutdown
fix(ingester): Graceful shutdown must wait for file rotation receiver
2023-07-24 09:22:52 +00:00
kodiakhq[bot] 0ed4e8509b
Merge branch 'main' into savage/await-enqueue-rotation-returned-receiver-during-shutdown 2023-07-24 09:17:55 +00:00
dependabot[bot] 79bb1347e6
chore(deps): Bump sysinfo from 0.29.5 to 0.29.6 (#8311)
Bumps [sysinfo](https://github.com/GuillaumeGomez/sysinfo) from 0.29.5 to 0.29.6.
- [Changelog](https://github.com/GuillaumeGomez/sysinfo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/GuillaumeGomez/sysinfo/commits)

---
updated-dependencies:
- dependency-name: sysinfo
  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-24 08:40:05 +00:00
Marco Neumann 748e66731c
feat: batch partition catalog requests in querier (take 2) (#8299)
* feat: batch partition catalog requests in querier

This is mostly wiring that builds on top of the other PRs linked to #8089.

I think we eventually could make the batching code nicer by adding
better wrappers / helpers, but lets do that if we have other batched
caches and this patterns proofs to be useful.

Closes #8089.

* test: extend `test_multi_get`

* test: regression test for #8286

* fix: prevent auto-flush CPU looping

* fix: panic when loading different tables at the same time

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-07-24 08:24:10 +00:00
dependabot[bot] b2179e2f8b
chore(deps): Bump clap from 4.3.17 to 4.3.19 (#8310)
Bumps [clap](https://github.com/clap-rs/clap) from 4.3.17 to 4.3.19.
- [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.17...v4.3.19)

---
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-24 08:11:17 +00:00
dependabot[bot] 30ac7d86eb
chore(deps): Bump tower-http from 0.4.2 to 0.4.3 (#8298)
Bumps [tower-http](https://github.com/tower-rs/tower-http) from 0.4.2 to 0.4.3.
- [Release notes](https://github.com/tower-rs/tower-http/releases)
- [Commits](https://github.com/tower-rs/tower-http/compare/tower-http-0.4.2...tower-http-0.4.3)

---
updated-dependencies:
- dependency-name: tower-http
  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-21 21:08:33 +00:00
Joe-Blount 58f79ddf47
Merge pull request #8308 from influxdata/jrb_70_stuck
fix: avoid compacting 1 L0 to 1 L0 file (stuck looping)
2023-07-21 14:41:56 -05:00
Joe-Blount 7622358518 fix: avoid compacting 1 L0 to 1 L0 file (stuck looping) 2023-07-21 13:55:04 -05:00
NGA-TRAN 144778430e Merge branch 'main' into ntran/table_cli 2023-07-21 14:49:02 -04:00
NGA-TRAN 2aff6a7495 chore: remove unused comments 2023-07-21 14:34:19 -04:00
NGA-TRAN a340fd5a6a feat: create table CLI 2023-07-21 14:17:42 -04:00
Martin Hilton b1c695d5a2
fix(influxql): fill count aggregates with 0 by default (#8284)
* chore: update expected output for `COUNT` aggregates with `FILL(null)`

See #8232

* fix(influxql): fill count aggregates with 0 by default

When gap-filling a COUNT aggregate any missing rows should be filled
with 0, unless otherwise directed by a FILL clause. To do this the
projection on the aggregate plan is modiefied to coalesce any COUNT
fields with 0 unless a FILL value has been specified in the query.

* chore: add more tests

* chore: add explanation of COUNT gap filling with multiple measurements

* fix: update test introduced with merge

---------

Co-authored-by: Stuart Carnie <stuart.carnie@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-07-21 16:31:10 +00:00
Joe-Blount 1a62d2e4e7 chore: improve rate limiter accuracy 2023-07-21 11:22:36 -05:00
Martin Hilton 5731e012bf
fix(influxql): advanced syntax window functions with selector aggregates (#8303)
Ensure that advanced syntax window functions that contain a selector,
rather than an aggregate, function are considered valid and generate
a correct plan.

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-07-21 14:48:15 +00:00