v0.9.6
Summary:
- Added:
- Improved:
- 99596c75
declare_raft_types
allows the types in any order.
- 99596c75
- Fixed:
- 14d42e4f Load mebmership since
last_applied
, notlast_membership.index
on startup.
- 14d42e4f Load mebmership since
Detail:
Added:
-
Added: 5776139d Add
#[since(version="1.0")]
to specify first version of a feature; by 张炎泼; 2024-04-12#[since(version = "1.0.0")]
adds a doc line/// Since: Version(1.0.0)
.Example:
/// Foo function /// /// Does something. #[since(version = "1.0.0")] fn foo() {}
The above code will be transformed into:
/// Foo function /// /// Does something. /// /// Since: Version(1.0.0) fn foo() {}
-
Added: b172dc8e Add macro
expand!()
to expand a template; by 张炎泼; 2024-04-13expand!()
renders a template with arguments multiple times.Example:
expand!(KEYED, // ignore duplicate by `K` (K, T, V) => {let K: T = V;}, (a, u64, 1), (a, u32, 2), // duplicate `a` will be ignored (c, Vec<u8>, vec![1,2]) );
The above code will be transformed into:
let a: u64 = 1; let c: Vec<u8> = vec![1, 2];
Improved:
-
Improved: 99596c75
declare_raft_types
allows the types in any order; by 张炎泼; 2024-04-13By rewriting the template expanding part with a
#[proc_macro]
expand!()
defined inopenraft_macros
,declare_raft_types
does not require the types in fixed order:Example:
declare_raft_types!(All: D = (), NodeId = u64, R = (), Node = (),
Fixed:
-
Fixed: 14d42e4f Load mebmership since
last_applied
, notlast_membership.index
on startup; by 张炎泼; 2024-04-25Modify
StorageHelper::last_membership_in_log()
to scan the log
starting from the last applied index rather than the index of the last
applied membership log. This change reduces unnecessary I/O operations
during startup, previously caused by scanning from an incorrect starting
point.