Commit Graph

327 Commits (0650a9bb77138a45f32f9eee7fbcc36104d87064)

Author SHA1 Message Date
Andrew Lamb f568c083a4
fix: Do not leave child processes around after the end-to-end test (#955) 2021-03-10 14:25:27 +00:00
Andrew Lamb 1af5cf8b7c
refactor: Move end-to-end test server fixture into its own module (#945)
* refactor: Move test server fixture into its own module

* fix: Update tests/end-to-end.rs

* fix: better error handling and display

* fix: tweak startup message
2021-03-09 19:08:55 +00:00
Raphael Taylor-Davies 5c9dd68bf8
feat: MVP Management CLI (#907)
* feat: MVP CLI implementation

* feat: multiline database description
2021-03-03 17:37:55 +00:00
Raphael Taylor-Davies ffc20fa821
feat: add basic gRPC health service (#862)
* feat: add basic gRPC health service

* feat: update README.md add /health to HTTP API

* feat: add health client to influxdb_iox_client

feat: end-to-end test health check service

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-02-25 13:24:12 +00:00
Jake Goulding 2bd09612bd refactor: Enable parking lot for dependencies 2021-02-22 13:37:35 -05:00
Jake Goulding 6603ecd758 refactor: Unify on once_cell
This is closest in API to what is likely to be added to the standard
library at some point, so let's use it consistently.
2021-02-22 13:37:35 -05:00
Raphael Taylor-Davies 6d3c21b952 feat: Use Bytes instead of Vec<u8> in prost generated code
Also add google.rpc.* Protobuf definitions
2021-02-12 17:10:58 +00:00
Jake Goulding 699f4a577f feat: Add an optional Flight client to the IOx client library 2021-02-10 10:30:05 -05:00
Raphael Taylor-Davies 143488fae9 feat: add WAL metadata endpoint (#724) 2021-02-08 16:21:34 +00:00
Carol (Nichols || Goulding) fbf776c6b3
chore: Clean up Cargo.tomls (#754)
* fix: test_helpers crate should only be a dev-dep

* fix: object_store no longer has a build script, so no longer needs a build dep

* chore: Alphabetize all Cargo.tomls
2021-02-04 18:56:02 -05:00
Raphael Taylor-Davies 29314a6118 feat: consistent global error handling and logging 2021-02-04 13:15:17 +00:00
Andrew Lamb 485a59b2f8
feat: Implement logfmt (Heroku) formatted log output (#716)
* feat: add option to output logs formatted via logfmt

* refactor: Apply suggestions from code review

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

* fix: add tests for span inclusion

* feat: Also log spans

* fix: bug in normalizer

Co-authored-by: Edd Robinson <me@edd.io>
2021-02-01 16:43:01 -05:00
Andrew Lamb f3bd8bd0e3
chore: update deps (tokio 1.0 and ecosystem) (#707)
* chore: Update arrow + tokio deps

* chore: Use bleeding edge azure

* chore: Update aws + other deps

* fix: fmt

* fix: Switch to in-house version of routerify

* fix: Upgrade to hyper 0.14

The hyper::error module is now private; hyper::Error is the public
re-export

* fix: Upgrade cloud storage to get tokio upgrade

* fix: Upgrade open_telemetry

* fix: Do not call `panic::set_hook` during another panic

Doing so leads to a double panic which aborts the process.

* fix: new h2 error who dis

Co-authored-by: Carol (Nichols || Goulding) <carol.nichols@integer32.com>
Co-authored-by: Jake Goulding <jake.goulding@integer32.com>
2021-01-29 16:11:55 -05: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
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
Dom bdc832d040 refactor: replace config system with structopt
Replaces the hand-rolled config system with a StructOpt managed config struct.

I've got most of it ported across, but the interaction between all the logging
config bits is complex! I've left what is there and hooked in the value from
the config struct (which directly replaces the env var in usage, as it also
sources from the env).
2021-01-11 18:43:14 +00:00
Carol (Nichols || Goulding) b66ad643d5 refactor: Extract panic logging to its own crate for ease of reuse 2021-01-08 12:36:56 -05:00
Carol (Nichols || Goulding) 6f3b5a6a9e refactor: Alphabetize workspace members to match dir listing 2021-01-08 12:20:31 -05:00
Andrew Lamb 9f0ff678f1
feat: Formalizes the config system for IOx, including tests (#608)
* feat: Create configuration system, port IOx to use it

* docs: Apply suggestions from code review

Co-authored-by: Paul Dix <paul@influxdata.com>

* fix: fix test for setting values

Co-authored-by: Paul Dix <paul@influxdata.com>
2020-12-31 07:02:31 -05:00
Paul Dix 1d200c5c77 chore: move http API over to Routerify
This moves the HTTP API over to Routerify, which has the basic route parsing logic that will enable the API design for IOx.

I had a little trouble with the error handling in Routerify so I ended up creating a macro for constructing error responses in the HTTP API. I'm not sure what I think of this pattern so I'm interested in what others think. Another option would be to have two functions for each API endpoint. One which is x_handler with a Routerify function signature. Then another which is just x that has the Result<Response<Body>, ApplicationError> return type, which would make using the ? operator work in those functions. That would eliminate the need for the return_err macro.

I'm happy to refactor to that if people prefer it.
2020-12-24 16:45:20 -06:00
Edd Robinson 199ba68769 refactor: rename segment_store crate to read_buffer 2020-12-22 21:26:04 +00:00
Andrew Lamb 48c43b136c
refactor: rename write_buffer --> mutable_buffer (#595)
* refactor: git mv write_buffer mutable_buffer

* refactor: update crate name references

* refactor: update some more references
2020-12-22 10:49:53 -05:00
Dom 41f5099691 refactor: compile out trace! level for release builds
Configures the IOx tracing to compile out trace!() level events in the release
binary. This effectively gives contributors three levels of output:

* Important to the user (info & friends)
* Not important for regular running, but needed to debug
* Only useful to devs in a specific part of the system, never seen by user

Documents this behaviour (and general usage guidelines) for contributors.
2020-12-14 12:06:53 +00:00
Dom 60ee7e1dbb chore(deps): remove unused env_logger 2020-12-14 12:06:53 +00:00
Dom 9d7389dec2 feat(tracing): add Jaeger tracing sink
Adds telemetry / tracing with support for a Jaeger backend, and changes the
logger from env_logger to a tracing subscriber to collect the log entries.

Events are batched and then emitted asynchronosuly via UDP to the Jaeger
collector using the tokio runtime. There's a bunch of settings (env
vars) related to batch sizes and flush frequency etc - they're all using
their default values at the moment (if it ain't broke...) See the docs
for more info:

    https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/sdk-environment-variables.md#opentelemetry-environment-variable-specification

This is only part 1 of telemetry - it does NOT propagate traces across RPC
boundaries as we're still defining how all this should work. I've created #541
to track this.

Closes #202 and closes #203.
2020-12-14 12:06:52 +00:00
Paul Dix fa3ecbd4ed
feat: Implement write buffer to Parquet snapshotting (#526)
* feat: Implement write buffer to Parquet snapshotting

This introduces snapshot to the server packages to manage snapshotting. It also introduces a new trait for representing a Partition. There is a very crude API wired up in http_routes for testing purposes. Follow on work will bring the server package into http_routes and rework the snapshot API.
2020-12-08 14:20:43 -05:00
Edd Robinson f3af86ccb4 chore: add debug symbols to benchmarks 2020-12-04 16:36:05 +00:00
Dom c3a0e893ae test: use flate2 2020-12-01 11:01:10 +00:00
Dom 867aba847a perf(convert): use flate2 for gzip decompression
Switches from `libflate` to `flate2` for the top-level commands (specifically
TSM conversion).
2020-11-30 15:18:25 +00:00
Andrew Lamb cdb26e60e4
refactor: rename `storage` crate to `query` to better reflect what it is (#475)
* refactor: rename storage --> query

* refactor: update a few more referenes
2020-11-24 14:19:29 -05:00
Paul Dix 59e2024d01 chore: rename cluster crate to server 2020-11-20 12:14:12 -05:00
Andrew Lamb fe663c3534
feat: add cpu_feature_check (#458)
* feat: add cpu_feature_check

* fix: clarify output
2020-11-17 13:28:23 -05:00
Edd Robinson 0958849956 chore: rename the segment store crate 2020-11-10 16:35:17 +00:00
Andrew Lamb 5bb530ccc6
refactor: rename tsm --> influxdb_tsm (#418) 2020-11-05 14:35:38 -05:00
Andrew Lamb b745a180a4
refactor: rename delorean --> InfluDB IOx (#417) 2020-11-05 13:51:04 -05:00
Andrew Lamb a52e0001c5
refactor: rename all crates that start with`delorean_` in preparation for rename (#415)
* refactor: rename delorean_cluster --> cluster

* refactor: rebane delorean_generated_types --> generated_types

* refactor: rename delorean_write_buffer --> write_buffer

* refactor: rename delorean_ingest --> ingest

* refactor: rename delorean_storage --> storage

* refactor: rename delorean_tsm --> tsm

* refactor: rename delorean_test_helpers --> test_helpers

* refactor: rename delorean_arrow --> arrow_deps

* refactor: rename delorean_line_parser --> influxdb_line_protocol
2020-11-05 13:44:36 -05:00
Andrew Lamb 9df6c24493
refactor: rename delorean_mem_qe --> mem_qe (#414) 2020-11-05 09:36:46 -05:00
Andrew Lamb 4f348836fe
refactor: remove delorean_parquet by compining with delorean_ingest (#412) 2020-11-05 09:29:59 -05:00
Andrew Lamb ff824a5477
refactor: rename delorean_wal --> wal, conslidate wal_writer (#411) 2020-11-05 09:25:29 -05:00
Andrew Lamb a3b88d5506
refactor: rename delorean_object_store --> object_store (#413) 2020-11-05 08:56:30 -05:00
Andrew Lamb 8399d2a159
refactor: rename delorean_table to packers (#409) 2020-11-05 08:52:22 -05:00
Andrew Lamb 075ba0d8d1
refactor: remove delorean_table_schema crate and fold it into data_types (#408) 2020-11-05 06:17:20 -05:00
Andrew Lamb bf0c58698e
refactor: rename delorean_data_types crate to data_type (#407)
* refactor: rename delorean_data_types crate to data_type - #401

* fix: fmt
2020-11-04 12:33:41 -05:00
Andrew Lamb ef501871bb
feat: remove partition_store (#387) 2020-10-26 14:39:38 -04:00
Paul Dix a80eb0fed3 feat: Store replicated writes
This commit refactors the flatbuffers data types from the wal to a new crate where they can be used by storage, write buffer, and cluster. It also refactors cluster to move the configuration types out to the data types crate so they can be used across storage and elsewhere.

Finally, it adds a new method to store replicated writes on a database in the database trait and implements it.
2020-10-11 15:45:08 -04:00
Edd Robinson a2287acb7c
Merge pull request #330 from influxdata/er/feat/segment-store-shell
feat: Segment Store shell
2020-10-01 14:01:45 +01:00
Paul Dix fdc86fd186
feat: add some initial framework for clustering (#329) 2020-09-30 14:41:42 -04:00
Edd Robinson 2470bdb975 feat: segment store shell 2020-09-30 11:25:59 +01:00
Edd Robinson ec1aaa3a47 chore: update dependencies 2020-09-25 17:22:48 +01:00
Edd Robinson c42d2dcd79 refactor: rebase with delorean_arrow 2020-09-25 10:12:46 +01:00
Edd Robinson aba02cb731 feat: basic store 2020-09-25 10:12:46 +01:00
Andrew Lamb 77f58efca7
chore: update Arrow/Parquet/DataFusion versions, consolidate references into new crate (#309)
* chore: consolidate all arrow/parquet/datafusion dependencies

* chore: update datafusion version
2020-09-24 08:46:54 -04:00
Andrew Lamb 498478c066
refactor: rename delorean_storage_interface to delorean_storage (#308) 2020-09-22 17:18:53 -04:00
alamb 2418ee5ab0 refactor: move partitioned_store into its own module 2020-09-18 08:12:19 -04:00
Andrew Lamb 642b1b4370
refactor: move write_buffer to delorean_write_buffer crate (#299) 2020-09-18 08:11:48 -04:00
Andrew Lamb d2c24ef7af
refactor: pull storage interface into delorean_storage_interface (#298) 2020-09-18 07:58:19 -04:00
Andrew Lamb 5fe3bfd53c
refactor: extract WalDetails into delorean_wal_writer crate (#297) 2020-09-18 07:47:37 -04:00
Andrew Lamb 82d5f485c3
test: traits for database and tests for http handler (#284)
* test: traits for database and tests for http handler

* refactor: Use generics and trait bounds instead of trait objects

* refactor: Replace trait objects with an associated type

* refactor: Extract an associated Error type on the Database traits

* refactor: Remove some explicit conversions to_string that Snafu takes care of

* docs: add comments

* refactor: move traits into storage module

Co-authored-by: Carol (Nichols || Goulding) <carol.nichols@integer32.com>
2020-09-11 17:42:00 -04:00
Paul Dix 8ed3a1b440
feat: Initial prototype of WriteBuffer and WAL (#271)
This is the initial prototype of the WriteBuffer and WAL. This does the following:

* accepts a slice of ParsedLine into the DB
* writes those into an in memory structure with tags represented as u32 dictionaries and all field types supported
* persists those writes into the WAL as Flatbuffer blobs (one WAL entry per slice of lines written, or WriteBatch)
* has a method to return a table from the buffer as an Arrow RecordBatch
* recovers the WAL after the database is closed and opened back up again
* has a single test that covers the end-to-end from the DB side
* It doesn't include partitioning yet. Although the write_lines method does actually try to do partitions on time. That'll get changed to be something more general defined by a per database configuration.
* hooked up to the v2 HTTP write API
* hooked up to a read API which will execute a SQL query against the data in the buffer

This includes a refactor of the WAL:

Refactors the WAL to remove async and threading so that it can be moved higher up. This simplifies the API while keeping just about the same amount of code in ParitionStore to handle the asynchronous writes.

This also modifies the WAL to remove the SideFile implementation, which was causing significant performance problems and write amplification. The downside is that WAL writes are no longer guarranteed atomic.

Further, this modifies the WAL to keep the active segement file handle open. Appends now don't have to list the directory contents and look for the latest file and open the file handle to do appends, which should also improve performance and reduce iops.
2020-09-08 14:12:16 -04:00
Edd Robinson 23aa5a4981 test: add benchmarks for packers 2020-07-30 12:54:51 +01:00
Carol (Nichols || Goulding) c179a7e8b2 fix: Remove generate/seed utilities
These are going to be redone in the fusion repo.
2020-07-22 17:15:30 -04:00
Carol (Nichols || Goulding) 7ed24241b5 feat: Set up an InfluxData 2.0 client crate 2020-07-17 10:27:33 -04:00
Carol (Nichols || Goulding) ac6f3befd0 fix: Remove the blocking feature from reqwest
This should have been removed in fdcef79 but wasn't.
2020-07-15 15:48:34 -04:00
Carol (Nichols || Goulding) b3a16c080f feat: Update croaring
Jake dug into why the end-to-end tests fail with delorean running in the
Docker image I built, and it appears to be a crash with an illegal
instruction from CRoaring.

We think it's this issue: https://github.com/saulius/croaring-rs/pull/62
which was merged and released, so let's try updating CRoaring.
2020-07-08 08:49:28 -04:00
Edd Robinson 1d3adea394 test: add benchmark for mapping fields 2020-07-03 10:56:31 +01:00
alamb 283d6691c6 feat: enable rpc debug tracing, tweaked logging levels, respect RUST_FMT env var 2020-06-29 09:59:22 -04:00
Andrew Lamb 322a491b9d
perf: Improve line protocol --> parquet conversion performance by ~20% (#177)
* feat: benchmark for lp->parquet performance

* feat: improve parser performance by storing contiguous EscapedStr

* fix: remove all string copies during LP-Parquet conversion

* refactor: Implement from_str as From<&str> only

* refactor: implement Deref instead of as_str

* refactor: Remove ends_with because Deref now makes it work

* refactor: Eq can be derived

* refactor: Remove unused From implementation

* refactor: Replace single-character strings with chars as requested by clippy

Co-authored-by: Carol (Nichols || Goulding) <carol.nichols@integer32.com>
2020-06-23 05:42:19 -04:00
Edd Robinson 85e0b4ec16 refactor: hoist tsm reader into own crate 2020-06-22 18:56:17 +01:00
Andrew Lamb cf248f2143
feat: upgrade to latest arrow / byteorder (#154) 2020-06-17 12:50:23 -04:00
Carol (Nichols || Goulding) d3283b1096 feat: Object storage in S3 and GCS 2020-06-10 17:23:52 -04:00
Andrew Lamb faf3f534ac
refactor: move all dstool code into delorean binary (#131)
* refactor: move all dstool code into delorean binary

* fix: Move code/mods to make it compile and run

* fix: warn if db dir does not exist

* refactor: Match argument subcommands w/ more idomatic  rust

* fix: Apply suggestions from code review

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

fix: restore hyper logging

fix: Apply suggestions from code review

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

* fix: update expected code

Co-authored-by: Carol (Nichols || Goulding) <193874+carols10cents@users.noreply.github.com>
2020-06-10 16:04:46 -04:00
Andrew Lamb 986e12d62a
refactor: Rename crate line_protocol_schema --> delorean_table_schema (#129)
* refactor: Rename crate line_protocol_schema --> delorean_table_schema

* fix: fmt
2020-06-09 11:56:16 -04:00
Andrew Lamb 8475b6d183
feat: Add parquet writer, hook up conversion in dstool (#124)
* feat: Add parquet writer, hook up conversion in dstool

* fix: use bigger executor for test

* fix: less cloning

* fix: make unsupported messages less pejorative

* fix: fmt

* fix: Rename writer and do not require std::File, add example

* fix: clippy and fmt

* fix: remove unnecessary module in end to end tests

* fix: remove strange use of tempfile

* fix: Apply suggestions from code review

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

* fix: Apply suggestions from code review

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

* fix: cleanup use

* fix: Use more specific error messages

* fix: comment tweak

* fix: touchup temp path creation

* fix: clippy!

Co-authored-by: Carol (Nichols || Goulding) <193874+carols10cents@users.noreply.github.com>
2020-06-08 16:25:24 -04:00
Andrew Lamb ca9f9d4cae
feat: Add column packing code (#114)
* feat: Add column packing code

* fix: remove dependency on assert_approx_equal in favor of delorean_test_helpers

* fix: Cleanups from pr comments

* fix: Apply suggestions from code review

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

* fix: more cleanup per code review

* fix: pr comments

* fix: remove explict string creation from caller

Co-authored-by: Jake Goulding <jake.goulding@integer32.com>
Co-authored-by: Carol (Nichols || Goulding) <193874+carols10cents@users.noreply.github.com>
2020-06-06 06:04:41 -04:00
Jake Goulding 68fb580b43
style: Re-enable the elided lifetimes lint and move generated types to their own crate (#119)
* refactor: rename the module containing generated types

The nested `delorean` was confusing anyway, and this will make more
sense when we extract a new crate.

* refactor: Move the generated types to their own crate

This allows us to have more lax warnings in that crate alone, keeping
the main crate more strict.

* style: Re-enable elided lifetimes lint in the main crate
2020-06-05 16:22:27 -04:00
Edd Robinson e3db077121 feat: add API for series key information 2020-06-04 14:36:43 +01:00
Edd Robinson 413738a264 feat: support org and bucket ID in entries 2020-06-04 14:36:43 +01:00
Andrew Lamb 234b2f5752
feat: Line Protocol Schema extractor (#108)
* feat: schema inference from iterator of parsed lines

* fix: Clean up error handing even more

* fix: fmt

* fix: make a sacrifice to the clippy gods
2020-06-03 18:29:57 -04:00
Andrew Lamb 5d2c5de39d
feat: Structs to represent line protocol schema (#103)
* feat: Structs to represent line protocol schema

Co-authored-by: Jake Goulding <jake.goulding@integer32.com>
2020-06-03 08:39:35 -04:00
Andrew Lamb 18b05ce9ef
fix: move test of dstool to its delorean_storage_tool package (#107) 2020-06-02 16:10:30 -04:00
Andrew Lamb 1a2efdfd71
feat: Add dstool command line tool (#102)
* feat: Add dstool command line tool

* clippy

* Update delorean_storage_tool/src/main.rs

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

* Update delorean_storage_tool/src/main.rs

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

* Add in tests + PR comments

* fmt

* build first then run tests

* actually build before test

Co-authored-by: Carol (Nichols || Goulding) <193874+carols10cents@users.noreply.github.com>
2020-06-02 07:33:43 -04:00
Jake Goulding d4af54c3de refactor: extract the line protocol parser to a separate crate
This will facilitate reusing the parser for other tasks.
2020-05-26 13:22:34 -04:00
Carol (Nichols || Goulding) e25a4e1e83 feat: Integrate the WAL with delorean 2020-05-11 15:38:47 -04:00
Jake Goulding 4dd7a8cea8 feat: Introduce a WAL tailored for delorean 2020-05-11 15:38:44 -04:00
Jake Goulding e369ada35a refactor: extract a crate with our custom assertions
There's probably an existing crate that we should use directly, but I
haven't found an exact match yet.
2020-05-01 13:04:24 -04:00
Carol (Nichols || Goulding) 7f9eaf51d5
Merge pull request #74 from influxdata/cn-generate-points 2020-04-24 08:08:32 -04:00
Edd Robinson f1d5d50b92
Merge pull request #68 from influxdata/er-block-writer
feat: add Block Type
2020-04-23 22:48:38 +01:00
Carol (Nichols || Goulding) fa69101945 refactor: Move the point utilities into a workspace crate 2020-04-23 11:26:37 -04:00
Carol (Nichols || Goulding) 6791b9598c feat: Utility to take line protocol and make write requests 2020-04-23 11:11:51 -04:00
Carol (Nichols || Goulding) 0956b665d8 feat: Add a utility to generate points in line protocol to stdout 2020-04-23 11:11:46 -04:00
Jake Goulding 93231c64e0 perf: Use a SmallVec for escaped strings and sets of tags and values
This increases the performance from 56.531 MiB/s to 58.194 MiB/s.
2020-04-08 14:41:42 -04:00
Jake Goulding 4aa3afb930 perf: Add a benchmark for the line parser 2020-04-08 14:41:17 -04:00
Edd Robinson 9e20743b2c feat: add Block Type
This commit adds a new Block type, which is used to keep track of values
associated with individual block, and then serialise them.
2020-04-08 13:37:48 +01:00
Jake Goulding 8629072508 build: Upgrade tonic to 0.2 2020-04-05 16:35:00 -04:00
Jake Goulding 4a28abd4de build: Upgrade assert_cmd to 1.0
This requires that we opt into the serde `derive` feature that is no
longer implicitly added from upstream.
2020-04-05 16:33:37 -04:00
Carol (Nichols || Goulding) df67b9715a Merge remote-tracking branch 'origin/master' into pd-partiton-store 2020-04-02 11:15:26 -04:00
Jake Goulding 97d11633b8 feature: Use a unique directory per end-to-end test run 2020-04-02 11:06:36 -04:00
Carol (Nichols || Goulding) d9cf5c952a fix: Remove RocksDB code 2020-04-02 09:41:30 -04:00
Jake Goulding 4fd0c6f210 feat: Error when parsing lines with duplicate tags 2020-03-11 22:43:09 -04:00
Jake Goulding 78a53aa391 refactor: Replace the hand-written parser with one built with nom 2020-03-06 10:00:29 -05:00
Jake Goulding 5d3f99da98 refactor: Remove unused failure crate 2020-02-28 16:54:28 -05:00
Edd Robinson 17051717e2 chore: remove dependency: 2020-02-28 12:55:28 +00:00
Edd Robinson 38f23ac07a refactor: merge master in 2020-02-27 14:27:23 +00:00
Carol (Nichols || Goulding) c41652e45b feature: Add the storage gRPC proto definitions 2020-02-24 08:26:28 -05:00
Jake Goulding 3438edd18b feature: Switch from prost to tonic 2020-02-17 16:37:43 -05:00
Jake Goulding 9c7e3b2663 build: `rand` is only a test dependency 2020-02-17 10:48:33 -05:00
Jake Goulding 68970f8ff3 build: Update bytes to latest version 2020-02-17 10:48:33 -05:00
Jake Goulding 155bfcbd4f build: Update prost to latest version 2020-02-17 10:48:33 -05:00
Jake Goulding eb3113b820 build: Update dotenv to latest version 2020-02-17 10:48:32 -05:00
Jake Goulding 31df104996 build: Update env_logger to latest version 2020-02-17 10:48:32 -05:00
Jake Goulding e3bfa0f835 build: Update byteorder to latest version 2020-02-17 10:48:32 -05:00
Carol (Nichols || Goulding) 8b1255be9d refactor: Switch to a hyper server 2020-02-14 09:59:09 -05:00
Carol (Nichols || Goulding) 062bbc5a34 Merge remote-tracking branch 'origin/master' into er-encoder-bench 2020-02-14 09:15:24 -05:00
Carol (Nichols || Goulding) 9cce1e4882 test: Add an end-to-end test
This test:
- Runs the server in a thread
- Writes some data
- Reads some data
- Shuts down the server
2020-02-13 10:40:03 -05:00
Carol (Nichols || Goulding) e361cded92 refactor: Move all encoder benchmarks to one file 2020-02-12 11:08:07 -05:00
Edd Robinson 5327efd926 test: add timestamp benchmarks 2020-02-07 13:26:59 +00:00
Edd Robinson 4185307d78 test: add float encoder/decoder bencmarks
This commit adds benchmarks for the float encoder and decoder. The
following scenarios are benchmarked:

- sequential values;
- random values;
- real CPU values (from Telegraf output).

Each scenario is benchmarked with a variety of block sizes.
2020-01-21 15:01:35 +00:00
Edd Robinson 80ff911259 feat: automatically create db dir and test dir 2020-01-06 15:55:22 +00:00
Paul Dix 1a851f8d0b Add basic read endpoint
This commit adds a basic read endpoint to pull data out of the database. In order to provide the basic functionality a few things were added:

* Time package with limited support for parsing Flux style durations
* API endpoint at /api/v2/read with query paramters of org_id, bucket_name, predicate, start, and stop

The start and stop query parameters only support relative durations.

The predicate parameter supports what is possible in the parse_predicate method and in the RocksDB implementation (only == comparisons on tags and AND or OR)
2020-01-04 19:07:54 -05:00
Paul Dix 4265e7b11b Update write API endpoint
Upates the actix-web and actix-rt versions to 2.0 and 1.0 respectively. Wires up the write endpoint to create buckets if they don't exist.
2020-01-03 17:35:18 -05:00
Paul Dix 6cd4c5b583 Add basic tag key/value index
This commit brings in a Roaring Bitmap implementation to keep postings lists of tag key/value pairs to the set of series ids that have those pairs. The croaring implementation was used becasue the Treemap was required for u64 support for series ids and it was serializable (unlike the other pure Rust roaring implementation).

This doesn't shard the postings lists based on size. It also doesn't implement the time/index levels.

The predicate matching currently only works for a simple key = "value" match.
2019-12-24 13:44:30 -05:00
Paul Dix 617c2960a8 feat(storage): Implement bucket definitiions and persistence
This updates to build system to use Prost to build the protobuf objects.

It adds tests for creating, storing and loading bucket definitions.

The tests use an actual on disk RocksDB implementation to ensure that its tested all the way to persistence.
2019-12-17 17:01:41 -05:00
Paul Dix 9cadb1bb52 Add server skeleton with Actix and RocksDB 2019-12-12 10:15:16 -05:00
Edd Robinson fb83e9c7fa feat(encoding): add RLE encoder/decoder 2019-12-09 18:04:01 +00:00
Edd Robinson 55d711599e tests: add tests for simple8b 2019-12-04 13:14:37 +00:00
Paul Dix b9b5a815b7 Initial commit with some notes and proto 2019-11-22 16:59:04 -05:00