Commit Graph

2408 Commits (78ca31d6bbf6d1399d09771ec9658311df3955bc)

Author SHA1 Message Date
Carol (Nichols || Goulding) 78ca31d6bb fix: When installing bazel in Docker, don't use --user option
That only installs bazel for the `root` user, but we'd like bazel
installed for the `rust` user as well.

Also clean up the installer and run this all as one Docker RUN command.
2021-04-16 00:41:20 +00:00
Andrew Lamb 130e059b6b
fix: Flight API should be able to return zero RecordBatches (#1229) 2021-04-15 19:10:51 +00:00
Marko Mikulicic db2c2165bc fix: Crash early when writer id is passed on cmdline and cannot load db from objecstore
Closes #1206

__Rationale__

The IOx server can be started with an writer id flag/env variable, or the writer id
can be set with an RPC call from conductor.

If the writer ID is passed from a flag, it immediately loads the database configuration
at startup time.

If the pod networking system is not yet ready during early startup (e.g. when the main
container wins the race against the istio envoy sidecar), network requests to S3 (and to the
local cloud metadata server anycast address used to retrieve the IAM auth token) will fail.

In these cases, generally the simplest thing to do is to crash early; k8s will restart the
container and eventually envoy will be ready.

If the crash is caused by a config error, the crashlooping effect will effectively
inform the deployment controller that the rollout has failed and it will rollback to the previous version of the deployment (and things like argocd will rollback the whole rollout).

__Caveat__

This PR doesn't change nor address the scenario where the IOx server starts without writer ID
and conductor sets it later.
2021-04-15 13:16:56 +00:00
Andrew Lamb 5aeeccb97c
feat: Run query plans on the database wide executor as well (#1210)
* feat: route all query planning through executor

* fix: Rename JoinError -> TaskJoinError and make message clearer

* fix: remove dangling comment

* fix: remove confusing comments
2021-04-15 11:57:20 +00:00
Marko Mikulicic 878b1b318e feat: Initial scaffolding for routing layer
Part of #916

Adding first-class concept of ShardId in shard config, fixes #1156

NEXT:

- [ ] implement sharder
- [ ] implement `write_entry_downstream`
- [ ] add tests
2021-04-15 09:02:47 +00:00
kodiakhq[bot] 432de9ddc9
Merge pull request #1218 from influxdata/ntran/query_parquet_2
feat: implement a few more functions as part of supporting query from parquet file
2021-04-14 20:38:01 +00:00
kodiakhq[bot] 4001ec73c9
Merge branch 'main' into ntran/query_parquet_2 2021-04-14 20:33:03 +00:00
Nga Tran 231ebb54d4 chore: fix a format 2021-04-14 16:32:25 -04:00
Nga Tran 4e2d59d9a5 feat: saimplement a few more functions as part of supporting query dfrom parquet files 2021-04-14 16:06:47 -04:00
Edd Robinson 025f760479 refactor: change sync::RwLock to parking_lot 2021-04-14 19:18:03 +00:00
Edd Robinson a3fc5e2474 refactor: change sync::RwLock to parking_lot 2021-04-14 19:18:03 +00:00
kodiakhq[bot] 641ae52cff
Merge pull request #1070 from jeivardan/feature-label
feat: Add support for labels API to influxdb2_client
2021-04-14 18:00:41 +00:00
kodiakhq[bot] 7247467225
Merge branch 'main' into feature-label 2021-04-14 17:23:17 +00:00
Andrew Lamb 59ca090aef
feat: Use single db-wide executor for running queries (#1198)
* refactor: plumb executor into all Db instances

* refactor: Route all query executions through worker pool

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-04-14 16:46:02 +00:00
Edd Robinson 5bb34e9a97 refactor: use read_buffer column range for time range 2021-04-14 16:10:24 +00:00
Edd Robinson 04f594bf94 perf: use column_values in read buffer 2021-04-14 15:13:35 +00:00
Andrew Lamb 8f1bf8a960
fix: Remove mutex acquisition in impl `std::fmt::Debug` for DedicatedExecutor (#1205) 2021-04-14 12:09:40 +00:00
Andrew Lamb f5f768d750
feat: Add a dedicated threadpool for running queries (#1191)
* feat: use a dedicated tokio threadpool for running queries

* feat: plumb number of executor threads through to command line

thread through command line

* fix: Logical merge conflict

* fix: another logical conflict

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-04-14 10:48:09 +00:00
kodiakhq[bot] 64ec45a154
Merge pull request #1174 from influxdata/crepererum/issue1083
feat: RB -> OS lifecycle
2021-04-14 10:42:26 +00:00
Marco Neumann f430013141 refactor: rename `Db::load_chunk_to_object_store` to `Db::write_chunk_to_object_store
For #1083.
2021-04-14 12:37:43 +02:00
Marco Neumann 1c6690ae3b fix: fix constant use in `server::db::tests::read_from_read_buffer` 2021-04-14 12:37:43 +02:00
Marco Neumann 26ce520cf1 feat: hook RB->OS into lifecycle
Fixes #1083.
2021-04-14 12:37:43 +02:00
Marco Neumann 7b0b975433 feat: add Db::load_chunk_to_object_store_in_background
For #1083.
2021-04-14 12:37:43 +02:00
Marco Neumann e516f65cbe feat: add WriteChunk job
For #1083.
2021-04-14 12:37:43 +02:00
Marco Neumann 440cef59df docs: fix docs of `LifecycleRules::buffer_size_soft` 2021-04-14 12:37:43 +02:00
Marco Neumann 84b2ce4571 docs: extend docs of `Db::load_chunk_to_read_buffer_in_background` 2021-04-14 12:37:43 +02:00
Marco Neumann ef7de0aa05 feat: add persist flag to LifecycleRules
For #1083.
2021-04-14 12:37:43 +02:00
Edd Robinson 9834c845db test: add influxrpc tag_values benches
The initial benchmarks look like this on my i9 MBP:

```
Data in one open chunk and one closed chunk of mutable buffer/tag0/no_pred           1.00     91.0±2.55ms        ? ?/sec
Data in one open chunk and one closed chunk of mutable buffer/tag0/with_pred         1.00     11.5±0.72ms        ? ?/sec
Data in one open chunk and one closed chunk of mutable buffer/tag1/no_pred           1.00    120.3±5.10ms        ? ?/sec
Data in one open chunk and one closed chunk of mutable buffer/tag1/with_pred         1.00     11.2±0.22ms        ? ?/sec
Data in one open chunk and one closed chunk of mutable buffer/tag2/no_pred           1.00    203.2±8.45ms        ? ?/sec
Data in one open chunk and one closed chunk of mutable buffer/tag2/with_pred         1.00     11.2±0.21ms        ? ?/sec
Data in open chunk of mutable buffer, and one chunk of read buffer/tag0/no_pred      1.00    100.3±3.73ms        ? ?/sec
Data in open chunk of mutable buffer, and one chunk of read buffer/tag0/with_pred    1.00     31.2±1.80ms        ? ?/sec
Data in open chunk of mutable buffer, and one chunk of read buffer/tag1/no_pred      1.00    126.7±2.29ms        ? ?/sec
Data in open chunk of mutable buffer, and one chunk of read buffer/tag1/with_pred    1.00     33.0±1.70ms        ? ?/sec
Data in open chunk of mutable buffer, and one chunk of read buffer/tag2/no_pred      1.00    212.0±6.86ms        ? ?/sec
Data in open chunk of mutable buffer, and one chunk of read buffer/tag2/with_pred    1.00     18.1±0.99ms        ? ?/sec
Data in single open chunk of mutable buffer/tag0/no_pred                             1.00     98.7±6.08ms        ? ?/sec
Data in single open chunk of mutable buffer/tag0/with_pred                           1.00     11.2±0.37ms        ? ?/sec
Data in single open chunk of mutable buffer/tag1/no_pred                             1.00    118.9±3.97ms        ? ?/sec
Data in single open chunk of mutable buffer/tag1/with_pred                           1.00     11.7±0.64ms        ? ?/sec
Data in single open chunk of mutable buffer/tag2/no_pred                             1.00    202.1±8.49ms        ? ?/sec
Data in single open chunk of mutable buffer/tag2/with_pred                           1.00     11.1±0.27ms        ? ?/sec
Data in two read buffer chunks/tag0/no_pred                                          1.00    109.2±5.20ms        ? ?/sec
Data in two read buffer chunks/tag0/with_pred                                        1.00     44.2±1.83ms        ? ?/sec
Data in two read buffer chunks/tag1/no_pred                                          1.00    132.9±3.79ms        ? ?/sec
Data in two read buffer chunks/tag1/with_pred                                        1.00     41.7±2.43ms        ? ?/sec
Data in two read buffer chunks/tag2/no_pred                                          1.00    222.4±7.00ms        ? ?/sec
Data in two read buffer chunks/tag2/with_pred                                        1.00     27.9±0.92ms        ? ?/sec
```
2021-04-14 09:36:39 +00:00
Edd Robinson 4db3a4b3b5 test: enable writer to split large batches 2021-04-14 09:36:39 +00:00
Edd Robinson 3cfbfe8ebf refactor: expose query_tests to benches crate 2021-04-14 09:36:39 +00:00
kodiakhq[bot] 8f2cf61e0e
Merge pull request #1201 from influxdata/ntran/query_local_parquet
feat: Add 2 main functions table_schema and table_names for Parquet Chunk to pay a foundation for querying it
2021-04-13 22:42:50 +00:00
kodiakhq[bot] 8e0ee48018
Merge branch 'main' into ntran/query_local_parquet 2021-04-13 22:38:56 +00:00
Marko Mikulicic c9cbc74857 feat: Use a DID newtype instead of u32 for dictionary ids
Rationale
---------

We use `u32` throughout the codebase to reference for interned dictionary strings.
We also use `u32` for other reasons and it would be nice to get some help from the compiler
to avoid mixing them up
2021-04-13 22:38:41 +00:00
Nga Tran 05bf28ce85 feat: Add 2 main functions table_schema and table_names for Parquet Chunk ato pay a foundation for querying it 2021-04-13 18:23:55 -04:00
Andrew Lamb 150ed4e1d9
refactor: Remove async from `InfluxRPCPlanner` (#1200)
* refactor: Remove async from InfluxRPCPlanner

* fix: make it compile

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-04-13 22:17:19 +00:00
Andrew Lamb 6d0467277b
docs: update multi core design doc (#1197)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-04-13 21:56:36 +00:00
Marko Mikulicic 59c35e5a4f feat: Implement WriteBuffer gRPC 2021-04-13 21:43:54 +00:00
Raphael Taylor-Davies 7ef490694c
refactor: reduce module coupling in mutable buffer (#1199)
* refactor: reduce module coupling in mutable buffer

* refactor: tweak visibility

* chore: formatting
2021-04-13 20:59:41 +00:00
Raphael Taylor-Davies 61cd745ab6
refactor: remove mutable buffer predicate logic (#1186)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-04-13 19:09:36 +00:00
Andrew Lamb 518df742df
chore: update arrow deps (#1195) 2021-04-13 18:05:03 +00:00
Nga Tran c4e56493d8 chore: Merge branch 'ntran/query_local_parquet' of https://github.com/influxdata/influxdb_iox into ntran/query_local_parquet 2021-04-13 13:59:10 -04:00
Nga Tran 4a6d6bd7ad feat: initial work for querying data from parquet file in object store 2021-04-13 13:57:46 -04:00
Nga Tran a68137a661 feat: initial work for querying data from parquet file in object store 2021-04-13 13:47:10 -04:00
Raphael Taylor-Davies 55a77914b1
feat: basic snapshot caching (#1184) 2021-04-13 17:10:28 +00:00
Marko Mikulicic ee46764a2d fix: Use debug level to log requests
Part of #1188
2021-04-13 15:18:46 +00:00
Paul Dix 871de60bb7 chore: remove get_wal_meta test until it gets refactored 2021-04-13 12:52:14 +00:00
Paul Dix bd13c09bad refactor: make sharder optional when generating entry 2021-04-13 12:52:14 +00:00
Paul Dix 4d22982b5f fix: fix broken tests from column refactoring 2021-04-13 12:52:14 +00:00
Paul Dix 7e28f8ef66 feat: Implement Entry writing to Db
This removes the old ReplicatedWrite structure and implements the writing of an Entry to the Db. I also call out in `server/lib.rs` and in the `Db` where sharding and replication might happen.

I've also added helpers in various places to write line protocol to chunks, tables, and databases. That enabled removing a good amount of code from the test helpers crate.
2021-04-13 12:52:14 +00:00
Raphael Taylor-Davies 1997324344
feat: mutable buffer snapshotting (#1179)
* feat: mutable buffer snapshotting

* chore: review feedback
2021-04-13 12:14:54 +00:00