Commit Graph

1541 Commits (c6ff633afde72c8ebc4036e090dc8ceb87dc7633)

Author SHA1 Message Date
Edd Robinson c6ff633afd test: expose internals for benchmarking
This commit is a bit of a hack. The first thing I could think of. The
problem is that I want to be able to benchmark various modules in the
read buffer but I don't want to expose those internals via the external
API.

Becuase criterion only lets you exercise the exported API I needed to
expose some internals. I did this by creating a documented module
`benchmarks` in the `read_buffer` crate, which re-exports identifiers
that can be used by a criterion crate.

The idea is that it will be clear that this module is not part of the
public API.
2021-01-14 22:46:27 +00:00
Edd Robinson d55bc4835a refactor: rename method 2021-01-14 21:45:54 +00:00
Edd Robinson d82293ba23 refactor: add API method 2021-01-14 21:26:50 +00:00
Edd Robinson 1d5bc6f345 refactor: expose column_names for getting tag keys 2021-01-14 21:26:50 +00:00
Edd Robinson 676b58dc2c fix: ensure correct chunks used 2021-01-14 21:26:50 +00:00
Edd Robinson 4c4d2e8e67 refactor: add API method for read_aggregate_window 2021-01-14 21:26:50 +00:00
Edd Robinson 3026668878 refactor: add API method for read_aggregate 2021-01-14 21:26:50 +00:00
Edd Robinson bdb8a78569 refactor: reduce expose API 2021-01-14 21:26:50 +00:00
Andrew Lamb 8bc561bb7a
refactor: Remove last overloading of 'server' module name (#653)
* refactor: Remove last duplicate 'server'

* refactor: move names to the data_types crate
2021-01-14 13:52:00 -05:00
Dom 676ad1d348
build: add jq to the actual build image (#661)
Try #659 again - I accidentally put jq in the wrong build container...
2021-01-14 13:24:00 -05:00
Hu Ming 99605b27d7
chore: rename (#660) 2021-01-14 12:49:03 -05:00
Dom d4ac68d9f5
Merge pull request #659 from influxdata/dom/jq-ci-image
build: include jq in CI image
2021-01-14 17:37:08 +00:00
Dom 30d9162138 build: include jq in CI image
Adds jq to the builder image used for CI runs.

This lets us use some existing scripts provided by the deployments team for
consistency.
2021-01-14 17:01:36 +00:00
Dom 8f10900f60
Merge pull request #650 from influxdata/dom/iox-api-client
feat: IOx API client
2021-01-14 15:50:16 +00:00
Dom a2c0434554
Merge branch 'main' into dom/iox-api-client 2021-01-14 14:35:17 +00:00
Edd Robinson 00bd45f59c
Merge pull request #658 from influxdata/er/feat/server/predicate_read_buffer
feat: add helper for converting query engine predicate to read buffer format
2021-01-14 14:23:13 +00:00
Edd Robinson d536f82879 fix: get benchmarks compiling 2021-01-14 14:06:17 +00:00
Edd Robinson 6c5fdc0fae refactor: clean up comment 2021-01-14 13:46:20 +00:00
Edd Robinson 2ba438cf4f refactor: update read_buffer/src/row_group.rs
Co-authored-by: Andrew Lamb <alamb@influxdata.com>
2021-01-14 13:46:20 +00:00
Edd Robinson d7073efa72 feat: add support for query pred -> read buffer pred 2021-01-14 13:46:17 +00:00
Edd Robinson 05e083d0e2 feat: support converting from DF types 2021-01-14 13:14:08 +00:00
Edd Robinson 728d556b7d refactor: encapsulate read buffer predicats in type 2021-01-14 13:14:08 +00:00
Paul Dix 9a80e7ffae
Merge pull request #642 from influxdata/pd-persist-wal
feat: add wal segment persistence to object store
2021-01-13 18:39:21 -05:00
Paul Dix e53a65b49a chore: fix failing tests after rebase 2021-01-13 18:15:35 -05:00
Paul Dix 9377dc1943 chore: address pr feedback 2021-01-13 18:15:35 -05:00
Paul Dix 39cc833ec7 chore: change wal buffer to use sync mutex instead of tokio 2021-01-13 18:15:35 -05:00
Paul Dix 26c4003e43 feat: add wal segment persistence to object store
This hooks the wal buffer up to the server. When segments go over their max size, they will be persisted if that configuration was set. A follow on commit will add persistence based on time (how long the segment has been open).
2021-01-13 18:15:35 -05:00
Paul Dix 3b1f045f44 feat: add serialization to wal buffer segments
Adds serialization with compression and checksum for WAL buffer segments.

This required a weird structure where the flatbuffer bytes of ReplicatedWrite were kept as a raw payload. I did this because otherwise each of the replicated writes would have been rebuilt in the segment.

The other thing that isn't ideal is that deserializing a segment actually marshals it into a Rust struct as opposed to keeping the entire thing as raw flatbuffers. We could update this later to have a concept of an open segment (regular rust stuct) and closed segments that are just the flatbuffers.
2021-01-13 18:15:34 -05:00
Paul Dix 29444ad06b feat: add function to get segment object store location 2021-01-13 18:15:34 -05:00
Andrew Lamb 192b48a134
fix: (re)Implement logging configuration from the command line (#652)
* fix: fix command line logging configuration

* fix: Remove println from src/commands/logging.rs

* fix: do not print to stdout

* refactor: cast enum to u64 instead of implementing into u64

* fix: strip command line args prior to first server instance, with tests

* fix: Update doc comments on src/commands/influxdb_ioxd.rs

Co-authored-by: Carol (Nichols || Goulding) <193874+carols10cents@users.noreply.github.com>

Co-authored-by: Carol (Nichols || Goulding) <193874+carols10cents@users.noreply.github.com>
2021-01-13 18:14:10 -05:00
Carol (Nichols || Goulding) 0c0fa42050
Merge pull request #629 from influxdata/cn/better-osp-api 2021-01-13 15:16:11 -05:00
Carol (Nichols || Goulding) 6b67498533
Merge branch 'main' into cn/better-osp-api 2021-01-13 15:05:08 -05:00
Dom 30d5857fd4 chore: fix lints 2021-01-13 18:07:19 +00:00
Dom 81802abb8e
chore: fix typo in test output
Co-authored-by: Andrew Lamb <alamb@influxdata.com>
2021-01-13 17:55:02 +00:00
Dom 5647bfeb6f refactor: error handling & typed errors
Refactors the API method errors.

The user of the API client needs to be able to distinguish between various error
states when an API request fails. The most ergonomic way of exposing this
information is by returning an error enum that is specific to each API method
(or at least the important ones with well defined failure modes) - currently
only the `create_database()` method has significant error states, so this is
the only one with a specific error type in this impl.

This change defines a bunch of API error codes in the API client, adds them to
the IOx API error response body, and maps them in the API client. Due to error
wrapping the error code mapping in the IOx server is less exhaustive than I had
hoped however.
2021-01-13 17:32:12 +00:00
Dom f5586a9708 build: remove duplicate items from cargo workspace 2021-01-13 17:32:07 +00:00
Carol (Nichols || Goulding) 4acf0f6ea9 fix: Take prefix's file name into account in
This makes the in memory object store behave consistently with the cloud
object stores.
2021-01-13 09:57:13 -05:00
Carol (Nichols || Goulding) ea719724e9 test: Add another filename to clarify behavior in this test 2021-01-13 09:56:26 -05:00
Andrew Lamb 8c0ce0b2ce
docs: Add query README file and explain some rationale (#648)
* docs: Add query README file

* fix: Apply suggestions from code review

Co-authored-by: Edd Robinson <me@edd.io>

Co-authored-by: Edd Robinson <me@edd.io>
2021-01-12 18:26:32 -05:00
Andrew Lamb a5240af080
docs: Document desired crate dependencies in comments (#638)
* docs: Document the desire for read buffer and mutable buffer to be independent of query layer

* docs: Document desire for the query layer to not depend on storage systems

* fix: Apply suggestions from code review

Co-authored-by: Edd Robinson <me@edd.io>

Co-authored-by: Edd Robinson <me@edd.io>
2021-01-12 17:49:03 -05:00
Andrew Lamb 3110db41e2
refactor: rename Id to ID in gRpc implementation (#649) 2021-01-12 17:18:20 -05:00
Andrew Lamb 6376891da3
feat: implement query planning in terms of chunks (#647) 2021-01-12 16:04:45 -05:00
Andrew Lamb 38abe9735f
Merge branch 'main' into dom/iox-api-client 2021-01-12 13:19:49 -05:00
Andrew Lamb 2938c8f8fc
feat: implement chunk listing and snapshotting in mutable buffer (#641)
* feat: implement chunk listing and snapshotting in mutable buffer

* fix: update to use latest version of string interner and remove custom clone

* docs: fix comment
2021-01-12 12:46:18 -05:00
Dom ac88b5a92b refactor: fix lints 2021-01-12 17:23:19 +00:00
Dom e06b989fa6
Merge branch 'main' into dom/iox-api-client 2021-01-12 17:10:51 +00:00
Dom ba7e3dfcbd refactor: remove static lifetimes from const 2021-01-12 17:09:20 +00:00
Dom a6f1832a81 feat: set writer ID method
Adds an API call to set the server's writer ID.
2021-01-12 16:48:55 +00:00
Andrew Lamb c1a7778d85
refactor: move id and deps out of query crate (#646) 2021-01-12 11:47:43 -05:00
Dom 62349edb94 feat: create IOx API client
Initialises a new library crate and implements a basic IOx API client.

The API client supports:
	- ping
	- create database

Care has been taken to abstract away the underlying HTTP client used
(reqwest) and avoid leaking it into the public API (error types is a
common leak!) This makes updating the HTTP client and/or swapping it for
something else a backwards compatible change for end users of the crate.

Outstanding items:
	- move shared API types into a sensible location
	- discriminate between various IOx error responses

The former doesn't need doing until we publish the crate and will likely
be rather invasive / conlict prone so aiming to merge this PR and then
move things around in a follow-up.

The latter would allow us to expose error conditions to the user such
that they can take actions to remidy the situation / know if the request
can or should be retried / etc. Currently we expose a string error
message when requests fail, requiring string matching and/or passing the
string higher in the stack (and thus punting the problem to the caller).
It would be very nice to have typed errors, but a detail I have left for
later.
2021-01-12 16:38:33 +00:00