-
Notifications
You must be signed in to change notification settings - Fork 153
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #777 from drmingdrmer/51-v2-rocks-store
Refactor: add example stores/rocksstore using v2 storage
- Loading branch information
Showing
11 changed files
with
687 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Storage implementations. | ||
|
||
These crates are not members of the workspace, because they enable different features. | ||
E.g., `rocksstore-v2` enables `storage-v2` feature. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
[package] | ||
name = "openraft-rocksstore-v2" | ||
description = "A rocksdb based implementation of the `openraft::RaftStorage` trait." | ||
documentation = "https://docs.rs/openraft-rocksstore" | ||
readme = "README.md" | ||
|
||
version = "0.1.0" | ||
edition = "2021" | ||
authors = [ | ||
"drdr xp <drdr.xp@gmail.com>", | ||
] | ||
categories = ["algorithms", "asynchronous", "data-structures"] | ||
homepage = "https://github.com/datafuselabs/openraft" | ||
keywords = ["raft", "consensus"] | ||
license = "MIT/Apache-2.0" | ||
repository = "https://github.com/datafuselabs/openraft" | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[dependencies] | ||
openraft = { path= "../../openraft", version = "0.8.4", features=["serde", "storage-v2"] } | ||
|
||
rocksdb = "0.20.1" | ||
rand = "*" | ||
byteorder = "1.4.3" | ||
serde = { version = "1.0.114", features = ["derive"] } | ||
serde_json = "1.0.57" | ||
tracing = "0.1.29" | ||
|
||
[dev-dependencies] | ||
async-trait = { version = "0.1.36" } | ||
tempfile = { version = "3.4.0" } | ||
|
||
[package.metadata.docs.rs] | ||
all-features = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# openraft-rocksstore-v2 | ||
|
||
This is an example of v2 storage [`RaftLogStorage`] and [`RaftStateMachine`] implementation | ||
with [`rocksdb`](https://docs.rs/rocksdb/latest/rocksdb/) based on [openraft-0.8](https://github.com/datafuselabs/openraft/tree/release-0.8). | ||
|
||
This crate is built mainly for testing or demonstrating purpose.:) |
Oops, something went wrong.