Commit Graph

10477 Commits (6a4fa11dba1c7c539c3202ca87208b31ba5f0ba9)

Author SHA1 Message Date
Andrew Lamb 6a4fa11dba
chore: Update to latest datafusion / arrow `31.0.0` (#6618)
* chore: Update datafusion and arrow/parquet/arrow-flight `31.0.0`

* chore: Update for new API

* chore: Run cargo hakari tasks

Co-authored-by: CircleCI[bot] <circleci@influxdata.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-01-18 20:21:10 +00:00
kodiakhq[bot] 9e530da897
Merge pull request #6497 from influxdata/cn/query-tests-grpc
feat: Reimagining query_tests sql cases
2023-01-18 19:10:26 +00:00
kodiakhq[bot] 33168b97f0
Merge branch 'main' into cn/query-tests-grpc 2023-01-18 19:03:51 +00:00
Marco Neumann 380a855aab
feat: basic compactor2 algo layout (#6616) 2023-01-18 18:51:59 +00:00
Carol (Nichols || Goulding) d68a35a853
docs: Explain why the tests set the number of query threads
Co-authored-by: Andrew Lamb <alamb@influxdata.com>
2023-01-18 13:31:52 -05:00
Christopher M. Wolff 413e4e4088
feat: create a logical plan node and rule for gap-filling (#6602)
* feat: create a GapFill logical plan node

* feat: create a GapFill optimizer rule

* chore: code review feedback

* chore: fix issue found after merging main

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-01-18 17:01:55 +00:00
Marco Neumann e72173d58d
feat: very basic compactor2 skeleton (#6614)
Sets up crate and wires up the main binary. No tests yet, no algorithm
framework, just the bare minimum.

Also I decided to not offer a gRPC server in `compactor2` at the moment
and hence did not implement any handle/delegate infrastructure. We add
this later if we need it. This also means compactor2 does NOT provide a
catalog service for now.

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-01-18 16:36:40 +00:00
Nga Tran 7a5fdd1d95
feat: function to read partition IDs of all partitions with new writes (#6613)
* feat: function to read partition IDs of all partitions with new writes

* chore: run fmt

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-01-18 16:30:15 +00:00
Andrew Lamb 3608d2881b
chore: Update dependencies (#6612)
* chore: Update dependencies

* chore: Run cargo hakari tasks

Co-authored-by: CircleCI[bot] <circleci@influxdata.com>
2023-01-18 16:19:50 +00:00
Andrew Lamb 8410998408
chore: Update datafusion to Jan 17, 2023 (2 / 2) and arrow/parquet `30.0.1` (#6604)
* chore: Update datafusion to Jan 9, 2023 (2 / 2) and arrow/parquet `30.0.1`

* chore: Update for changes in arrow ipc

* chore: Run cargo hakari tasks

Co-authored-by: CircleCI[bot] <circleci@influxdata.com>
2023-01-18 15:51:24 +00:00
Carol (Nichols || Goulding) 747bdb452b
fix: Add the standard lints to query_tests2 and fix the new warnings 2023-01-18 10:24:17 -05:00
Carol (Nichols || Goulding) f81debc0e4
refactor: Move the test framework code to a framework module 2023-01-18 10:24:17 -05:00
Carol (Nichols || Goulding) afee5c9a81
refactor: Split setups into their own module 2023-01-18 10:24:17 -05:00
Carol (Nichols || Goulding) 8a6c3d1bc3
refactor: Extract cases to eventually be autogenerated to a module 2023-01-18 10:24:17 -05:00
Carol (Nichols || Goulding) f3b5dcaab7
feat: Reimagining query_tests 2023-01-18 10:24:17 -05:00
Andrew Lamb 57f08dbccd
chore: Update datafusion to Jan 9, 2023 (1 / 2) (#6603)
* refactor: Update DataFusion pin to early Jan 2023

* fix: Update tests now that planning is async

* fix: Updates for API changes

* chore: Run cargo hakari tasks

* fix: Update comment

* refactor: nicer config setup

* fix: gapfill async

Co-authored-by: CircleCI[bot] <circleci@influxdata.com>
2023-01-18 12:19:32 +00:00
dependabot[bot] 4e0fd0645b
chore(deps): Bump nix from 0.26.1 to 0.26.2 (#6606)
Bumps [nix](https://github.com/nix-rust/nix) from 0.26.1 to 0.26.2.
- [Release notes](https://github.com/nix-rust/nix/releases)
- [Changelog](https://github.com/nix-rust/nix/blob/v0.26.2/CHANGELOG.md)
- [Commits](https://github.com/nix-rust/nix/compare/v0.26.1...v0.26.2)

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

Signed-off-by: dependabot[bot] <support@github.com>

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-01-18 10:12:54 +00:00
Dom 8c2aadc4d4
Merge pull request #6601 from influxdata/old/persist-completion-observer
refactor(persist): pluggable completion observer
2023-01-18 09:50:13 +00:00
Dom dbaa814a8f
Merge branch 'main' into old/persist-completion-observer 2023-01-18 09:33:55 +00:00
dependabot[bot] 4344c3df53
chore(deps): Bump tokio from 1.24.1 to 1.24.2 (#6605)
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.24.1 to 1.24.2.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/commits)

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

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-18 08:00:27 +00:00
Stuart Carnie 15a9b4f1e5
refactor: Drop Expr::UnaryOp to simplify tree traversal (#6600)
* refactor: Drop Expr::UnaryOp to simplify tree traversal

The UnaryOp doesn't provide and additional value and complicates
walking the AST, as literal values wrapped in a UnaryOp(Minus, ...)
require extra handling when reducing time range expressions, etc.

This change also is true to the InfluxQL Go implementation,
which represents whole number literals as signed integers unless
they exceed i64::MAX.

* chore: Refactor all usages of format!("{}", ?) to ?.to_string()

Per https://github.com/influxdata/influxdb_iox/pull/6600#discussion_r1072028895
2023-01-18 02:27:38 +00:00
Christopher M. Wolff afed16d1ac
feat: create (stubbed) DATE_BIN_GAPFILL UDF (#6595)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-01-17 23:21:52 +00:00
Marco Neumann 56c38ba8e1
feat: safely stream data from one tokio runtime to another (#6586)
* refactor: remove unused code

* refactor: make fn private

* feat: safely stream data from one tokio runtime to another

Closes #6577.

* refactor: review comments

Co-authored-by: Andrew Lamb <alamb@influxdata.com>

* docs: improve

* test: explain

* test: make tests more tricky

* refactor: improve error message

Co-authored-by: Andrew Lamb <alamb@influxdata.com>

Co-authored-by: Andrew Lamb <alamb@influxdata.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-01-17 10:32:46 +00:00
Dom Dwyer 4b3a5c0c2b
refactor(persist): pluggable completion observer
Changes the persist system to call into an abstract
PersistCompletionObserver after the persist task has completed, but
before releasing the job permit / notifying the enqueuer.

This call happens synchronously, driven by the persist worker to
completion. A sync construct can easily be made async (by enqueuing work
into a channel), but not the other way around, so this gives the best
flexibility.

This trait allows pluggable logic to be inserted into the persist
system, without tightly coupling it to the implementer's logic (for
example, replication). One or more observers may be chained together to
construct an arbitrary sequence of actors.

This commit uses a no-op observer, causing no functional change to the
system.
2023-01-17 11:28:32 +01:00
Dom c4bf4bad91
Merge pull request #6599 from influxdata/dom/persist-worker-context
refactor(persist): decouple persist job Context & logic
2023-01-17 09:43:22 +00:00
Dom Dwyer b4c1980e58
chore: remove old TODOs
These have been done!
2023-01-16 18:55:17 +01:00
Dom Dwyer fa62c00002
test: persist concurrent sort key catalog updates
Adds an integration test of the persist system, covering:

    * Node A starts a persist operation
    * Node B starts a persist operation for the same partition
    * Node A completes, setting the catalog sort key to a new value
    * Node B attempts to update the catalog, observing the new sort key
    * Node B re-compacts the data, re-uploads, and drives to completion

This scenario is/was tracked in:

    https://github.com/influxdata/influxdb_iox/issues/6439
2023-01-16 18:55:17 +01:00
Dom Dwyer 091b428d4f
refactor(persist): decouple Context & worker logic
The persist::Context struct carries the data to be persisted, a
reference to the partition from which it came, and various cached fields
to avoid re-acquiring the partition read lock all the time.

Prior to this commit, the Context also had the full persist logic as
methods, invoked by the persist worker. This tightly couples the data &
logic - it's fairly clear a worker should implement the work, and
operate on the data - not commingling the two. I even knew the mess I
was making when I wrote it, but effectively copy-pasted it from
ingester1 because deadlines.

This commit decouples the persist logic from the Context.
2023-01-16 18:36:17 +01:00
Dom Dwyer 1f5294c096
test: persistence system integration test
This test ensures the persistence system as a whole works in the happy
path.
2023-01-16 13:34:33 +01:00
Dom 5816216ba1
Merge pull request #6597 from influxdata/dependabot/cargo/rustyline-10.1.0
chore(deps): Bump rustyline from 10.0.0 to 10.1.0
2023-01-16 10:21:28 +00:00
Dom 586912ad73
Merge branch 'main' into dependabot/cargo/rustyline-10.1.0 2023-01-16 10:04:47 +00:00
Dom bb6b273a93
Merge pull request #6598 from influxdata/dependabot/cargo/clap-4.1.1
chore(deps): Bump clap from 4.0.32 to 4.1.1
2023-01-16 10:04:17 +00:00
dependabot[bot] f7797b0358
chore(deps): Bump clap from 4.0.32 to 4.1.1
Bumps [clap](https://github.com/clap-rs/clap) from 4.0.32 to 4.1.1.
- [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.0.32...v4.1.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-16 09:31:58 +00:00
dependabot[bot] 3b2c172dc1
chore(deps): Bump nom from 7.1.2 to 7.1.3 (#6596)
Bumps [nom](https://github.com/Geal/nom) from 7.1.2 to 7.1.3.
- [Release notes](https://github.com/Geal/nom/releases)
- [Changelog](https://github.com/rust-bakery/nom/blob/7.1.3/CHANGELOG.md)
- [Commits](https://github.com/Geal/nom/compare/7.1.2...7.1.3)

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

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-16 09:29:09 +00:00
CircleCI[bot] 1f18738203 chore: Run cargo hakari tasks 2023-01-16 02:07:11 +00:00
dependabot[bot] 0a70e9f43f
chore(deps): Bump rustyline from 10.0.0 to 10.1.0
Bumps [rustyline](https://github.com/kkawakam/rustyline) from 10.0.0 to 10.1.0.
- [Release notes](https://github.com/kkawakam/rustyline/releases)
- [Changelog](https://github.com/kkawakam/rustyline/blob/master/History.md)
- [Commits](https://github.com/kkawakam/rustyline/compare/v10.0.0...v10.1.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-16 02:06:24 +00:00
Stuart Carnie 3f6bb3e330
feat: Parse IANA timezones in an InfluxQL TZ clause (#6585)
* feat: Parse IANA timezone strings to chrono_tz::Tz

* feat: Visitors can customise the return error type

This avoids having to remap errors from `&'static str` to the caller's
error type, and will be used in a future PR for time range expressions.

* chore: Run cargo hakari tasks

Co-authored-by: CircleCI[bot] <circleci@influxdata.com>
2023-01-15 22:00:41 +00:00
Nga Tran e596f5f074
chore: metrics for compaction candidate counts (#6593)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-01-13 19:00:43 +00:00
kodiakhq[bot] 0edda47af2
Merge pull request #6591 from influxdata/dom/ingester-id
refactor: use system-wide ingester ID
2023-01-13 16:17:50 +00:00
Dom Dwyer 6413362c72
refactor: use system-wide ingester ID
The query API exposes a unique-per-instance UUID to allow callers to
detect a crash of the ingester process - this was initialised directly
in the query RPC handler.

This commit turns the bare UUID into a type, and initialises it in the
top-level initialisation of the ingester, plumbing it down into the
query RPC handler.

This allows the UUID to be reused by other components/handlers.
2023-01-13 16:46:38 +01:00
Nga Tran 550cea8bc5
perf: optimize not to update partitions with newly created level 2 files (#6590)
* perf: optimize not to update partitions with newly created level 2 files

* chore: cleanup

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-01-13 14:46:58 +00:00
Dom 677de283ea
Merge pull request #6589 from influxdata/dom/remove-partition-double-ref
perf: remove double-ref Partition map
2023-01-13 14:36:28 +00:00
Dom Dwyer 8dc18a9838
perf: remove double-ref Partition map
The ingester no longer needs to access a specific PartitionData by ID
(they are addressed either via an iterator over the BufferTree, or
shared by Arc reference).

This allows us to remove the extra map maintaining ID -> PartitionData
references, and the shared access lock protecting it.
2023-01-13 14:05:30 +01:00
Dom 81a4439cdf
Merge pull request #6583 from influxdata/cn/ingester-persist-tick
fix: Wait the interval and *then* persist
2023-01-13 12:39:38 +00:00
Dom f7ff877582
Merge branch 'main' into cn/ingester-persist-tick 2023-01-13 12:31:45 +00:00
dependabot[bot] 1c9fdd38d6
chore(deps): Bump io-lifetimes from 1.0.3 to 1.0.4 (#6584)
Bumps [io-lifetimes](https://github.com/sunfishcode/io-lifetimes) from 1.0.3 to 1.0.4.
- [Release notes](https://github.com/sunfishcode/io-lifetimes/releases)
- [Commits](https://github.com/sunfishcode/io-lifetimes/compare/v1.0.3...1.0.4)

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

Signed-off-by: dependabot[bot] <support@github.com>

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-01-13 09:21:06 +00:00
Marco Neumann bc030150f5
refactor: improve executor panic/error handling (#6582)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-01-13 07:10:53 +00:00
Stuart Carnie 81ffb3edb5
chore: move walk and the mutable variant to the parser crate (#6575)
It is generally a useful API to be core to the InfluxQL parser crate.
2023-01-12 21:06:06 +00:00
Carol (Nichols || Goulding) f56123bf30
test: Allow integration tests that should_panic to pass if TEST_INTEGRATION isn't set 2023-01-12 15:31:34 -05:00
Carol (Nichols || Goulding) 02c7ed58a2
fix: Use up the first interval tick so we wait first and then persist 2023-01-12 14:55:58 -05:00