Commit Graph

9521 Commits (6369d88633ca1a170925e2a0974b6679579109f8)

Author SHA1 Message Date
dependabot[bot] 76d9a88761
chore(deps): Bump md-5 from 0.10.4 to 0.10.5 (#5717)
Bumps [md-5](https://github.com/RustCrypto/hashes) from 0.10.4 to 0.10.5.
- [Release notes](https://github.com/RustCrypto/hashes/releases)
- [Commits](https://github.com/RustCrypto/hashes/compare/md-5-v0.10.4...md-5-v0.10.5)

---
updated-dependencies:
- dependency-name: md-5
  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>
2022-09-22 07:40:54 +00:00
Marco Neumann 365a246f8d
refactor: do not run de-dup in ingester for querier requests (#5626)
* refactor: do not run de-dup in ingester for querier requests

This removes the entire de-dup logic from the inegster for querier
requests. Furthermore, it even removes the entire datafusion execution
from the querier and just dumps the in-memory record batches as quickly
as possible. No filters are applied. Note that even prior to this PR,
we've never applied projections (tracked by #5624).

**Pros:**

- speed up query planning within the querier (since we need the ingester
  response for state reconciling)
- lowered ingester CPU load

**Cons:**

- more querier<>ingester network traffic

Closes #5602.

* test: extend query test case

* fix: ingester tests

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-09-22 07:33:54 +00:00
Marco Neumann fd45fbc9ab
refactor: use cheaper hash keys for projected schemas (#5713)
* refactor: arc the cached table

* refactor: use cheaper hash keys for projected schemas

Instead of using the column names to address projected schemas, let's
use the column IDs.

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-09-22 05:31:02 +00:00
kodiakhq[bot] 2f3b2ac6c5
Merge pull request #5677 from influxdata/cn/clarifiy-compactor
feat: Improve compactor code organization and test coverage
2022-09-21 16:05:21 +00:00
Carol (Nichols || Goulding) aa822a40cf
refactor: Move config in with the relevant assertions
Now that only one hot test is using a CompactorConfig, move it into that
test to avoid spooky action at a distance.
2022-09-21 11:57:57 -04:00
Carol (Nichols || Goulding) f0bf3bd21c
test: Clarify descriptions for the remaining assertion
The assertion remaining in this test is now important because of having
multiple shards and showing which partition per shard is chosen.
2022-09-21 11:57:57 -04:00
Carol (Nichols || Goulding) 7c7b058276
refactor: Extract unit test for case 5 2022-09-21 11:57:57 -04:00
Carol (Nichols || Goulding) f5bd81ff3c
refactor: Extract unit test for case 4 2022-09-21 11:57:57 -04:00
Carol (Nichols || Goulding) 765feaa4d8
refactor: Extract a unit test for case 3 2022-09-21 11:57:57 -04:00
Carol (Nichols || Goulding) a7a480c1ba
refactor: Extract a unit test for case 2 2022-09-21 11:57:56 -04:00
Carol (Nichols || Goulding) d95f252a8e
refactor: Extract a unit test for case 1
Also add coverage for when there are no *partitions* in addition to the
test for when there are no *parquet files*.
2022-09-21 11:57:56 -04:00
Carol (Nichols || Goulding) 9372290ec9
refactor: Use iox_test helpers to simplify test setup 2022-09-21 11:57:56 -04:00
Carol (Nichols || Goulding) f22627a97f
test: Move an integration test of hot compact_one_partition to lib 2022-09-21 11:57:56 -04:00
Carol (Nichols || Goulding) a7bb0398e6
test: Move an integration test of compact_candidates_with_memory_budget to the same file 2022-09-21 11:57:56 -04:00
Carol (Nichols || Goulding) 316ebfa8c1
test: Call the smaller inner hot_partitions_for_shard when only one shard is involved 2022-09-21 11:57:56 -04:00
Carol (Nichols || Goulding) fcf9a9d589
refactor: Move fetching of config from compactor inside hot_partitions_to_compact
But still pass them to hot_partitions_for_shard.

And make the order of the arguments the same as for
recent_highest_throughput_partitions because I've already messed the
order up. And make the names the same throughout.

This makes the closure passed to get_candidates_with_retry simpler.
2022-09-21 11:57:56 -04:00
Carol (Nichols || Goulding) 48b7876174
refactor: Extract a function for computing query nanoseconds ago 2022-09-21 11:57:56 -04:00
Carol (Nichols || Goulding) 7dcaf5bd3d
refactor: Extract a function for getting hot partitions for one shard 2022-09-21 11:57:56 -04:00
Carol (Nichols || Goulding) b557c30fd3
refactor: Move hot compaction candidates to the hot module 2022-09-21 11:57:55 -04:00
Carol (Nichols || Goulding) fa11031a36
refactor: Extract a shared function to retry fetching of compaction candidates 2022-09-21 11:57:55 -04:00
Marco Neumann 8e6d9f8af1
chore: upgrade sqlx to 0.6.2 (#5712) 2022-09-21 11:29:45 +00:00
dependabot[bot] 1e4f4135a3
chore(deps): Bump pbjson-build from 0.4.0 to 0.5.0 (#5706)
Bumps [pbjson-build](https://github.com/influxdata/pbjson) from 0.4.0 to 0.5.0.
- [Release notes](https://github.com/influxdata/pbjson/releases)
- [Commits](https://github.com/influxdata/pbjson/commits)

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

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>
2022-09-21 09:53:30 +00:00
dependabot[bot] 0cc29300ce
chore(deps): Bump pbjson-types from 0.4.0 to 0.5.0 (#5703)
Bumps [pbjson-types](https://github.com/influxdata/pbjson) from 0.4.0 to 0.5.0.
- [Release notes](https://github.com/influxdata/pbjson/releases)
- [Commits](https://github.com/influxdata/pbjson/commits)

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

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>
2022-09-21 09:44:26 +00:00
dependabot[bot] 09cb62b75b
chore(deps): Bump pbjson from 0.4.0 to 0.5.0 (#5702)
Bumps [pbjson](https://github.com/influxdata/pbjson) from 0.4.0 to 0.5.0.
- [Release notes](https://github.com/influxdata/pbjson/releases)
- [Commits](https://github.com/influxdata/pbjson/commits)

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

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>
2022-09-21 09:34:47 +00:00
Marco Neumann c66f16e4af
fix: ingester retries (#5708)
* fix: retry ingester requests faster

The retries introduced in #5695 are too slow and block the entire
querier for minutes (until the very long gRPC timeout kicks in).

* fix: add error details on why the query planning failed

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-09-21 09:27:47 +00:00
dependabot[bot] ea1e822e3b
chore(deps): Bump itertools from 0.10.4 to 0.10.5 (#5707)
Bumps [itertools](https://github.com/rust-itertools/itertools) from 0.10.4 to 0.10.5.
- [Release notes](https://github.com/rust-itertools/itertools/releases)
- [Changelog](https://github.com/rust-itertools/itertools/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-itertools/itertools/commits)

---
updated-dependencies:
- dependency-name: itertools
  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>
2022-09-21 08:15:59 +00:00
dependabot[bot] 78981a62a1
chore(deps): Bump reqwest from 0.11.11 to 0.11.12 (#5705)
Bumps [reqwest](https://github.com/seanmonstar/reqwest) from 0.11.11 to 0.11.12.
- [Release notes](https://github.com/seanmonstar/reqwest/releases)
- [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.11.11...v0.11.12)

---
updated-dependencies:
- dependency-name: reqwest
  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>
2022-09-21 05:39:10 +00:00
dependabot[bot] 8af14f6d36
chore(deps): Bump lock_api from 0.4.8 to 0.4.9 (#5704)
Bumps [lock_api](https://github.com/Amanieu/parking_lot) from 0.4.8 to 0.4.9.
- [Release notes](https://github.com/Amanieu/parking_lot/releases)
- [Changelog](https://github.com/Amanieu/parking_lot/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Amanieu/parking_lot/compare/lock_api-0.4.8...lock_api-0.4.9)

---
updated-dependencies:
- dependency-name: lock_api
  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>
2022-09-21 05:30:50 +00:00
dependabot[bot] 0d18943ad2
chore(deps): Bump once_cell from 1.14.0 to 1.15.0 (#5701)
Bumps [once_cell](https://github.com/matklad/once_cell) from 1.14.0 to 1.15.0.
- [Release notes](https://github.com/matklad/once_cell/releases)
- [Changelog](https://github.com/matklad/once_cell/blob/master/CHANGELOG.md)
- [Commits](https://github.com/matklad/once_cell/compare/v1.14.0...v1.15.0)

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

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>
2022-09-21 05:20:55 +00:00
Andrew Lamb ea51feadf4
chore: Improve debug logging when parquet files are created (#5699)
* chore: Improve debug logging when parquet files are created

* fix: add duration for encoding parqut

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-09-20 20:43:34 +00:00
Nga Tran 1d306061b9
chore: disable cold compaction again since its step 1 is the culprit (#5700) 2022-09-20 20:34:28 +00:00
Nga Tran 34bc02b59b
chore: turn cold comapction on but only compact L0s and thier overlapped L1s (#5698) 2022-09-20 18:44:36 +00:00
kodiakhq[bot] 4a78db4490
Merge pull request #5697 from influxdata/dom/fix-ingester-tests
test: refactor ingester query tests
2022-09-20 16:09:53 +00:00
kodiakhq[bot] 7e03f483c6
Merge branch 'main' into dom/fix-ingester-tests 2022-09-20 16:01:59 +00:00
Marco Neumann 5e7fd55a42
refactor: retry querier->ingester requests (#5695)
* refactor: retry querier->ingester requests

Esp. for InfluxRPC requests that scan multiple tables, it may be that
one ingester requests fails. We shall retry that request instead of
failing the entire query.

* refactor: improve docs

Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>

* fix: less foo

* docs: remove outdated TODO

* test: assert that panic happened

Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
2022-09-20 15:51:02 +00:00
Dom Dwyer c6fe0dab3e refactor(ingester): reduced internal visibility
Changes many pub fields / methods to be pub(super), or if necessary,
pub(crate).

This helps maintain an internal API boundary for code hygiene, and helps
identify functions that are unused / only used in tests (which I've
annotated with cfg(test) and intend to remove - we should be driving
code under test via the public API rather than using test-only state
mutation, otherwise we're just testing our tests!)
2022-09-20 16:24:27 +01:00
Dom Dwyer 6d00d6b683 test(ingester): refactor querier API tests
This commit changes the prepare_data_to_querier() tests to drive the
ingester state by applying DML ops, therefore driving the prod code
paths (and testing them!) rather than having the tests set up what the
tests believe is the correct internal ingester state, and then asserting
on that state.

This gives us much better coverage of prod code paths, decouples the
tests from the internal state/representation of ingesters (making the
tests less fragile), and removes a bunch of special-cased, test-only
functions that are functionally similar, but not the same as, the prod
functions.

Unblocks #5658, further clean-up to come.
2022-09-20 16:24:27 +01:00
Marco Neumann 8b9f4ac447
refactor: improve interaction of LRU and cache refreshs (#5676)
* test: improve test assertion

* refactor: LRU SETs should NOT be treated as "used"

Improves interaction of refresh and LRU.

* docs: improve

Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>

Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-09-20 14:26:30 +00:00
Nga Tran 578ce1854d
chore: temporarily turn off cold compaction to investigate an oom (#5696)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-09-20 14:17:22 +00:00
Marco Neumann fced536ebd
refactor: improve consistent access under "remove if" (#5693)
* refactor: improve consistent access under "remove if"

With all the concurrency introduced in #5668, we should be a bit more
careful with our "remove if" handling, esp. if a removal is triggered
while a load is running concurrently. This change introduces as
`remove_if_and_get` helper that ensures this and the querier over to use
it. The parquet file and tombstone caches required a bit of a larger
change because there the invalidation and the actual GET were kinda
separate. We had this separation for the other caches as well at some
point and decided that this easily leads to API misuse, so I took this
opportunity to "fix" the parquet file and tombstone cache as well.

* docs: improve
2022-09-20 14:03:11 +00:00
Marco Neumann e0ad5e4c20
refactor: improve "remove if" cache checks (#5673)
* refactor: use concrete backend type in `ChangeRequest`

* refactor: "remove if"-checks shall NOT count as "used"

* test: improve docs

Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>

Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
2022-09-20 11:26:07 +00:00
Marco Neumann 84e8a4ac41
fix: GC `parquet_file` table in batches (#5691)
* fix: GC `parquet_file` table in batches

Otherwise this transaction will never finish in prod.

* fix: GC shutdown

* refactor: use constant
2022-09-20 11:14:39 +00:00
Andrew Lamb 832f305b9c
chore: Do not use ANSI colorization if not connected to a tty (#5674)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-09-20 11:01:58 +00:00
Andrew Lamb 786711f244
chore: Update datafusion (#5672)
* chore: Update datafusion pin

* chore: Update expected results

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-09-20 10:19:43 +00:00
Marko Mikulicic 7fbd1a4d0c
chore: Expose all DSN flags in all-in-one (#5682)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-09-20 07:22:40 +00:00
dependabot[bot] b6fb481b0f
chore(deps): Bump dotenvy from 0.15.3 to 0.15.5 (#5689)
Bumps [dotenvy](https://github.com/allan2/dotenvy) from 0.15.3 to 0.15.5.
- [Release notes](https://github.com/allan2/dotenvy/releases)
- [Changelog](https://github.com/allan2/dotenvy/blob/master/CHANGELOG.md)
- [Commits](https://github.com/allan2/dotenvy/compare/v0.15.3...v0.15.5)

---
updated-dependencies:
- dependency-name: dotenvy
  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>
2022-09-20 05:28:47 +00:00
dependabot[bot] e0b747e24e
chore(deps): Bump ordered-float from 3.0.0 to 3.1.0 (#5688)
Bumps [ordered-float](https://github.com/reem/rust-ordered-float) from 3.0.0 to 3.1.0.
- [Release notes](https://github.com/reem/rust-ordered-float/releases)
- [Commits](https://github.com/reem/rust-ordered-float/compare/v3.0.0...v3.1.0)

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

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>
2022-09-20 05:20:08 +00:00
dependabot[bot] b992d8f4db
chore(deps): Bump libc from 0.2.132 to 0.2.133 (#5686)
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.132 to 0.2.133.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.132...0.2.133)

---
updated-dependencies:
- dependency-name: libc
  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>
2022-09-20 05:02:22 +00:00
Stuart Carnie 56df74802c
feat: Add `DELETE` and `DROP MEASUREMENT` statements (#5656)
* chore: Refactor `FROM` clause parser to be generic

This will allow us to use it for `DELETE` statements, which has
a more restrictive requirement, only allowing regular expressions
or single part identifiers.

* feat: Add `DELETE` series statement

* chore: Add test case for insignificant whitespace between operators

NOTE: Added a skipped test until #5663 is implemented

* feat: Add `DROP MEASUREMENT` statement

* chore: Add DropMeasurementStatement struct

* chore: `Statement` enum contains only `Box`ed types

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-09-20 00:51:30 +00:00
Marko Mikulicic 5090d66eaf
Merge pull request #5684 from influxdata/fix-connection-leak
fix: Close old connection pool after swap
2022-09-20 02:17:05 +02:00