Skip to content

Commit

Permalink
feat: Implement raft via gRPC (#63)
Browse files Browse the repository at this point in the history
* Replace toy-rpc with tonic gRPC

* implement glaredb cli for raft nodes and client

* current progress

* implement begin, allocate_table, and get_schema

* implement scan

* implement insert

* cleanup

* comment out old tests

* clean up ConsensusClient

* Implement change membership command

* rewrite cluster tests to use RaftClientSource

* add protoc to CI

* switch raft to in-memory implementation

* Remove application logic from raft cluster tests

* cargo fmt

* add tracing to RPC impls

* Remove lemur from raft crate

* remove raft_client example

* Apply suggestions from code review

Co-authored-by: Sean Smith <[email protected]>

* remove protoc from ci

* Remove lemur_impl from raft crate

* Store tonic clients instead of endpoint in ConsensusClient

* use shared n_retries

* Add default num_retries

* Apply suggestions from code review

Co-authored-by: Rustom Shareef <[email protected]>

* moved some mod.rs modules into their parent directories

* implement ConsensusClient retry to find leader using macro

* Fix missing delimiter

* fix clippy issues

* rewrite retry_rpc_on_leader macro to evaluate to an expression

* remove panics in rpc server impls

Co-authored-by: Sean Smith <[email protected]>
Co-authored-by: Rustom Shareef <[email protected]>
  • Loading branch information
3 people authored Sep 22, 2022
1 parent 4d0d6db commit 9994be0
Show file tree
Hide file tree
Showing 35 changed files with 1,172 additions and 1,114 deletions.
200 changes: 6 additions & 194 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/arrowstore/src/memory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ impl Index {
for row_idx in 0..batch.num_rows() {
let key = pk_cols
.iter()
.map(|col| ScalarValue::try_from_array(*col, row_idx))
.map(|col| ScalarValue::try_from_array(col, row_idx))
.collect::<Result<Vec<_>, _>>()?;
if pk.insert(key, row_idx).is_some() {
return Err(MemoryError::DuplicatePrimaryKey);
Expand Down
1 change: 1 addition & 0 deletions crates/glaredb/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ path = "src/bin/main.rs"
[dependencies]
logutil = {path = "../logutil"}
lemur = {path = "../lemur"}
raft = {path = "../raft"}
storageengine = {path = "../storageengine"}
sqlexec = {path = "../sqlexec"}
pgsrv = {path = "../pgsrv"}
Expand Down
Loading

0 comments on commit 9994be0

Please sign in to comment.