Commit Graph

10610 Commits (4391e30d2d0c0ff2a1e409e8e600448823d013a4)

Author SHA1 Message Date
Dom 1e5b594863
Merge branch 'main' into dom/shutdown-persist 2023-01-12 10:15:34 +00:00
dependabot[bot] 8565ca5137
chore(deps): Bump zstd from 0.12.1+zstd.1.5.2 to 0.12.2+zstd.1.5.2 (#6573)
Bumps [zstd](https://github.com/gyscos/zstd-rs) from 0.12.1+zstd.1.5.2 to 0.12.2+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
  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>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-01-12 09:54:28 +00:00
dependabot[bot] cc6d8709c9
chore(deps): Bump hashbrown from 0.13.1 to 0.13.2 (#6574)
Bumps [hashbrown](https://github.com/rust-lang/hashbrown) from 0.13.1 to 0.13.2.
- [Release notes](https://github.com/rust-lang/hashbrown/releases)
- [Changelog](https://github.com/rust-lang/hashbrown/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/hashbrown/compare/v0.13.1...v0.13.2)

---
updated-dependencies:
- dependency-name: hashbrown
  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-12 09:47:15 +00:00
Dom Dwyer 38eeffac0d
revert: "ci: use rust 1.66.0 for CI"
This reverts commit 71f54528d0.
2023-01-12 10:36:26 +01:00
Nga Tran fa0893819c
fix: have warm compaction work with compactor2 (#6571)
* refactor: same function to select partition candidates

* fix: have warm compaction work with compactor2

* fix: format

* chore: cleanup
2023-01-12 02:32:39 +00:00
Nga Tran 1f508b76fc
refactor: same function to select partition candidates (#6569)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-01-12 01:14:49 +00:00
Nga Tran d3b2203560
fix: bug in count processed partittions (#6572) 2023-01-11 22:53:52 +00:00
kodiakhq[bot] e4249f6a19
Merge pull request #6541 from influxdata/cn/flaky-test
test: Record number of Parquet files before a write
2023-01-11 17:52:01 +00:00
Carol (Nichols || Goulding) be7c312033
fix: Wait for a particular number of Parquet files, not just any change 2023-01-11 12:11:56 -05:00
Carol (Nichols || Goulding) 7e921e6a23
fix: Make recording num parquet files an explicit test step
To support a case where someone calls WriteLineProtocol twice in
a row to simulate two write requests. The test should be able to
record this state before the two write requests and not twice.
2023-01-11 11:51:56 -05:00
Carol (Nichols || Goulding) 6677ae5c61
test: Record number of Parquet files before a write
Fixes #6506.

Also has the pleasant side effect of making this code simpler and less
hacky-- it now checks the number of Parquet files for the whole
namespace, which is useful in cases where the line protocol writes to
several tables.
2023-01-11 11:51:55 -05:00
Carol (Nichols || Goulding) adc5c2bf06
feat: Add a gRPC API to the catalog service to get Parquet files by namespace
Tests that write line protocol (that may contain writes to multiple
tables) need to be able to see when new Parquet files are saved.
2023-01-11 11:41:09 -05:00
Dom 0dd4afba74
Merge branch 'main' into dom/shutdown-persist 2023-01-11 16:16:30 +00:00
dependabot[bot] be278dc689
chore(deps): Bump prost-types from 0.11.5 to 0.11.6 (#6559)
Bumps [prost-types](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-types
  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 16:16:04 +00:00
Dom Dwyer 303c9e4398
test: fix e2e test
This test was relying on a graceful shutdown of the ingester to drive a
WAL replay, restoring the buffered state at startup.

Now the shutdown causes the data to be persisted and not replayed, this
didn't work.
2023-01-11 17:15:04 +01:00
Dom 2aabd5b587
Merge pull request #6567 from influxdata/dom/fix-node-discovery-shutdown
fix: node discovery shutdown panic
2023-01-11 16:06:40 +00:00
Dom Dwyer c01d5566b9
docs: reference WAL segement ref-counting ticket
Reference the WAL ref-counting ticket in the WAL rotation task.
2023-01-11 16:50:24 +01:00
Dom Dwyer bbd41228bc
feat(ingester2): persist on shutdown
Persist all buffered data when gracefully stopping an ingester2
instance.

This implementation accounts for both late-arriving writes, and
concurrent persist tasks - it's carefully constructed in a way that it
can discover the presence of, and wait for, outstanding persist tasks
started by other code without having to know about all the possible
places a persist task can be started (currently WAL rotation & hot
partition persistence, but later also a RPC endpoint).

There exists a small race that seems to be so incredibly unlikely to
occur, I didn't cover off (it would have a RPC write cost for little
gain). This is documented in the code comments.
2023-01-11 16:50:23 +01:00
Dom Dwyer 2fa12622c8
refactor: drop PersistState visibility
This is now an implementation detail internal to the persist subsystem.
2023-01-11 16:42:50 +01:00
Dom Dwyer 6ef68513d9
fix: gRPC balancer shutdown panic
The gRPC node discovery hack spawns a task that outlives the gRPC
balancer - once the balancer stops, the task should stop too (and not
panic sending on the closed channel).
2023-01-11 16:42:39 +01:00
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