Commit Graph

12755 Commits (178483c1a0de928b47653c091b71838e3f1c025d)

Author SHA1 Message Date
Marco Neumann 178483c1a0
feat: basic non-aggregates w/ InfluxQL selector functions (#8016)
* test: ensure that selectors check arg count

* feat: basic non-aggregates w/ InfluxQL selector functions

See #7533.

* refactor: clean up code

* feat: get more advanced cases to work

* docs: remove stale comments

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-06-23 08:05:50 +00:00
dependabot[bot] 6e7b838b52
chore(deps): Bump insta from 1.29.0 to 1.30.0 (#8059)
Bumps [insta](https://github.com/mitsuhiko/insta) from 1.29.0 to 1.30.0.
- [Changelog](https://github.com/mitsuhiko/insta/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mitsuhiko/insta/compare/1.29.0...1.30.0)

---
updated-dependencies:
- dependency-name: insta
  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-06-23 07:45:41 +00:00
Martin Hilton b57a53eff4
feat: wrap flight DoGet ticket in "Any" (#8053)
Use a protobuf "Any" to wrap the "ReadInfo" message in a DoGet
ticket. This will make it easier to extend in the future different
ticket types, as appropriate. It also makes the comment speak the
truth.

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-06-23 05:59:47 +00:00
wiedld 62251e2323
refactor(idpe-17789): delineate btwn partitions_source within the scheduler versus compactor (#8028)
This is purely a movement of code, and not any definition of the interface methods yet. At best, it further solidifying the boundary of what partitions_source implementations are within the scheduler -- versus within the compactor.
2023-06-22 11:48:08 -07:00
Marco Neumann 4cc79b8df6
fix: do not exclude cargo configs in docker build (#8054) 2023-06-22 14:31:02 +00:00
Marco Neumann 089f512e88
fix: do not use empty `RUSTFLAGS` for docker build (#8052)
Empty `RUSTFLAGS` overrides everything that we define in our cargo
config.
2023-06-22 14:03:11 +00:00
kodiakhq[bot] 11a35bd767
Merge pull request #7963 from influxdata/cn/partition-table-only
feat: Start generating PartitionHashIds
2023-06-22 13:08:27 +00:00
Carol (Nichols || Goulding) 1912840c25
docs: Update size calculations in the description of PartitionCache 2023-06-22 09:01:22 -04:00
Carol (Nichols || Goulding) 0d9f89ae48
test: Add verification of deterministic and collision-resistant properties of PartitionHashId 2023-06-22 09:01:22 -04:00
Carol (Nichols || Goulding) 5096164efb
docs: Explain importance of the fixture test and what a failure would mean
Co-authored-by: Dom <dom@itsallbroken.com>
2023-06-22 09:01:22 -04:00
Carol (Nichols || Goulding) 62ab8d21c2
fix: Eliminate need to have 2 separate insert statements depending on presence of hash ID
I figured out that the reason inserting `Option<PartitionHashId>` was
giving me a compiler error that `Encode` wasn't implemented was because
I only implemented `Encode` for `&PartitionHashId` and sqlx only
implements `Encode` for `Option<T: Encode>`, not `Option<T> where &T:
Encode`. Using `as_ref` makes this work and gets rid of the `match` that
created two different queries (one of which was wrong!)

Also add tests that we can insert Parquet file records for partitions
that don't have hash IDs to ensure we don't break ingest of new data for
old-style partitions.
2023-06-22 09:01:22 -04:00
Carol (Nichols || Goulding) bffb2f8f9f
fix: Specialize Partition constructors to clarify appropriate usage 2023-06-22 09:01:22 -04:00
Carol (Nichols || Goulding) 41420cb920
fix: Borrow transition partition ID when possible 2023-06-22 09:01:22 -04:00
Carol (Nichols || Goulding) d991e12fbb
feat: Send PartitionHashId from ingesters to queriers 2023-06-22 09:01:22 -04:00
Carol (Nichols || Goulding) 62ba18171a
feat: Add a new hash column on the partition and parquet file tables
This will hold the deterministic ID for partitions.

Until all existing partitions have this value, this is optional/nullable.

The row ID still exists and is used as the main foreign key in the
parquet_file and skipped_compaction tables.

The hash_id has a unique index so that we can look up records based on
it (if it's available).

If the parquet file record has a partition_hash_id value, use that to
generate the object storage path instead of the partition_id.
2023-06-22 09:01:22 -04:00
Carol (Nichols || Goulding) 5411d8b7c8
refactor: Move Partition type and friends to their own file 2023-06-22 08:59:10 -04:00
kodiakhq[bot] 8604a1a0cf
Merge pull request #8035 from influxdata/dom/compactor-query-rate-limit
feat(compactor): partition fetch query rate limit
2023-06-22 12:13:50 +00:00
Dom cb2968f0ef
Merge branch 'main' into dom/compactor-query-rate-limit 2023-06-22 13:08:24 +01:00
Dom Dwyer cb79429b5f
refactor: wait until next attempt deadline
Minor optimisation for cases where load exceeds the limit, but not by
much - sleep until the next query is allowed, rather than a full query
period.
2023-06-22 14:07:47 +02:00
Marco Neumann 0dde4f0703
fix: `tokio_unstable` for Linux x64 (#8048)
Apparently rustflag configs don't stack, so we need to re-specify the
whole list.

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-06-22 11:09:11 +00:00
Andrew Lamb fb0674fc01
Revert "chore: Update datafusion + arrow/arrow-flight/parquet to version `42.0.0` (#8036)" (#8049)
This reverts commit 70ffedadc7.

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-06-22 11:03:25 +00:00
kodiakhq[bot] 1ba978c623
Merge pull request #8031 from influxdata/savage/replace-dml-operation-for-ingester-rpc-write
feat(ingester): Replace `DmlOperation` with `IngestOp` in RPC write path
2023-06-22 10:56:43 +00:00
kodiakhq[bot] b226d4dd23
Merge branch 'main' into savage/replace-dml-operation-for-ingester-rpc-write 2023-06-22 10:51:18 +00:00
Marco Neumann 4d1c6f805c
refactor: clean up rustflags and build args (#8047)
- move `tokio_unstable` to cargo config, so all we can use it within
   our code (e.g. for #7982)
- disable incremental builds for prod docker builds. this was tried
  before but got lost at some point because build params weren't passed
  to docker correclty
- fix `CARGO_NET_GIT_FETCH_WITH_CLI` for docker builds (env wasn't
  passed through)
2023-06-22 09:58:46 +00:00
Fraser Savage 43d6cb6eb1
Merge branch 'main' into savage/replace-dml-operation-for-ingester-rpc-write 2023-06-22 10:14:38 +01:00
Fraser Savage fab088f680
refactor(ingester): Split up the `WriteOperation` sub-types into separate modules 2023-06-22 10:08:26 +01:00
Marco Neumann 4e18a5f9e8
refactor: remove querier state reconciler (#8046)
The reconciler is a leftover from the Kafka-based write path. It doesn't
do anything anymore.

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-06-22 09:03:46 +00:00
Marco Neumann e72566e0e5
refactor: clean up querier server interface (#8045)
Move all the gRPC assembly into one single place: `ioxd_querier`. This
way `querier` no longer depends on `service_*` (except for
`service_common` which doesn't really implement gRPC but only the
namespace/database entry point).
2023-06-22 08:57:24 +00:00
Marco Neumann c9349a685f
refactor: remove pointless handler abstraction (#8044)
If your abstraction has one implementation, it ain't an abstraction.
2023-06-22 08:30:42 +00:00
Marco Neumann 686aa51b43
refactor: remove dead querier code (#8034)
Mostly leftovers from previous designs / iterations.
2023-06-22 07:33:18 +00:00
kodiakhq[bot] 2c52bf6b3f
Merge pull request #8023 from influxdata/sgc/issue/7600_moving_average
feat: Support `moving_average`, `difference` and `non_negative_difference`
2023-06-22 04:32:25 +00:00
Stuart Carnie 17bbb47a78
Merge branch 'main' into sgc/issue/7600_moving_average 2023-06-22 14:05:30 +10:00
Stuart Carnie 195d5aa0be
chore: Update pest as 2.6.1 was yanked (#8043)
See: https://crates.io/crates/pest/2.6.1
2023-06-22 04:04:48 +00:00
Stuart Carnie 3f93d4c123
chore: Update comment to refer to issue 2023-06-22 13:05:40 +10:00
Stuart Carnie 7b4a1a0660
chore: PR feedback
Add tests for fewer rows than N for `moving_average`

See: https://github.com/influxdata/influxdb_iox/pull/8023#discussion_r1237298376
2023-06-22 12:15:47 +10:00
Stuart Carnie 631d430e2f
chore: Cleanup 🧹 2023-06-22 12:10:14 +10:00
Stuart Carnie c804065f9c
chore: PR feedback
Added docs as to why these functions are unimplemented

See: https://github.com/influxdata/influxdb_iox/pull/8023#discussion_r1237284428
2023-06-22 12:07:25 +10:00
Stuart Carnie 1aa751f687
chore: PR feedback
Refactored logic to be clearer

See: https://github.com/influxdata/influxdb_iox/pull/8023#discussion_r1237281212
2023-06-22 11:59:25 +10:00
Stuart Carnie d62549112c
chore: PR feedback
I've removed the check, as both the planner and rewriter guarantee
the invariant that the second argument is a numeric constant.

See: https://github.com/influxdata/influxdb_iox/pull/8023#discussion_r1237279802
2023-06-22 11:58:26 +10:00
Stuart Carnie 5934c7dd69
chore: use function name
Co-authored-by: Andrew Lamb <alamb@influxdata.com>
2023-06-22 10:35:10 +10:00
Stuart Carnie 13726c2a76
Merge branch 'main' into sgc/issue/7600_moving_average 2023-06-22 10:10:22 +10:00
Joe-Blount e0ccc2e345
Revert "fix: compactor stuck looping with unproductive compactions (needs vertical split) (#8039)" (#8041)
This reverts commit b219b4b003.
2023-06-21 23:14:35 +00:00
Joe-Blount b219b4b003
fix: compactor stuck looping with unproductive compactions (needs vertical split) (#8039)
* chore: adjust with_max_num_files_per_plan to more common setting

This significantly increases write amplification (see change in `written` at the conclusion of the cases)

* fix: compactor looping with unproductive compactions

* chore: formatting cleanup

* chore: fix typo in comment
2023-06-21 20:23:50 +00:00
wiedld f75736891a
refactor(idpe-17789): move mod id_only_partition_filter (#8027)
* chore: delineate scheduler logic boundary in code comments
* refactor: move id_only_partition_filter mod into local scheduler
* chore: add docs for each IdOnlyPartitionFilter implementation
2023-06-21 10:29:38 -07:00
Andrew Lamb 70ffedadc7
chore: Update datafusion + arrow/arrow-flight/parquet to version `42.0.0` (#8036)
* chore: Update datafusion + arrow/arrow-flight/parquet to version `42.0.0`

* chore: Update for new APIs

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-06-21 16:11:36 +00:00
Fraser Savage f6ad920f31
refactor(ingester): Remove `set_span_context()` from `IngestOp` 2023-06-21 15:58:16 +01:00
Dom Dwyer d1cbbd27b1
feat(compactor): config partition query rate limit
Allow the partition fetch queries to be (optionally) rate limited via
runtime config.
2023-06-21 15:50:12 +02:00
Dom Dwyer 48e73fdf63
feat(compactor): partition fetch rate limiter
Implements a (very) simple rate limiter that permits at most N requests
per second, smoothed over a full second.
2023-06-21 15:50:11 +02:00
Dom Dwyer d6c4b51ba8
refactor: introduce catalog query indirection
Add indirection between the CatalogPartitionFilesSource (within the
retry-loop) and the underlying catalog.
2023-06-21 15:48:58 +02:00
Andrew Lamb 52566fd064
docs: Update docs about the relationship between the IOx client protocol, FlightSQL and InfluxQL (#8032) 2023-06-21 13:19:07 +00:00