diff --git a/binding/python/Cargo.lock b/binding/python/Cargo.lock index c064e24b..005d17f4 100644 --- a/binding/python/Cargo.lock +++ b/binding/python/Cargo.lock @@ -65,6 +65,55 @@ dependencies = [ "libc", ] +[[package]] +name = "anstream" +version = "0.6.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" + +[[package]] +name = "anstyle-parse" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a" +dependencies = [ + "windows-sys", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8" +dependencies = [ + "anstyle", + "windows-sys", +] + [[package]] name = "anyhow" version = "1.0.86" @@ -79,26 +128,15 @@ checksum = "69f7f8c3906b62b754cd5326047894316021dcfe5a194c8ea52bdd94934a3457" [[package]] name = "async-trait" -version = "0.1.81" +version = "0.1.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" +checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" dependencies = [ "proc-macro2", "quote", "syn 2.0.72", ] -[[package]] -name = "atty" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -dependencies = [ - "hermit-abi 0.1.19", - "libc", - "winapi", -] - [[package]] name = "autocfg" version = "1.3.0" @@ -218,9 +256,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.6.1" +version = "1.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a12916984aab3fa6e39d655a33e09c0071eb36d6ab3aea5c2d78551f1df6d952" +checksum = "428d9aa8fbc0670b7b8d6030a7fadd0f86151cae55e4dbbece15f3780a3dfaf3" [[package]] name = "cargo-lock" @@ -262,28 +300,50 @@ dependencies = [ [[package]] name = "clap" -version = "3.2.25" +version = "4.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ea181bf566f71cb9a5d17a59e1871af638180a18fb0035c92ae62b705207123" +checksum = "b0956a43b323ac1afaffc053ed5c4b7c1f1800bacd1683c353aabbb752515dd3" dependencies = [ - "atty", - "bitflags 1.3.2", + "clap_builder", + "clap_derive", +] + +[[package]] +name = "clap_builder" +version = "4.5.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d72166dd41634086d5803a47eb71ae740e61d84709c36f3c34110173db3961b" +dependencies = [ + "anstream", + "anstyle", "clap_lex", - "indexmap 1.9.3", "strsim", - "termcolor", - "textwrap", ] [[package]] -name = "clap_lex" -version = "0.2.4" +name = "clap_derive" +version = "4.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5" +checksum = "4ac6a0c7b1a9e9a5186361f67dfa1b88213572f427fb9ab038efb2bd8c582dab" dependencies = [ - "os_str_bytes", + "heck 0.5.0", + "proc-macro2", + "quote", + "syn 2.0.72", ] +[[package]] +name = "clap_lex" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" + +[[package]] +name = "colorchoice" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" + [[package]] name = "core-foundation-sys" version = "0.8.6" @@ -604,11 +664,17 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + [[package]] name = "heed" -version = "0.20.3" +version = "0.20.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bc30da4a93ff8cb98e535d595d6de42731d4719d707bc1c86f579158751a24e" +checksum = "7d4f449bab7320c56003d37732a917e18798e2f1709d80263face2b4f9436ddb" dependencies = [ "bitflags 2.6.0", "byteorder", @@ -642,15 +708,6 @@ dependencies = [ "serde_json", ] -[[package]] -name = "hermit-abi" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" -dependencies = [ - "libc", -] - [[package]] name = "hermit-abi" version = "0.3.9" @@ -807,11 +864,17 @@ version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" dependencies = [ - "hermit-abi 0.3.9", + "hermit-abi", "libc", "windows-sys", ] +[[package]] +name = "is_terminal_polyfill" +version = "1.70.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" + [[package]] name = "itertools" version = "0.10.5" @@ -829,9 +892,9 @@ checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "jopemachine-raft" -version = "0.7.7" +version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4326410d956002dc7adf04f299994c869a961d27d4fdec27a3310c4c209bd8fd" +checksum = "57206b3af8ccd4a755cac94abb0f0692544dfb10869f64dbc19b69ab73c6e251" dependencies = [ "bytes", "fxhash", @@ -910,9 +973,9 @@ checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" [[package]] name = "lmdb-master-sys" -version = "0.2.2" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57640c190703d5ccf4a86aff4aeb749b2d287a8cb1723c76b51f39d77ab53b24" +checksum = "472c3760e2a8d0f61f322fb36788021bb36d573c502b50fa3e2bcaac3ec326c9" dependencies = [ "cc", "doxygen-rs", @@ -977,7 +1040,7 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4569e456d394deccd22ce1c1913e6ea0e54519f577285001215d33557431afe4" dependencies = [ - "hermit-abi 0.3.9", + "hermit-abi", "libc", "wasi", "windows-sys", @@ -1019,12 +1082,6 @@ version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" -[[package]] -name = "os_str_bytes" -version = "6.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2355d85b9a3786f481747ced0e0ff2ba35213a1f9bd406ed906554d7af805a1" - [[package]] name = "page_size" version = "0.6.0" @@ -1226,7 +1283,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "119533552c9a7ffacc21e099c24a0ac8bb19c2a2a3f363de84cd9b844feab270" dependencies = [ "bytes", - "heck", + "heck 0.4.1", "itertools", "lazy_static", "log", @@ -1352,7 +1409,7 @@ version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c7e9b68bb9c3149c5b0cade5d07f953d6d125eb4337723c4ccdb665f1f96185" dependencies = [ - "heck", + "heck 0.4.1", "proc-macro2", "pyo3-build-config", "quote", @@ -1392,9 +1449,9 @@ dependencies = [ [[package]] name = "raftify" -version = "0.1.67" +version = "0.1.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47b01df0495a4425c6a30a51760c21883c078cc725365053875f645084191556" +checksum = "f42c008e7e6a5b6431062fac27c4b61e7a78a7e87feeffba5d44d80cfdd657d8" dependencies = [ "async-trait", "bincode", @@ -1420,7 +1477,7 @@ dependencies = [ [[package]] name = "raftify-py" -version = "0.1.67" +version = "0.1.78" dependencies = [ "async-trait", "bincode", @@ -1432,6 +1489,7 @@ dependencies = [ "pyo3-asyncio", "pythonize", "raftify", + "raftify_cli", "serde", "slog", "slog-async", @@ -1442,6 +1500,22 @@ dependencies = [ "tokio", ] +[[package]] +name = "raftify_cli" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89fca418beb04ff1d175598c386db1d8bc40b20b0f2a1e645fe9d5bb0789a7d6" +dependencies = [ + "built", + "clap", + "log", + "raftify", + "serde", + "serde_json", + "slog", + "tonic-build", +] + [[package]] name = "rand" version = "0.8.5" @@ -1757,9 +1831,9 @@ dependencies = [ [[package]] name = "strsim" -version = "0.10.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "syn" @@ -1833,21 +1907,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "termcolor" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "textwrap" -version = "0.16.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23d434d3f8967a09480fb04132ebe0a3e088c173e6d0ee7897abbdf4eab0f8b9" - [[package]] name = "thiserror" version = "1.0.63" @@ -1926,9 +1985,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.39.2" +version = "1.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "daa4fb1bc778bd6f04cbfc4bb2d06a7396a8f299dc33ea1900cedaa316f467b1" +checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998" dependencies = [ "backtrace", "bytes", @@ -2163,6 +2222,12 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "utf8parse" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" + [[package]] name = "version_check" version = "0.9.5" @@ -2272,15 +2337,6 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" -[[package]] -name = "winapi-util" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" -dependencies = [ - "windows-sys", -] - [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" diff --git a/binding/python/Cargo.toml b/binding/python/Cargo.toml index 4713fb30..eb2718ec 100644 --- a/binding/python/Cargo.toml +++ b/binding/python/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "raftify-py" -version = "0.1.67" +version = "0.1.78" authors = ["Lablup Inc."] license = "Apache-2.0" repository = "https://github.com/lablup/raftify" @@ -19,7 +19,8 @@ pyo3-asyncio = { version = "0.20.0", features = ["tokio-runtime"] } pythonize = "0.20.0" tokio = { version = "1.4", features = ["full"] } async-trait = "0.1.48" -raftify = { version = "0.1.67", default-features = false } +raftify = { version = "0.1.78", features = ["heed_storage"] , default-features = false } +raftify_cli = { version = "0.1.1" } slog = { version = "2.2", features = ["max_level_trace", "release_max_level_trace"] } slog-envlogger = "2.1.0" slog-term = "2.9.0" diff --git a/binding/python/src/bindings/state_machine.rs b/binding/python/src/bindings/abstract_types.rs similarity index 97% rename from binding/python/src/bindings/state_machine.rs rename to binding/python/src/bindings/abstract_types.rs index a9e63132..723aff0a 100644 --- a/binding/python/src/bindings/state_machine.rs +++ b/binding/python/src/bindings/abstract_types.rs @@ -2,7 +2,13 @@ use async_trait::async_trait; use once_cell::sync::Lazy; use pyo3::{prelude::*, types::PyBytes}; use pyo3_asyncio::TaskLocals; -use raftify::{AbstractLogEntry, AbstractStateMachine, Error, Result}; +use raftify::{ + raft::{ + prelude::{ConfState, Entry, HardState, Snapshot}, + GetEntriesContext, RaftState, Storage, + }, + AbstractLogEntry, AbstractStateMachine, Error, Result, +}; use std::{fmt, sync::Mutex}; use super::{ diff --git a/binding/python/src/bindings/cli.rs b/binding/python/src/bindings/cli.rs index 79d4601f..06bb943e 100644 --- a/binding/python/src/bindings/cli.rs +++ b/binding/python/src/bindings/cli.rs @@ -1,14 +1,17 @@ use pyo3::prelude::*; use pyo3_asyncio::tokio::future_into_py; -use raftify::cli::cli_handler; +use raftify::HeedStorage; +use raftify_cli::cli_handler; -use super::state_machine::{PyFSM, PyLogEntry}; +use super::abstract_types::{PyFSM, PyLogEntry}; // When args is None, std::env::args is automatically used. #[pyfunction] pub fn cli_main<'a>(args: Option>, py: Python<'a>) -> PyResult<&'a PyAny> { future_into_py(py, async move { - cli_handler::(args).await.unwrap(); + cli_handler::(args) + .await + .unwrap(); Ok(()) }) } diff --git a/binding/python/src/bindings/config.rs b/binding/python/src/bindings/config.rs index 1ae0ec92..dbb2cae9 100644 --- a/binding/python/src/bindings/config.rs +++ b/binding/python/src/bindings/config.rs @@ -15,10 +15,9 @@ pub struct PyConfig { pub lmdb_map_size: u64, pub cluster_id: String, pub conf_change_request_timeout: f32, + pub bootstrap_from_snapshot: bool, pub initial_peers: Option, pub snapshot_interval: Option, - pub restore_wal_from: Option, - pub restore_wal_snapshot_from: Option, } #[pymethods] @@ -36,8 +35,7 @@ impl PyConfig { conf_change_request_timeout: Option, initial_peers: Option, snapshot_interval: Option, - restore_wal_from: Option, - restore_wal_snapshot_from: Option, + bootstrap_from_snapshot: Option, ) -> Self { let cfg = Config::default(); @@ -56,8 +54,8 @@ impl PyConfig { conf_change_request_timeout.unwrap_or(cfg.conf_change_request_timeout); let initial_peers = initial_peers; let snapshot_interval = snapshot_interval; - let restore_wal_from = restore_wal_from; - let restore_wal_snapshot_from = restore_wal_snapshot_from; + let bootstrap_from_snapshot = + bootstrap_from_snapshot.unwrap_or(cfg.bootstrap_from_snapshot); Self { raft_config, @@ -71,8 +69,7 @@ impl PyConfig { conf_change_request_timeout, initial_peers, snapshot_interval, - restore_wal_from, - restore_wal_snapshot_from, + bootstrap_from_snapshot, } } } @@ -91,8 +88,7 @@ impl From for Config { conf_change_request_timeout: config.conf_change_request_timeout, initial_peers: config.initial_peers.map(|peers| peers.inner), raft_config: config.raft_config.inner, - restore_wal_from: config.restore_wal_from, - restore_wal_snapshot_from: config.restore_wal_snapshot_from, + bootstrap_from_snapshot: config.bootstrap_from_snapshot, } } } diff --git a/binding/python/src/bindings/role.rs b/binding/python/src/bindings/initial_role.rs similarity index 100% rename from binding/python/src/bindings/role.rs rename to binding/python/src/bindings/initial_role.rs diff --git a/binding/python/src/bindings/mod.rs b/binding/python/src/bindings/mod.rs index 20011073..44c3c787 100644 --- a/binding/python/src/bindings/mod.rs +++ b/binding/python/src/bindings/mod.rs @@ -1,3 +1,4 @@ +pub mod abstract_types; pub mod cli; pub mod cluster_join_ticket; pub mod confchange_request; @@ -11,7 +12,6 @@ pub mod raft_bootstrapper; pub mod raft_client; pub mod raft_node; pub mod raft_rs; -pub mod role; +pub mod initial_role; pub mod slogger; -pub mod state_machine; pub mod utils; diff --git a/binding/python/src/bindings/peer.rs b/binding/python/src/bindings/peer.rs index 5e7ad650..9f34a4e4 100644 --- a/binding/python/src/bindings/peer.rs +++ b/binding/python/src/bindings/peer.rs @@ -2,7 +2,7 @@ use pyo3::prelude::*; use pyo3_asyncio::tokio::future_into_py; use raftify::Peer; -use super::role::PyInitialRole; +use super::initial_role::PyInitialRole; #[derive(Clone)] #[pyclass(name = "Peer")] diff --git a/binding/python/src/bindings/peers.rs b/binding/python/src/bindings/peers.rs index f5bed161..a8400413 100644 --- a/binding/python/src/bindings/peers.rs +++ b/binding/python/src/bindings/peers.rs @@ -7,7 +7,7 @@ use raftify::Peers; use serde::{Deserialize, Serialize}; use std::{collections::HashMap, hash::BuildHasherDefault}; -use super::{peer::PyPeer, role::PyInitialRole}; +use super::{peer::PyPeer, initial_role::PyInitialRole}; #[derive(Serialize, Deserialize, Clone)] #[pyclass(dict, name = "Peers")] diff --git a/binding/python/src/bindings/raft_bootstrapper.rs b/binding/python/src/bindings/raft_bootstrapper.rs index b9ec6adf..9600fc03 100644 --- a/binding/python/src/bindings/raft_bootstrapper.rs +++ b/binding/python/src/bindings/raft_bootstrapper.rs @@ -1,20 +1,20 @@ use pyo3::{exceptions::PyException, prelude::*, types::PyString}; use pyo3_asyncio::tokio::future_into_py; -use raftify::Raft; +use raftify::{HeedStorage, Raft}; use std::sync::Arc; use super::{ + abstract_types::{PyFSM, PyLogEntry}, cluster_join_ticket::PyClusterJoinTicket, config::PyConfig, logger::PyLogger, raft_node::PyRaftNode, - state_machine::{PyFSM, PyLogEntry}, }; #[derive(Clone)] #[pyclass(name = "Raft")] pub struct PyRaftFacade { - inner: Raft, + inner: Raft, } #[pymethods] @@ -30,9 +30,16 @@ impl PyRaftFacade { let fsm = PyFSM::new(fsm); let addr = addr.to_string(); + let storage = HeedStorage::create( + &config.log_dir.clone(), + &config.clone().into(), + Arc::new(PyLogger::new(logger.clone())), + ).expect("Failed to create heed storage"); + let raft = Raft::bootstrap( node_id, addr, + storage, fsm, config.into(), Arc::new(PyLogger::new(logger)), @@ -49,9 +56,12 @@ impl PyRaftFacade { py: Python<'a>, ) -> PyResult<&'a PyAny> { future_into_py(py, async move { - let ticket = Raft::::request_id(raft_addr, peer_addr.to_owned()) - .await - .unwrap(); + let ticket = Raft::::request_id( + raft_addr, + peer_addr.to_owned(), + ) + .await + .unwrap(); Ok(PyClusterJoinTicket { inner: ticket }) }) } diff --git a/binding/python/src/bindings/raft_node.rs b/binding/python/src/bindings/raft_node.rs index 5e422ea6..282ecd70 100644 --- a/binding/python/src/bindings/raft_node.rs +++ b/binding/python/src/bindings/raft_node.rs @@ -1,23 +1,23 @@ use pyo3::{prelude::*, types::PyString}; use pyo3_asyncio::tokio::future_into_py; -use raftify::RaftNode; +use raftify::{HeedStorage, RaftNode}; use super::{ + abstract_types::{PyFSM, PyLogEntry}, cluster_join_ticket::PyClusterJoinTicket, peers::PyPeers, raft_rs::eraftpb::{conf_change_v2::PyConfChangeV2, message::PyMessage}, - role::PyInitialRole, - state_machine::{PyFSM, PyLogEntry}, + initial_role::PyInitialRole, }; #[derive(Clone)] #[pyclass(name = "RaftNode")] pub struct PyRaftNode { - pub inner: RaftNode, + pub inner: RaftNode, } impl PyRaftNode { - pub fn new(inner: RaftNode) -> Self { + pub fn new(inner: RaftNode) -> Self { PyRaftNode { inner } } } diff --git a/binding/python/src/lib.rs b/binding/python/src/lib.rs index d8fe56e3..46af3a2d 100644 --- a/binding/python/src/lib.rs +++ b/binding/python/src/lib.rs @@ -20,7 +20,7 @@ fn raftify(py: Python, m: &PyModule) -> PyResult<()> { m.add_class::()?; m.add_class::()?; m.add_class::()?; - m.add_class::()?; + m.add_class::()?; m.add_class::()?; m.add_class::()?; @@ -37,12 +37,12 @@ fn raftify(py: Python, m: &PyModule) -> PyResult<()> { m.add_function(wrap_pyfunction!(bindings::cli::cli_main, m)?)?; m.add_function(wrap_pyfunction!( - bindings::state_machine::set_log_entry_deserializer, + bindings::abstract_types::set_log_entry_deserializer, m )?)?; m.add_function(wrap_pyfunction!( - bindings::state_machine::set_fsm_deserializer, + bindings::abstract_types::set_fsm_deserializer, m )?)?; diff --git a/raftify-cli/src/commands/debug.rs b/raftify-cli/src/commands/debug.rs index b8b422b3..5ecbc8f6 100644 --- a/raftify-cli/src/commands/debug.rs +++ b/raftify-cli/src/commands/debug.rs @@ -29,7 +29,7 @@ pub fn debug_persisted(path: &str, logger: slog::Logg }), )?, StorageType::InMemory => { - panic!("Inmemory storage does not support this feature"); + panic!("InMemory storage does not support this feature"); } _ => { panic!("Unsupported storage type");