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 Jan 20, 2025
1 parent c32d016 commit 3578c89
Show file tree
Hide file tree
Showing 12 changed files with 922 additions and 150 deletions.
205 changes: 205 additions & 0 deletions Cargo.lock

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

7 changes: 7 additions & 0 deletions crates/metadata-store/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,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 @@ -28,14 +29,20 @@ futures = { workspace = true }
http = { workspace = true }
humantime = { 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 }
tonic = { workspace = true, features = ["transport", "codegen", "prost"] }
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 3578c89

Please sign in to comment.