Commit Graph

10390 Commits (23280d0489112d50ab3c7952f4dfb68f8663c971)

Author SHA1 Message Date
Dom Dwyer 23280d0489
refactor: return persisted partition count
When calling persist_partitions(), return the number of partitions that
were persisted to the caller.
2023-01-11 16:31:40 +01:00
Dom Dwyer a80e66336b
refactor: avoid unnecessary PersistHandle clone
Avoid having to clone a persist handle in order to pass it into
persist_partitions().
2023-01-11 16:30:58 +01:00
Marko Mikulicic 5148e3343d
Merge pull request #6565 from influxdata/dom/fix-ci
ci: use rust 1.66.0 for CI
2023-01-11 15:10:21 +01:00
Dom Dwyer 5639db7c84
docs: ref-link lack of 1.66.1 issue
Link to the upstream issue.
2023-01-11 14:21:19 +01:00
Dom Dwyer 71f54528d0
ci: use rust 1.66.0 for CI
Temporary fix as there's no official 1.66.1 docker image (yet?), so use
1.66 for now.

I kept the toolchain version pinned and switched only the CI version so
that we are all using the fixed cargo. I will revert this commit when
there's a 1.66.1 image.
2023-01-11 14:05:17 +01:00
Marco Neumann a00aebfea2
chore: exclude arrow and datafusion from dependabot (#6564)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-01-11 11:18:34 +00:00
dependabot[bot] 93a16c78d7
chore(deps): Bump bzip2 from 0.4.3 to 0.4.4 (#6563)
Bumps [bzip2](https://github.com/alexcrichton/bzip2-rs) from 0.4.3 to 0.4.4.
- [Release notes](https://github.com/alexcrichton/bzip2-rs/releases)
- [Commits](https://github.com/alexcrichton/bzip2-rs/commits/0.4.4)

---
updated-dependencies:
- dependency-name: bzip2
  dependency-type: indirect
...

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-11 11:11:39 +00:00
kodiakhq[bot] f457f654e8
Merge pull request #6562 from influxdata/dom/rust-bump
chore: bump rust to 1.66.1
2023-01-11 11:04:14 +00:00
kodiakhq[bot] ac2ac1f25e
Merge branch 'main' into dom/rust-bump 2023-01-11 10:57:18 +00:00
dependabot[bot] e9f9948bea
chore(deps): Bump zstd-sys from 2.0.4+zstd.1.5.2 to 2.0.5+zstd.1.5.2 (#6557)
Bumps [zstd-sys](https://github.com/gyscos/zstd-rs) from 2.0.4+zstd.1.5.2 to 2.0.5+zstd.1.5.2.
- [Release notes](https://github.com/gyscos/zstd-rs/releases)
- [Commits](https://github.com/gyscos/zstd-rs/commits)

---
updated-dependencies:
- dependency-name: zstd-sys
  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-11 10:52:20 +00:00
Dom 59f1217b5b
Merge branch 'main' into dom/rust-bump 2023-01-11 10:44:25 +00:00
dependabot[bot] 5eeb93761c
chore(deps): Bump arrow-ord from 29.0.0 to 30.0.1 (#6561)
* chore(deps): Bump arrow-ord from 29.0.0 to 30.0.1

Bumps [arrow-ord](https://github.com/apache/arrow-rs) from 29.0.0 to 30.0.1.
- [Release notes](https://github.com/apache/arrow-rs/releases)
- [Changelog](https://github.com/apache/arrow-rs/blob/master/CHANGELOG-old.md)
- [Commits](https://github.com/apache/arrow-rs/compare/29.0.0...30.0.1)

---
updated-dependencies:
- dependency-name: arrow-ord
  dependency-type: direct:production
  update-type: version-update:semver-major
...

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>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-01-11 10:44:04 +00:00
Dom Dwyer e0dcfc8830
chore: bump rust to 1.66.1
Picks up a fix to SSH host authentication in cargo when pulling the
crates index:

    https://blog.rust-lang.org/2023/01/10/cve-2022-46176.html
2023-01-11 11:39:17 +01:00
Dom 0e2e305fc2
Merge pull request #6560 from influxdata/dependabot/cargo/prost-0.11.6
chore(deps): Bump prost from 0.11.5 to 0.11.6
2023-01-11 10:37:08 +00:00
dependabot[bot] 43a0280365
chore(deps): Bump prost from 0.11.5 to 0.11.6
Bumps [prost](https://github.com/tokio-rs/prost) from 0.11.5 to 0.11.6.
- [Release notes](https://github.com/tokio-rs/prost/releases)
- [Commits](https://github.com/tokio-rs/prost/compare/v0.11.5...v0.11.6)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-11 02:53:33 +00:00
Stuart Carnie 66047f4372
feat: InfluxQL learns how to plan some InfluxQL queries (#6520)
* feat: InfluxQL learns how to plan some queries

Also added a means to test the planner and execution

* chore: Update module docs

* chore: Document the planner functions

* chore: Update end_to_end_cases crate

* chore: Clarify why `SLIMIT` and `SOFFSET` return `NotImplemented`

* chore: Address lint issues

* chore: Fix rustdoc link issue

* chore: Remove InfluxQL tests from query_tests crate

Will follow conventions established by @carols10cents when
new query_tests crate is merged.

* chore: `now` field

`now` is a DataFusion built-in scalar function

* chore: remove unused code

* chore: Add additional arithmetic expression tests

* chore: Establish pattern for identifying and tracking InfluxQL issues

* chore: Add tests for case sensitivity issues

* chore: group tests into modules and functions

This avoids mass rewriting of insta snapshots as new
tests are added to each function. When tests are added in the middle,
existing snapshots are renamed (-N+1, -N+2, etc) resulting in
having to review numerous additional snapshots.
2023-01-11 02:50:49 +00:00
Nga Tran 2de0e45b0a
fix: using created_at to order chunks for deduplication (#6556)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-01-10 18:18:33 +00:00
Dom 4662a7ed9e
Merge pull request #6553 from influxdata/dom/ingest-state
refactor: replace PersistState with IngestState
2023-01-10 17:36:20 +00:00
Dom 05de231af7
Merge branch 'main' into dom/ingest-state 2023-01-10 17:18:27 +00:00
Marco Neumann 7d06a61b5f
fix: use `create_at` to order querier chunks under kafkaless (#6554)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-01-10 17:15:08 +00:00
Nga Tran fe85c66ec1
Merge pull request #6555 from influxdata/ntran/no-sequence-number
fix: use created_at to order L0 during compaction
2023-01-10 12:07:43 -05:00
NGA-TRAN 2ae018e2f9 chore: merge main to branch 2023-01-10 11:55:07 -05:00
NGA-TRAN 1a93f70a8b fix: use created_at to order L0 during comapction 2023-01-10 11:48:05 -05:00
Nga Tran 62c0f3dbdd
feat: have cold compaction work with Compactor2 (#6542)
* feat: cold

* chore: debug info

* feat: only compact qualified cold partition candidates

* fix: catalog test

* chore: cleanup

* chore: add new config flag for cold partition candidates

* chore: implement display for CompactionType and add tests for max num partitions

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-01-10 16:42:57 +00:00
Dom Dwyer 63b1e4a3a4
refactor: replace PersistState with IngestState
Prior to this commit, when initialising the persist system it would
return a PersistState instance, used to communicate the saturation
status of the persistence system. The RPC write path used this
information to accept or deny write requests accordingly.

This was unfortunate in that it tightly coupled the ingest handler to
the persist system - in order to initialise the RPC handler, you had to
provide a PersistState; this required us to initialise a persist system
when testing only the RPC handler (which had nothing to do with
persisting). This smells!

This commit inverts the dependency, and decouples the subsystems via a
shared type (IngestState). Instead of the persist system telling ingest
to stop, the ingest system provides a means to be told to stop - this
subtle difference decouples the ingest handler from all components that
need to block ingest. This allows a fast O(1) error state read for N
components and prevents us from having to start N components to test a
RPC handler.

Additionally this commit introduces an unused ingest error state
(GracefulStop) as part of figuring out the API (to be used shortly).
2023-01-10 16:30:10 +01:00
Marco Neumann 042b7c4521
refactor: invalidate querier cache if ingester is gone (#6550)
* refactor: invalidate querier cache if ingester is gone

For #6549 but I think even w/o the plan illustrated there, this is the
right thing to do.

Also changes the cache system to use flats sorted vectors instead of costly hash
maps.

* refactor: simplify code

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-01-10 13:46:18 +00:00
Dom f607c7f0bc
Merge pull request #6548 from influxdata/dom/reuse-partition-iter
refactor: reuse PartitionIter
2023-01-10 12:13:36 +00:00
Dom 9c0e1c9eb5
Merge branch 'main' into dom/reuse-partition-iter 2023-01-10 12:06:33 +00:00
Marco Neumann 2bb6db3f37
fix: ensure ingester state tracked in querier cache is always in-sync (#6512)
Fixes #6510.

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-01-10 12:00:05 +00:00
Dom 2ee307f8e0
Merge branch 'main' into dom/reuse-partition-iter 2023-01-10 11:55:29 +00:00
dependabot[bot] d0f52c89ae
chore(deps): Bump arrow-ord from 29.0.0 to 30.0.1 (#6543)
* chore(deps): Bump arrow-ord from 29.0.0 to 30.0.1

Bumps [arrow-ord](https://github.com/apache/arrow-rs) from 29.0.0 to 30.0.1.
- [Release notes](https://github.com/apache/arrow-rs/releases)
- [Changelog](https://github.com/apache/arrow-rs/blob/master/CHANGELOG-old.md)
- [Commits](https://github.com/apache/arrow-rs/compare/29.0.0...30.0.1)

---
updated-dependencies:
- dependency-name: arrow-ord
  dependency-type: direct:production
  update-type: version-update:semver-major
...

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: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-01-10 10:09:11 +00:00
dependabot[bot] 3d86834eec
chore(deps): Bump arrow-string from 29.0.0 to 30.0.1 (#6544)
* chore(deps): Bump arrow-string from 29.0.0 to 30.0.1

Bumps [arrow-string](https://github.com/apache/arrow-rs) from 29.0.0 to 30.0.1.
- [Release notes](https://github.com/apache/arrow-rs/releases)
- [Changelog](https://github.com/apache/arrow-rs/blob/master/CHANGELOG-old.md)
- [Commits](https://github.com/apache/arrow-rs/compare/29.0.0...30.0.1)

---
updated-dependencies:
- dependency-name: arrow-string
  dependency-type: direct:production
  update-type: version-update:semver-major
...

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: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-01-10 10:02:08 +00:00
dependabot[bot] c68049c37a
chore(deps): Bump regex from 1.7.0 to 1.7.1 (#6546)
Bumps [regex](https://github.com/rust-lang/regex) from 1.7.0 to 1.7.1.
- [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.7.0...1.7.1)

---
updated-dependencies:
- dependency-name: regex
  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-10 09:55:41 +00:00
Dom Dwyer 94c71dace7
refactor: reuse PartitionIter
Allows any code that interacts with a set of PartitionData to be
abstracted from the underlying data structure.
2023-01-10 10:52:12 +01:00
dependabot[bot] b49cc2e35e
chore(deps): Bump tokio from 1.24.0 to 1.24.1 (#6545)
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.24.0 to 1.24.1.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.24.0...tokio-1.24.1)

---
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>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-01-10 09:48:44 +00:00
Dom cb86e6d602
Merge pull request #6547 from influxdata/dependabot/cargo/assert_cmd-2.0.8
chore(deps): Bump assert_cmd from 2.0.7 to 2.0.8
2023-01-10 09:41:24 +00:00
dependabot[bot] 09746c3aea
chore(deps): Bump assert_cmd from 2.0.7 to 2.0.8
Bumps [assert_cmd](https://github.com/assert-rs/assert_cmd) from 2.0.7 to 2.0.8.
- [Release notes](https://github.com/assert-rs/assert_cmd/releases)
- [Changelog](https://github.com/assert-rs/assert_cmd/blob/master/CHANGELOG.md)
- [Commits](https://github.com/assert-rs/assert_cmd/compare/v2.0.7...v2.0.8)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-10 01:06:02 +00:00
Paul Dix 828992c9c5
feat: Ingest replica skeleton (#6529)
* feat: Update replication.proto

* Remove the PartitionId in the replicate request as a single replicate request can have the data for many partitions.
* Add namespace_id and table_id to persist complete request to make data easier to lookup in buffer.

* feat: Initial ingest_replica skeleton

A bunch of copy pasta here from ingester2, but this takes out a ton of stuff that isn't used in replicas.
Also lays the groundwork for the simpler buffer structure to keep the data and a basic cache for catalog information that will be required.

* feat: update replication.proto GetPartitionBufferResponse

* chore: PR cleanup

* chore: PR cleanup
2023-01-09 16:53:49 +00:00
Dom f63157c04c
Merge pull request #6539 from influxdata/dom/remove-atty
refactor: remove atty & bump tokio
2023-01-09 15:47:37 +00:00
Dom Dwyer 7f7f0ca170
chore: bump tokio 1.22 -> 1.24
Fixes a bug on windows:

https://github.com/tokio-rs/tokio/security/advisories/GHSA-7rrj-xr53-82p7
2023-01-09 16:25:35 +01:00
Dom Dwyer 6b090fae53
ci: whitelist RUSTSEC-2021-0145
atty is used by criterion and mockito, both dev-only dependencies.
2023-01-09 16:16:04 +01:00
Dom Dwyer fa6b07f3a0
refactor(trogging): remove atty dependency
Replace atty with IsTerminal due to:

    https://rustsec.org/advisories/RUSTSEC-2021-0145
2023-01-09 16:14:11 +01:00
Dom d1fb98fdd7
Merge pull request #6537 from influxdata/dom/track-seq-num
feat(ingester2): track buffered op sequence numbers
2023-01-09 14:52:17 +00:00
Dom d666bf6d22
Merge branch 'main' into dom/track-seq-num 2023-01-09 13:47:40 +00:00
Dom de511df63c
Merge pull request #6538 from influxdata/dom/remove-unused-queryrunner
refactor: remove unused QueryExec impl
2023-01-09 13:41:37 +00:00
Dom Dwyer aab4f6c651
refactor: remove unused QueryExec impl
This is completely unused and left over from the initial skeleton.
2023-01-09 14:28:16 +01:00
Dom Dwyer 1f509f47b1
refactor: log number of writes in persist batch
Include the number of DML operations applied to the persisted buffer
in the "persisted partition" message.

Partly because I'm intrigued / it's useful information, and partly to
ensure LLVM doesn't get snazzy and dead-code the sequence number
tracking because it was never read.
2023-01-09 13:31:42 +01:00
Dom Dwyer ca2b8afbb1
refactor(ingester2): track buffer sequence numbers
Changes the ingester2 buffer FSM to track the sequence numbers that have
been applied to it.

This is a pre-requisite for replication & correct WAL segment dropping.
2023-01-09 13:27:18 +01:00
Dom Dwyer 0916529cfb
docs: remove outdated monotonicity comment
Previously the ingester(1) required ordered writes to be applied, this
requirement has been relaxed, and the asserts (previously) removed in
ingester2.
2023-01-09 13:24:51 +01:00
Dom 13f2f36a9c
Merge pull request #6513 from influxdata/dom/seqnum-set
feat(data_types): SequenceNumberSet
2023-01-09 10:45:53 +00:00