Commit Graph

9866 Commits (651b7a1ce64df19c730e1fd721a1dcf4ecf618cf)

Author SHA1 Message Date
Dom 59b3c793d3
Merge branch 'main' into dom/ingester-rpc-write 2022-11-18 16:21:07 +00:00
Dom Dwyer af78f0d5db
refactor: remove names from DML init
Fixes conflicts introduced by #6170.
2022-11-18 17:16:33 +01:00
Dom Dwyer 72939f8bf0
feat(router): handler for direct write to ingester
This commit adds the (unused) RpcWrite implementation of the DmlHandler
trait that implements pushing a write over gRPC to a single, arbitrary
ingester. Requests are round-robin'ed across all available ingesters.

This DmlHandler implementation can be swapped out with the
ShardedWriteBuffer to change how writes are propagated to the ingester.
2022-11-18 17:08:20 +01:00
Luke Bond 7c813c170a
feat: reintroduce compactor first file in partition exception (#6176)
* feat: compactor ignores max file count for first file

chore: typo in comment in compactor

* feat: restore special first file in partition compaction logic; add limit

* fix: calculation in compaction max file count

chore: clippy

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-11-18 15:58:59 +00:00
kodiakhq[bot] 1a68da02ef
Merge pull request #6170 from influxdata/cn/remove-table-name
fix: Remove table names from DmlWrite
2022-11-18 15:48:45 +00:00
Dom Dwyer 9351e01068
refactor: log dml apply errors
Ensures DML apply errors are recorded in the ingester logs.
2022-11-18 16:48:31 +01:00
Dom Dwyer 16eed699fd
refactor: avoid needless partition key clone
Moves the trace! invocation to before the DmlWrite init to avoid having
to clone the partition key.
2022-11-18 16:46:14 +01:00
Carol (Nichols || Goulding) 9751512d44
fix: Insert columns in schema in ingester tests where we have table names 2022-11-18 10:40:40 -05:00
Carol (Nichols || Goulding) f27c33d73e
fix: Simplify hashmap insert now that we have Copy keys 2022-11-18 10:40:40 -05:00
Carol (Nichols || Goulding) 02c3083192
fix: Remove table names from Dml operations 2022-11-18 10:40:38 -05:00
Carol (Nichols || Goulding) a225b81e59
docs: Clarify and make consistent schema validation type comments 2022-11-18 10:39:27 -05:00
Dom Dwyer 90dd9906f6
feat(ingester): rpc write endpoint
Adds a handler implementation of the gRPC WriteService to receive direct
RPC writes from a router.

This code is currently unused.
2022-11-18 16:36:19 +01:00
Dom Dwyer 229e2adbb1
refactor: split gRPC services into modules
Splits the everything-grpc-in-one-file into smaller, per-service
modules.
2022-11-18 15:51:54 +01:00
Nga Tran 49a9565240
feat: gRPC that creates namespace (#6103)
* feat: create namespace API call in router

Co-authored-by: Nga Tran <nga-tran@live.com>

* chore: treat retention as ns except in CLI

* fix: overflow in nanosecond calc

* fix: retention test after changing it from hours to ns

* chore: comment clarification in cli; better response type for error in ns API

* fix: correct some rebase mistakes

* chore: merge namespace create & create_with_retention; renamed ns create test helper fn & const

* fix: ns autocreation test was wrong after rebase

* fix: mem catalog has default 1hr retention, accidently removed in rebase

* chore: remove mem catalogs default 1hr retention; make it settable in sets & router

Co-authored-by: Luke Bond <luke.n.bond@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-11-18 13:02:12 +00:00
dependabot[bot] 84977f63ca
chore(deps): Bump indexmap from 1.9.1 to 1.9.2 (#6171)
Bumps [indexmap](https://github.com/bluss/indexmap) from 1.9.1 to 1.9.2.
- [Release notes](https://github.com/bluss/indexmap/releases)
- [Changelog](https://github.com/bluss/indexmap/blob/master/RELEASES.md)
- [Commits](https://github.com/bluss/indexmap/compare/1.9.1...1.9.2)

---
updated-dependencies:
- dependency-name: indexmap
  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-11-18 12:21:01 +00:00
Marco Neumann 71ffc92559
fix: only push safe select expression through de-dup (#6156)
* fix: only push safe select expression through de-dup

Fixes #6066.

* docs: improve

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

* fix: rebase

* test: ensure we do not split ORs

Co-authored-by: Andrew Lamb <alamb@influxdata.com>
2022-11-18 09:56:11 +00:00
Nga Tran 6f7b1e2e26
feat: reject writes that are outside the retention period (#6148)
* feat: reject writes that are outside the retention period

* feat: add retention validator into handler stack

* chore: Apply suggestions from code review

Co-authored-by: Dom <dom@itsallbroken.com>

* refactor: address review comments

* test: unit tests fot retention validation

* chore: address review comments

* test: more unit tests and integration tests

* refactor: make time inside retention period for emphemeral_mode test

* fix: 2 hours

Co-authored-by: Dom <dom@itsallbroken.com>
2022-11-17 20:55:58 +00:00
Christopher M. Wolff 6d3dfa781e
chore: marshal InfluxDbError into status details (#6161)
* chore: marshal InfluxDbError into status details

* chore: address feedback and CI issues

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-11-17 19:51:01 +00:00
kodiakhq[bot] 50b01a2b2b
Merge pull request #6165 from influxdata/cn/test-refactor
test: Refactor some ingester tests in preparation for removing table names
2022-11-17 14:07:53 +00:00
kodiakhq[bot] 1a49fa4864
Merge branch 'main' into cn/test-refactor 2022-11-17 14:01:36 +00:00
Andrew Lamb 15191d11a8
feat: improve error message on `storage` `--format` parse errors (#6155)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-11-17 14:01:26 +00:00
kodiakhq[bot] 9a8b8659e5
Merge pull request #6168 from influxdata/dom/remove-unused-errors
refactor: remove unused errors
2022-11-17 13:33:33 +00:00
Dom Dwyer 5afe58d4d2
refactor: remove unused errors
These error states are no longer possible after several refactors, but
do not cause a "not used" lint because of macro magic.
2022-11-17 13:53:54 +01:00
dependabot[bot] bea3b987aa
chore(deps): Bump digest from 0.10.5 to 0.10.6 (#6162)
Bumps [digest](https://github.com/RustCrypto/traits) from 0.10.5 to 0.10.6.
- [Release notes](https://github.com/RustCrypto/traits/releases)
- [Commits](https://github.com/RustCrypto/traits/compare/digest-v0.10.5...digest-v0.10.6)

---
updated-dependencies:
- dependency-name: digest
  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-11-17 10:45:03 +00:00
kodiakhq[bot] 02646e50b5
Merge pull request #6153 from influxdata/dom/round-robin
feat(sharder): round robin
2022-11-17 10:31:10 +00:00
kodiakhq[bot] d673418b6b
Merge branch 'main' into dom/round-robin 2022-11-17 10:24:50 +00:00
dependabot[bot] a6929011ea
chore(deps): Bump reqwest from 0.11.12 to 0.11.13 (#6163)
Bumps [reqwest](https://github.com/seanmonstar/reqwest) from 0.11.12 to 0.11.13.
- [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.12...v0.11.13)

---
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-11-17 10:24:38 +00:00
kodiakhq[bot] 3401c3ea69
Merge pull request #6152 from influxdata/dom/remove-unused-dep
build(arrow_util): datafusion is not a release dep
2022-11-17 09:56:37 +00:00
kodiakhq[bot] 12223c0dfb
Merge branch 'main' into dom/remove-unused-dep 2022-11-17 09:50:23 +00:00
Dom f8ede322f8
Merge pull request #6164 from influxdata/dependabot/cargo/clap-4.0.26
chore(deps): Bump clap from 4.0.25 to 4.0.26
2022-11-17 09:50:10 +00:00
kodiakhq[bot] 9e0c8bb448
Merge branch 'main' into dom/remove-unused-dep 2022-11-17 09:50:00 +00:00
Carol (Nichols || Goulding) d4715a9fde
fix: Simplify tests by using and creating more test helpers
The most important part of this is creating the DmlWrites in one spot.
2022-11-16 21:48:43 -05:00
Carol (Nichols || Goulding) 4e2b68a7c5
fix: Simplify test by not actually creating a catalog namespace
This isn't actually needed for what this test is testing.
2022-11-16 21:06:44 -05:00
Carol (Nichols || Goulding) b6286767b0
fix: Validating the schema in ingester tests isn't necessary
The router validates schemas; schema validation shouldn't be tested in
the ingester
2022-11-16 21:05:51 -05:00
Carol (Nichols || Goulding) c7b9866483
feat: Have make_write_op take the table name as an argument to be more flexible 2022-11-16 21:05:46 -05:00
Carol (Nichols || Goulding) d0218fb025
refactor: Simplify tests by using make_write_op helper function 2022-11-16 21:00:10 -05:00
Carol (Nichols || Goulding) cac241b7ad
refactor: Extract shared test setup for ingester data tests 2022-11-16 21:00:10 -05:00
Carol (Nichols || Goulding) 256ded7e00
fix: Move a NamespaceData test into its module 2022-11-16 21:00:10 -05:00
dependabot[bot] 1026bd84bc
chore(deps): Bump clap from 4.0.25 to 4.0.26
Bumps [clap](https://github.com/clap-rs/clap) from 4.0.25 to 4.0.26.
- [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.25...v4.0.26)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-17 01:12:21 +00:00
Andrew Lamb 67712b595c
Revert "chore: Update datafusion again (#6108)" (#6159)
This reverts commit fbe9f27f10.
2022-11-16 21:14:55 +00:00
Nga Tran 80e91a644b
chore: Revert "feat: compactor ignores max file count for first file (#6144)" (#6158)
This reverts commit bf1681f4fe.
2022-11-16 19:58:46 +00:00
Dom 1b900ba73d
Merge branch 'main' into dom/round-robin 2022-11-16 16:20:55 +00:00
Dom 7e1e4aa03c
Merge pull request #6154 from influxdata/dom/correct-comment
docs: remove redundant comment
2022-11-16 15:49:17 +00:00
Dom cd33f25d8a
Merge branch 'main' into dom/correct-comment 2022-11-16 15:42:47 +00:00
Luke Bond 9365d933f1
chore: router namespace api (#6151)
* chore: move ns api from querier to router

* chore: add explanatory comment in querier about moved namespace API

* fix: add namespace service to router

* fix: querier returns unimplemented error for ns retention, not panic

* chore: reuse namespace -> proto in router ns api

* chore: grpc namespace - consume ns to avoid clone

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-11-16 15:25:49 +00:00
Andrew Lamb fbe9f27f10
chore: Update datafusion again (#6108)
* chore: Update datafusion pin + api code

* chore: Run cargo hakari tasks

* refactor: combine_sort_key is more idomatic and add rationale comments

* refactor: satisfy borrow checker and updated comments

* fix: Add test case for combine_sort_key

* fix:  Apply suggestions from code review

Co-authored-by: Marco Neumann <marco@crepererum.net>

* fix: Add back test for deeply nested expression

* fix: Update output ordering

Co-authored-by: CircleCI[bot] <circleci@influxdata.com>
Co-authored-by: Marco Neumann <marco@crepererum.net>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-11-16 14:41:52 +00:00
Dom Dwyer 8c38911e8c
docs: remove redundant comment
This comment remains by mistake - table_ids is now used.
2022-11-16 14:40:53 +01:00
Dom Dwyer bc9cccaf76
test(sharder): multi-threaded sharding benchmarks
Adds a multithreaded scenario to the Sharder benchmarks.
2022-11-16 14:29:22 +01:00
Dom Dwyer a4e54f7a0c
feat(sharder): round-robin sharder
A "sharder" that simply round-robins requests over the set of T within
it.

This uses thread-local counters to eliminate write contention of the
"index" variable, so that throughput scales linearly with cores. (As
opposed to an atomic which would cause the variable to ping-pong between
core caches with a 6000% reduction in throughput, or slower yet, a
mutex-wrapped counter.)
2022-11-16 14:29:22 +01:00
Dom Dwyer 4435d72594
build(arrow_util): datafusion is not a release dep
Moves datafusion to dev-dependencies.
2022-11-16 13:58:17 +01:00