Commit Graph

1140 Commits (09588499567735d4ea1f6eb4c4d6af01e3dd4249)

Author SHA1 Message Date
Andrew Lamb 5fe3bfd53c
refactor: extract WalDetails into delorean_wal_writer crate (#297) 2020-09-18 07:47:37 -04:00
Andrew Lamb 9cb63f47ff
feat: Implement timestamp range in measurement_names gRPC call + tests (#296) 2020-09-18 06:40:03 -04:00
Andrew Lamb d0350b9aac
refactor: move test specific database code to its own module (#295) 2020-09-17 12:31:29 -04:00
Andrew Lamb 881c2961f6
feat: [WriteBuffer][gRPC] support for measurement_names (#293)
* refactor: move GrpcInputs to its own module so I can reuse it

* feat: Basic gRPC support for listing measurements, tests for same

* fix: move Fixture definition, rename client

* fix: remove confusing doc comment
2020-09-16 17:45:28 -04:00
Carol (Nichols || Goulding) 2d3a25b465
Merge pull request #288 from influxdata/cn/snappy-compression
feat: Compress WAL entries with Snappy
2020-09-16 08:35:17 -04:00
Andrew Lamb 565e2909ea
docs: Add some additional context to write_buffer_routes.rs (#292) 2020-09-16 07:56:10 -04:00
Andrew Lamb 358a548a0a
feat: implement skeleton Storage gRPC interface (#290) 2020-09-15 15:30:57 -04:00
Andrew Lamb 2d55076c48
feat: Basic gRPC server tests (#289)
* refactor: move TestDatabaseStore to test_fixtures

* feat: Basic gRPC server tests
2020-09-15 15:11:02 -04:00
Andrew Lamb 56d184f80c
chore: remove outdated comment from protobuf definition (#291) 2020-09-15 15:08:54 -04:00
Andrew Lamb 11e16c78d9
feat: initial WriteBuffer gRPC implementation (#287)
* feat: initial WriteBuffer gRPC implementation

* fix: remove spurious comments found in code review
2020-09-14 15:35:41 -04:00
Andrew Lamb f9fe6cdd31
test: add test for gzip content-encoding (#286) 2020-09-14 15:23:51 -04:00
Carol (Nichols || Goulding) 596c987956 feat: Compress WAL entries with Snappy
Fixes #276.
2020-09-14 09:42:54 -04:00
Andrew Lamb 90eba702ca
refactor: Remove org/bucket from WriteBufferDatabase interface (#285) 2020-09-13 06:09:19 -04:00
alamb c4a738dfbe Revert "refactor: Remove org/bucket from WriteBufferDatabase interface"
This reverts commit f7ad7afc4f.
2020-09-12 07:06:33 -04:00
alamb f7ad7afc4f refactor: Remove org/bucket from WriteBufferDatabase interface 2020-09-12 07:05:54 -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
Andrew Lamb 44bb230b2d
Merge pull request #283 from influxdata/alamb/line-proto-display
feat: implement ParsedLine --> LineProtocol
2020-09-11 17:20:22 -04:00
alamb 9b9ff484bb fix: implement escaping 2020-09-11 17:14:35 -04:00
alamb 4cf03b6243 fix: remove unecessary test for invalid conversion 2020-09-11 16:23:40 -04:00
alamb d4ae7d3466 fix: postfix integer with "i" 2020-09-11 16:22:57 -04:00
alamb babd54b321 docs: adjust comment 2020-09-11 16:20:08 -04:00
alamb b7a061d2a8 feat: implement ParsedLine --> LineProtocol 2020-09-11 08:06:08 -04:00
Andrew Lamb 37a982d3b0
Merge pull request #282 from influxdata/alamb/gzip
feat: support gzip content-encoding for api/v2/write endpoint
2020-09-10 12:04:13 -04:00
alamb e55899f73b feat: support gzip content-encoding for api/v2/write endpoing 2020-09-10 11:49:50 -04:00
Andrew Lamb ef8f0273a8
Merge pull request #281 from influxdata/alamb/docs
docs: add comments, adjust logging levels, proper error reporting for line protcol parse errors
2020-09-10 11:47:50 -04:00
alamb 3275fc8846 docs: add comments, adjust logging levels, proper error reporting for line protcol parse errors 2020-09-10 11:10:09 -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
Carol (Nichols || Goulding) 66b8e034f9
Merge pull request #275 from influxdata/cn/make-url-pub
fix: Make influx client's URL public
2020-09-04 17:24:57 -04:00
Carol (Nichols || Goulding) efaab117de fix: Make influx client's URL public
In the data generator, we're going to have potentially 2 different
clients for the data and for telemetry, and I'd like to be able to log
how they're configured, for example.

I don't see any reason for URL to
be private, because the user of the client passed in the URL and we
haven't changed anything about it.
2020-09-04 17:07:40 -04:00
Carol (Nichols || Goulding) e7f09d0af2
Merge pull request #274 from influxdata/cn/names
fix: Clarify what takes org/bucket names and what takes IDs
2020-09-03 10:29:40 -04:00
Carol (Nichols || Goulding) 4ab8597f50 fix: Clarify what takes org/bucket names and what takes IDs
Connects to influxdata/fusion#60

As far as I can tell, `/api/v2/write` uses `org` and `bucket` params
that can take org and bucket names, so just call those `org` and
`bucket` throughout and clarify in examples they can be any string.

However, `/api/v2/buckets` uses only `orgID` that must be the
organization's 16-digit hex ID, so clarify that case.

This means in examples where we create a bucket and push points into it,
we'll need both a hex ID and name for the organization.
2020-09-02 16:32:24 -04:00
Carol (Nichols || Goulding) 600960a5e3
Merge pull request #273 from influxdata/cn/influx-auth 2020-09-02 12:37:42 -04:00
Carol (Nichols || Goulding) 6223cbdc99 feat: Add an authorization token to all client requests
Connects to influxdata/fusion#59. Delorean currently ignores this
header.

Also add an example of using this to connect to an InfluxDB 2 instance;
I tested this out with a locally running Influx DB 2 and I was able to
write points!
2020-09-02 10:33:45 -04:00
Carol (Nichols || Goulding) 0f1cd1a77e refactor: Extract a method for building requests to share common code soon 2020-09-02 09:56:36 -04:00
Carol (Nichols || Goulding) 5d637c3d4a
Merge pull request #269 from influxdata/cn/more-types
feat: Support storage of points with String and Boolean fields
2020-08-14 13:56:41 -04:00
Carol (Nichols || Goulding) 5f49543fdf feat: Support storage of points with String and Boolean fields 2020-08-14 10:57:20 -04:00
Carol (Nichols || Goulding) c6dadb526f
Merge pull request #268 from influxdata/cn/client-add-bucket 2020-08-12 14:01:55 -04:00
Carol (Nichols || Goulding) 1cb3d025c6
fix: typo
Co-authored-by: Jake Goulding <jake.goulding@integer32.com>
2020-08-12 13:50:45 -04:00
Carol (Nichols || Goulding) d59702ec79 feat: Make the create bucket HTTP API match the Influx 2.0 API
The `/api/v2/create_bucket` API was delorean-specific for testing
purposes. This change makes it match the [Influx 2.0 API][influx] and
adds a method to the client for creating buckets.

The client will always send an empty array of `retentionRules` because
that is a required parameter for the Influx API. Delorean always ignores
`retentionRules`. The `description` and `rp` parameters are optional and
are never sent.

[influx]: https://v2.docs.influxdata.com/v2.0/api/#operation/PostBuckets

I believe the gRPC create bucket is also delorean-specific and perhaps
not needed, but I'm leaving it in for now with a note.
2020-08-12 10:08:32 -04:00
Andrew Lamb 2aad349463
Merge pull request #267 from influxdata/cn/visibility
fix: Make the influx client data_point module public
2020-08-05 16:33:49 -04:00
Carol (Nichols || Goulding) 6136fd35d1 fix: Make the influx client data_point module public
Driven by use in fusion.
2020-08-05 14:57:00 -04:00
Edd Robinson feeac88f24
Merge pull request #266 from influxdata/er/feat/sort-packers
feat: add ability to sort tables of `Packers` data via multiple columns
2020-08-04 21:42:23 +01:00
Edd Robinson 21c0155271 fix: improve pivot for certain sorts 2020-08-04 21:33:58 +01:00
Edd Robinson deb9975594 test: fix tests 2020-08-04 21:12:07 +01:00
Edd Robinson db15ef4d37 refactor: PR feedback
Co-authored-by: Jake Goulding <jake.goulding@integer32.com>

refactor: PR feedback

Co-authored-by: Jake Goulding <jake.goulding@integer32.com>

refactor: PR feedback

Co-authored-by: Jake Goulding <jake.goulding@integer32.com>

refactor: PR feedback

Co-authored-by: Jake Goulding <jake.goulding@integer32.com>

refactor: PR feedback

Co-authored-by: Jake Goulding <jake.goulding@integer32.com>

refactor: PR feedback

Co-authored-by: Jake Goulding <jake.goulding@integer32.com>

refactor: PR feedback

Co-authored-by: Jake Goulding <jake.goulding@integer32.com>

refactor: PR feedback

Co-authored-by: Jake Goulding <jake.goulding@integer32.com>

refactor: PR feedback

Co-authored-by: Jake Goulding <jake.goulding@integer32.com>

refactor: PR feedback

Co-authored-by: Jake Goulding <jake.goulding@integer32.com>

refactor: PR feedback
2020-08-04 18:49:39 +01:00
Edd Robinson d0d223c7cc feat: add mutli-column Quicksort for `[Packers]` 2020-08-04 18:49:39 +01:00
Edd Robinson 39db199613
Merge pull request #264 from influxdata/er/perf/packers
perf: improve performance of materialising Packers
2020-08-04 18:49:18 +01:00
Edd Robinson 8ef76debe9 refactor: PR feedback
Co-authored-by: Carol (Nichols || Goulding) <193874+carols10cents@users.noreply.github.com>

refactor: PR feedback

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

refactor: PR feedback

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

refactor: PR feedback

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

refactor: PR feedback

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

refactor: PR feedback

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

refactor: PR feedback

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

refactor: PR feedback

Co-authored-by: Jake Goulding <jake.goulding@integer32.com>

refactor: PR feedback
2020-08-04 18:42:37 +01:00
Edd Robinson cc39bf3cb4 refactor: address PR feedback 2020-07-31 11:41:57 +01:00
Edd Robinson e40fecb1ff perf: reduce cost of materialising packer rows 2020-07-30 15:38:29 +01:00