Skip to content

Commit

Permalink
Add single node Raft metadata store with memory storage
Browse files Browse the repository at this point in the history
This commit adds the skeleton of the Raft metadata store. At the moment
only a single node with memory storage is supported.

This fixes restatedev#1785.
  • Loading branch information
tillrohrmann committed Nov 28, 2024
1 parent eda931e commit cf85c41
Show file tree
Hide file tree
Showing 9 changed files with 874 additions and 28 deletions.
204 changes: 204 additions & 0 deletions Cargo.lock

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

6 changes: 6 additions & 0 deletions crates/metadata-store/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ restate-rocksdb = { workspace = true }
restate-types = { workspace = true }

anyhow = { workspace = true }
assert2 = { workspace = true }
async-trait = { workspace = true }
bytes = { workspace = true }
bytestring = { workspace = true }
Expand All @@ -29,9 +30,12 @@ hyper = { workspace = true }
hyper-util = { workspace = true }
prost = { workspace = true }
prost-types = { workspace = true }
protobuf = "2.28.0"
raft = { version = "0.7.0" }
rocksdb = { workspace = true }
schemars = { workspace = true, optional = true }
serde = { workspace = true }
slog = { version = "2.7.0" }
static_assertions = { workspace = true }
thiserror = { workspace = true }
tokio = { workspace = true }
Expand All @@ -43,6 +47,8 @@ tonic-health = { workspace = true }
tower = { workspace = true }
tower-http = { workspace = true, features = ["trace"] }
tracing = { workspace = true }
tracing-slog = { version = "0.3.0" }
ulid = { workspace = true, features = ["serde"] }

[dev-dependencies]
restate-core = { workspace = true, features = ["test-util"] }
Expand Down
2 changes: 1 addition & 1 deletion crates/metadata-store/src/grpc/handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ impl MetadataStoreSvc for MetadataStoreHandler {
impl From<RequestError> for Status {
fn from(err: RequestError) -> Self {
match err {
RequestError::FailedPrecondition(msg) => Status::failed_precondition(msg),
RequestError::FailedPrecondition(msg) => Status::failed_precondition(msg.to_string()),
err => Status::internal(err.to_string()),
}
}
Expand Down
Loading

0 comments on commit cf85c41

Please sign in to comment.