Commit Graph

18 Commits (107f39d53c7bfd55f5f4ff10e111d81779f1f62a)

Author SHA1 Message Date
Luke Bond 107f39d53c
feat: add trace collector to router2 (#3529)
* feat: add trace collector to router2

* chore: fmt
2022-01-26 11:51:17 +00:00
Dom 6b0f7e6b2b
feat: initialise ShardedWriteBuffer (#3528)
Initialises a ShardedWriteBuffer for the hard-coded "iox_shared" topic.

Adds the following CLI flags:

    * --write-buffer: type of buffer [kafka, rskafka, file]
    * --write-buffer-addr: write buffer endpoint address

The server uses these config options to initialise the appropriate write
buffer backend, and configure the TableNamespaceSharder to shard
operations over the set of sequencers exposed by the write buffer.

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-01-26 10:49:34 +00:00
Dom b846ead320
feat(router2): shard writes/deletes into write buffer (#3499)
* feat: Sequencer wrapper

This type wraps an underlying WriteBufferWriter implementation, tagging
it with a sequencer ID it should use when enqueuing operations to the
buffer.

* feat: mock sharder

Implements a mock Sharder impl that returns pre-configured responses to
shard(), and captures the input to the call.

* feat: sharded write buffer

Implements sharding of ops into an underlying WriteBuffer.

Writes are sharded by some abstract Sharder impl, collated per shard to
maximise the size of each op (and therefore compression efficiency),
converted into a DML operation and then enqueued in parallel to the
underlying WriteBuffer implementation.

Deletes are modelled as being mapped to a single write buffer shard,
which is the case while we support sharding based on the table &
namespace only. Deletes will be extended to support (potentially)
multiple shards when column overrides are implemented.

* refactor: runtime write buffers

Switch from using static dispatch, to using a runtime specified
WriteBufferWriting implementation.

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-01-25 15:19:48 +00:00
Dom d63b35d2b5 refactor: remove redundant T: Ord bounds 2022-01-20 12:01:04 +00:00
Dom d710ea48e1 test: hash bucket fixture test
Ensures mapping key K to bucket B remains stable.
2022-01-20 11:35:13 +00:00
Dom 36d50d083f feat: sharder trait & impl
This commit defines the Sharder trait that should allow us to implement
multiple sharding strategies over a defined set of input types (such as
a MutableBatch for writes, DeletePredicate for deletes, etc).

This commit also includes a jump hash implementation that consistently
shards (table name, namespace) tuples to a given shard for all input
types.
2022-01-20 11:10:37 +00:00
Dom 3122aec71a refactor: use static DatabaseName instances 2022-01-20 11:10:37 +00:00
Dom 2cd063698f refactor: API agnostic DML delete handler
Changes the DmlHandler::delete() trait method to accept required params,
and accept a DeletePredicate instead of a HttpDeleteRequest so that it
can be re-used in the gRPC handler.
2022-01-20 11:10:37 +00:00
Dom 6f2e10cab6 feat(router2): implement delete API handler
Adds support for the HTTP v2 delete API endpoint.
2022-01-17 14:57:36 +00:00
Dom 1b7369e743 docs: fix broken doc link 2022-01-17 11:57:32 +00:00
Dom 7badf37250 refactor: db_name -> namespace
Renames all "database name" references to "namespace".
2022-01-17 11:57:32 +00:00
Dom 885c831aff refactor: avoid constructing DmlOperation
Instead of converting the set of MutableBatches into a DmlOperation to
shard into more DmlOperation instances, the sharder can operate directly
on the MutableBatches.
2022-01-17 11:57:32 +00:00
Dom 7f99d18dd1 refactor: clippy 2022-01-17 11:57:31 +00:00
Dom 40a290f6f7 feat: router2 HTTP handlers
Implements the HTTP v2 write API endpoint for router2.
2022-01-17 11:57:28 +00:00
Dom 80b12d417c feat: abstract DML handler
Defines the DmlHandler trait responsible for processing a request in
some abstract way, decoupling the HTTP/gRPC request handlers from the
underlying routing logic.
2022-01-17 11:56:04 +00:00
Andrew Lamb dd23056efd
chore: update datafusion, arrow, prost, tonic, pbjson, etc (#3455)
* chore: update datafusion, arrow, prost, tonic, etc

* fix: update pprof as well

* chore: update hakari

* fix: update pbjson

* chore: update heappy

* fix: hakari

* fix: workaround https://github.com/influxdata/influxdb_iox/issues/3458

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-01-13 17:07:15 +00:00
Dom b9bee7f735 build: update workspace-hack 2022-01-12 15:09:06 +00:00
Dom a8cb8755de feat: new router2 crate
This commit adds an almost-empty router2 crate containing enough of a
skeleton to plumb into the IOx CLI/server runner.
2022-01-12 14:43:10 +00:00