Feature flags
By default openraft enables no features.
-
bt
: attaches backtrace to generated errors. -
serde
: derivesserde::Serialize, serde::Deserialize
for type that are used in storage and network, such asVote
orAppendEntriesRequest
. -
single-term-leader
: allows only one leader to be elected in eachterm
. This is the standard raft policy, which increases election confliction rate but reduceLogId
((term, node_id, index)
to(term, index)
) size. Read more about how it is implemented invote
-
compat-07
: provides additional data types to build v0.7 compatible RaftStorage.compat-07 = ["compat", "single-term-leader", "serde", "dep:or07", "compat-07-testing"] compat-07-testing = ["dep:tempdir", "anyhow", "dep:serde_json"]