Commit Graph

7389 Commits (3aa3ebe0e8369aa964b8151c3d2db1883c663859)

Author SHA1 Message Date
Carol (Nichols || Goulding) f3f792fd08
feat: Add namespace_id to the parquet_files table; object store paths need it 2022-03-29 08:15:26 -04:00
Carol (Nichols || Goulding) a373c90415
refactor: Extract the list_all function to object store
I'm about to use this in a third file, so time to extract this.

Make it clear that this is appropriate for tests only.
2022-03-29 08:15:24 -04:00
Carol (Nichols || Goulding) 39a1d1b26f
feat: Delete parquet files marked to be deleted before a specified time
Connects to #3954.
2022-03-29 08:13:06 -04:00
Marco Neumann decd018a6a
refactor: remove querier sync loop (#4146)
Namespaces are now created on demand and contain their full schema.
Tombstones/chunks are created on demand during the query.

Closes #4123.

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-03-29 11:47:23 +00:00
dependabot[bot] e154d77bf5
chore(deps): Bump getrandom from 0.2.5 to 0.2.6 (#4155)
Bumps [getrandom](https://github.com/rust-random/getrandom) from 0.2.5 to 0.2.6.
- [Release notes](https://github.com/rust-random/getrandom/releases)
- [Changelog](https://github.com/rust-random/getrandom/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-random/getrandom/compare/v0.2.5...v0.2.6)

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

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-29 08:53:34 +00:00
dependabot[bot] 17af5fcbd1
chore(deps): Bump tokio-util from 0.7.0 to 0.7.1 (#4154)
* chore(deps): Bump tokio-util from 0.7.0 to 0.7.1

Bumps [tokio-util](https://github.com/tokio-rs/tokio) from 0.7.0 to 0.7.1.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-util-0.7.0...tokio-util-0.7.1)

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

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

* chore: Run cargo hakari tasks

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>
2022-03-29 08:39:02 +00:00
dependabot[bot] a83ad1ce2b
chore(deps): Bump syn from 1.0.89 to 1.0.90 (#4150)
Bumps [syn](https://github.com/dtolnay/syn) from 1.0.89 to 1.0.90.
- [Release notes](https://github.com/dtolnay/syn/releases)
- [Commits](https://github.com/dtolnay/syn/compare/1.0.89...1.0.90)

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

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-03-29 08:28:30 +00:00
Marco Neumann ec88df6cb7
feat: cache namespace schemas (#4142)
* feat: `TestColumn` for IOx tests

* feat: cache namespace schemas

In preparation to remove the querier sync loop completely.

Ref #4123.
2022-03-29 08:19:21 +00:00
Nga Tran 80b7e9cce1
feat: delete fully processed tombstones & integration tests for find_and_compact (#4116)
* feat: remove fully processed tombstones

* test: first few tests

* fix: delete SQL

* fix: test how IN (...) works in PG

* fix: test how IN (?) works in PG

* fix: test how IN (?) works in PG

* fix: dynamically add  IN (?, ?, ...)

* fix: dynamically add  IN (?, ?, ...) & its dynamic values

* fix: add argument directly in the SQL

* test: more tests for catalog read and update functions

* chore: move a subfunction to make it easier to read)

* test: first test for find_can_compact but disabled due to bug

* test: integration tests and a bug fix for find_and_compact

* chore: cleanup

* refactor: address review comments

* fix: put 2 delete processed  tombstones and tombstones in a transaction
2022-03-28 18:35:54 +00:00
Marco Neumann fb186c6733
refactor: `QueryDatabaseProvider::db` should be async (#4143)
This is required to fetch querier namespaces on demand.

Ref #4123.
2022-03-28 11:18:20 +00:00
dependabot[bot] 4f9515ffba
chore(deps): Bump async-trait from 0.1.52 to 0.1.53 (#4141)
Bumps [async-trait](https://github.com/dtolnay/async-trait) from 0.1.52 to 0.1.53.
- [Release notes](https://github.com/dtolnay/async-trait/releases)
- [Commits](https://github.com/dtolnay/async-trait/compare/0.1.52...0.1.53)

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

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-28 08:55:24 +00:00
dependabot[bot] e5bbc74f7a
chore(deps): Bump paste from 1.0.6 to 1.0.7 (#4140)
Bumps [paste](https://github.com/dtolnay/paste) from 1.0.6 to 1.0.7.
- [Release notes](https://github.com/dtolnay/paste/releases)
- [Commits](https://github.com/dtolnay/paste/compare/1.0.6...1.0.7)

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

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-28 08:44:01 +00:00
Andrew Lamb cabaf7c0e2
refactor: move object store configuration to TestConfig (#4128)
* refactor: move object store configuration to TestConfig

* fix: clippy

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-03-25 18:19:44 +00:00
Andrew Lamb 196ad50f5a
test: add e2e test for schema CLI (#4132)
* test: add e2e test for schema CLI

* fix: logical confict
2022-03-25 18:11:03 +00:00
Andrew Lamb 58c630d709
chore: Update datafusion (#4133)
* chore: Update datafusion

* fix: typo

* fix: Update explain plan output

* fix: update Cargo.locl

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-03-25 15:08:39 +00:00
Marko Mikulicic 60983dda12
Merge pull request #4136 from influxdata/dom/service-limit-http-code
fix: service limit http code
2022-03-25 15:59:49 +01:00
kodiakhq[bot] ee8f436d45
Merge branch 'main' into dom/service-limit-http-code 2022-03-25 14:26:44 +00:00
kodiakhq[bot] 9e6b139fd5
Merge pull request #4135 from influxdata/crepererum/issue4123a
refactor: clean up querier public interface
2022-03-25 13:58:26 +00:00
kodiakhq[bot] a8def72f47
Merge branch 'main' into crepererum/issue4123a 2022-03-25 13:49:53 +00:00
Dom Dwyer 8e85846db6 refactor: lowercase error messages
Lowercases the error messages in the big iox_catalog Error enum for
better composition of messages (no random capitalisation in
glued-together strings, which is common with wrapped errors).
2022-03-25 11:33:27 +00:00
Dom Dwyer c6af2f5931 refactor: explicit schema validation errors
This commit adds new service limit & schema conflict error variants to
the SchemaError enum, allowing less error-prone matching higher up the
stack and more explicit log messages for both.

HTTP status codes are now correctly reported as 500 for internal catalog
errors during schema validation.
2022-03-25 11:33:27 +00:00
Dom Dwyer 1edc4ca567 refactor: emit HTTP 429 for service limits
When a user hits the service limit, emit a "HTTP 429 Too Many Requests"
error with no "Retry-After" header. Reference:

    https://docs.influxdata.com/influxdb/cloud/account-management/limits/#api-error-responses
2022-03-25 11:29:32 +00:00
Marco Neumann 9886ff42cc refactor: clean up querier public interface 2022-03-25 11:54:52 +01:00
kodiakhq[bot] 90dfca3c39
Merge pull request #4134 from influxdata/dom/file-write-buffer-loop
fix: maybe_auto_create_directories infinite loop
2022-03-25 10:42:44 +00:00
Dom Dwyer ce08292b89 fix: maybe_auto_create_directories infinite loop
Fixes symlinking in maybe_auto_create_directories() - previously it
would create a symlink specifying the target path relative to the
working dir, and not relative to the symlink.

If the working dir != the path in the WriteBufferCreationConfig,
subsequent calls would get stuck in an infinite loop attempting to
resolve the bad symlink.
2022-03-25 10:34:16 +00:00
Marco Neumann 942c3198f6 refactor: pass through backoff config to querier table 2022-03-25 11:18:45 +01:00
kodiakhq[bot] 3158aa1d53
Merge pull request #4130 from influxdata/dom/revert-revert-revert
fix: propagate shutdown requests & compactor join() fix
2022-03-24 18:44:49 +00:00
kodiakhq[bot] ec7226d855
Merge branch 'main' into dom/revert-revert-revert 2022-03-24 18:37:08 +00:00
Andrew Lamb e222acbb48
refactor: use typed `TestConfig` rather than environment variable names for NG end to end tests (#4126)
* refactor: move environment variable mapping in end to end tests into TestConfig

* fix: clippy

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-03-24 18:36:47 +00:00
kodiakhq[bot] 15a9108135
Merge branch 'main' into dom/revert-revert-revert 2022-03-24 16:38:06 +00:00
Andrew Lamb 39d9f30f12
refactor: Make `server` an implementation detail (#4122) 2022-03-24 15:58:04 +00:00
Dom Dwyer bf782de421 fix: compactor early shutdown
The compactor stub code would wait on nothing when the caller waited on
join()-ing the compactor handler, and this meant any caller who blocked
on join() would immediately return.
2022-03-24 15:58:02 +00:00
Andrew Lamb 5c69a3f43b
chore: Update deps: datafusion, arrow/arrow-flight/parquet to 11, zstd to 0.11 (#4119)
* chore: update datafusion

* chore(deps): Bump arrow from 10.0.0 to 11.0.0

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

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

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

* chore(deps): Bump arrow-flight from 10.0.0 to 11.0.0

Bumps [arrow-flight](https://github.com/apache/arrow-rs) from 10.0.0 to 11.0.0.
- [Release notes](https://github.com/apache/arrow-rs/releases)
- [Changelog](https://github.com/apache/arrow-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/apache/arrow-rs/compare/10.0.0...11.0.0)

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

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

* chore: update parquet to 11.0.0

* fix: error on create schema, test for same

* fix: upgrade zstd

* chore: Run cargo hakari tasks

* fix: fix logical merge conflict

* fix: hakari

* fix: hakari

* fix: update newly introduced dep

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>
2022-03-24 15:27:36 +00:00
Andrew Lamb 1ca9d28fee
fix: remove unecessary test setup (#4127)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-03-24 15:17:17 +00:00
Dom Dwyer a4aedcf2ae fix: propagate shutdown into CompactorHandler
Prior to this commit, calling shutdown() on the CompactorServerType (the
server layer run by the iox binary) would cancel it's own
CancellationToken, while the CompactorHandler (the actual compaction
workload entrypoint) would be watching it's own, different token.

This commit removes the redundant CancellationToken in the
CompactorServerType, instead using the inner CompactorHandler for
cancellation notification & completion.
2022-03-24 15:16:11 +00:00
Dom Dwyer 011d3fbf25 fix: propagate shutdown into QuerierHandlerImpl
Prior to this commit, calling shutdown() on the QuerierServer (the
server layer run by the iox binary) would cancel it's own
CancellationToken, while the QuerierHandlerImpl (the actual querier
workload entrypoint) would be watching it's own, different token.

This commit removes the redundant CancellationToken in the
QuerierServer, instead using the inner QueryHandlerImpl for cancellation
notification & completion.
2022-03-24 15:16:11 +00:00
Marco Neumann 8ca5c337b2
refactor: port more query tests to NG, some code clean up (#4125)
* refactor: inline function that is used once

* refactor: generalize multi-chunk creation for NG

* refactor: `TwoMeasurementsManyFieldsTwoChunks` is OG-specific

* refactor: generalize `OneMeasurementTwoChunksDifferentTagSet`

* refactor: port `OneMeasurementFourChunksWithDuplicates` to NG

* refactor: `TwoMeasurementsManyFieldsLifecycle` is OG-specific

* refactor: simplify NG chunk generation

* refactor: port `ThreeDeleteThreeChunks` to NG

Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-03-24 15:07:09 +00:00
Andrew Lamb fb75ef7b82
test: add end to end test for all in one mode, restructure fixture (#4114)
* test: add end to end test for all in one mode, restructure fixture

* docs: fix typos and clarify schema requrements
2022-03-24 12:53:25 +00:00
kodiakhq[bot] 70a9806c29
Merge pull request #4069 from influxdata/dom/test-distribution
test: assert uniform-ish sharder distribution
2022-03-24 11:55:09 +00:00
kodiakhq[bot] 2e40b1435d
Merge branch 'main' into dom/test-distribution 2022-03-24 11:45:58 +00:00
Dom Dwyer cc284fc5dc chore: expanded test comment 2022-03-24 11:42:58 +00:00
Marco Neumann cc7f744e8e
test: two-chunk scenarios for NG (#4113)
Add the generic components to create two-chunk scenarios. Includes small
scenario fixes for things like system tables that are not identical
between OG and NG (also see #4111.)

Ref #3934.
2022-03-24 09:50:57 +00:00
Marco Neumann 283d3dad5d
refactor: generalize query test scenarios a bit (#4103)
Some query test scenarios are duplicates and are very OG specific. Let's
use generic scenarios (i.e. the ones that contain all chunk stages
instead of a specific one) where applicable.

For #3934.

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-03-24 09:30:19 +00:00
Andrew Lamb 204dd7c8e9
refactor: Fix some random clippy lints from the future (#4118)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-03-24 09:21:29 +00:00
Andrew Lamb 29b89aaca7
refactor: extract influxrpc, flight and testing gRPC out of influxdb_ioxd (#4106)
* refactor: extract grpc service implementations out of influxdb_ioxd

* chore: Run cargo hakari tasks

* refactor: rename server_common to service_common

* refactor: rename server_grpc_influxrpc to service_grpc_influxrpc

* refactor: rename server_grpc_flight to service_grpc_flight

* refactor: rename server_grpc_testing to service_grpc_testing

* fix: Cargo.toml

Co-authored-by: CircleCI[bot] <circleci@influxdata.com>
2022-03-23 20:14:45 +00:00
kodiakhq[bot] 3f9a58362b
Merge pull request #4111 from influxdata/crepererum/issue3934h
refactor: make query tests less OG-specific
2022-03-23 19:18:08 +00:00
kodiakhq[bot] 93485a11ec
Merge branch 'main' into crepererum/issue3934h 2022-03-23 19:10:02 +00:00
Carol (Nichols || Goulding) 67e13a7c34
fix: Change to_delete column on parquet_files to be a time (#4117)
Set to_delete to the time the file was marked as deleted rather than
true.

Fixes #4059.

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-03-23 18:47:27 +00:00
Marco Neumann 51da6dd7fa
feat: store sort key in NG metadata (#4110)
The sort key is optional and currently only produced by `iox_tests`.
Writing it within the ingester/compactor is tracked by #3968. The sort
key is read by the querier (and this will be verified by the query tests
and is required to merge #4103).

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-03-23 18:24:46 +00:00
Andrew Lamb 7f2c2fde2c
fix: fix all in one mode argument handling so it can start (#4115)
* fix: fix all in one mode argument handling

* fix: clippy

* fix: fmt

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-03-23 18:16:22 +00:00