-
Notifications
You must be signed in to change notification settings - Fork 157
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
14d42e4
commit 061218a
Showing
2 changed files
with
179 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
Summary: | ||
|
||
- Added: | ||
- [5776139d](https://github.com/datafuselabs/openraft/commit/5776139d8ac15d94a800d1e0cf073dea5a7b216e) Add `#[since(version="1.0")]` to specify first version of a feature. | ||
- [b172dc8e](https://github.com/datafuselabs/openraft/commit/b172dc8e261f4f2b1149c3ada70524cdf520d5b3) Add macro `expand!()` to expand a template. | ||
- Improved: | ||
- [99596c75](https://github.com/datafuselabs/openraft/commit/99596c754e19792b97737105acea257d70d1d6b6) `declare_raft_types` allows the types in any order. | ||
- Fixed: | ||
- [14d42e4f](https://github.com/datafuselabs/openraft/commit/14d42e4f33581dc0ea9c4eeaf0ff00ebec85dbb2) Load mebmership since `last_applied`, not `last_membership.index` on startup. | ||
|
||
Detail: | ||
|
||
### Added: | ||
|
||
- Added: [5776139d](https://github.com/datafuselabs/openraft/commit/5776139d8ac15d94a800d1e0cf073dea5a7b216e) 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: | ||
|
||
```rust,ignore | ||
/// Foo function | ||
/// | ||
/// Does something. | ||
#[since(version = "1.0.0")] | ||
fn foo() {} | ||
``` | ||
|
||
The above code will be transformed into: | ||
|
||
```rust,ignore | ||
/// Foo function | ||
/// | ||
/// Does something. | ||
/// | ||
/// Since: Version(1.0.0) | ||
fn foo() {} | ||
``` | ||
|
||
- Added: [b172dc8e](https://github.com/datafuselabs/openraft/commit/b172dc8e261f4f2b1149c3ada70524cdf520d5b3) Add macro `expand!()` to expand a template; by 张炎泼; 2024-04-13 | ||
|
||
`expand!()` renders a template with arguments multiple times. | ||
|
||
### Example: | ||
|
||
```rust,ignore | ||
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: | ||
|
||
```rust,ignore | ||
let a: u64 = 1; | ||
let c: Vec<u8> = vec![1, 2]; | ||
``` | ||
|
||
### Improved: | ||
|
||
- Improved: [99596c75](https://github.com/datafuselabs/openraft/commit/99596c754e19792b97737105acea257d70d1d6b6) `declare_raft_types` allows the types in any order; by 张炎泼; 2024-04-13 | ||
|
||
By rewriting the template expanding part with a `#[proc_macro]` | ||
`expand!()` defined in `openraft_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](https://github.com/datafuselabs/openraft/commit/14d42e4f33581dc0ea9c4eeaf0ff00ebec85dbb2) Load mebmership since `last_applied`, not `last_membership.index` on startup; by 张炎泼; 2024-04-25 | ||
|
||
Modify `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. |