|
| 1 | +## v0.9.6 |
| 2 | + |
| 3 | +Summary: |
| 4 | + |
| 5 | +- Added: |
| 6 | + - [5776139d](https://github.com/datafuselabs/openraft/commit/5776139d8ac15d94a800d1e0cf073dea5a7b216e) Add `#[since(version="1.0")]` to specify first version of a feature. |
| 7 | + - [b172dc8e](https://github.com/datafuselabs/openraft/commit/b172dc8e261f4f2b1149c3ada70524cdf520d5b3) Add macro `expand!()` to expand a template. |
| 8 | +- Improved: |
| 9 | + - [99596c75](https://github.com/datafuselabs/openraft/commit/99596c754e19792b97737105acea257d70d1d6b6) `declare_raft_types` allows the types in any order. |
| 10 | +- Fixed: |
| 11 | + - [14d42e4f](https://github.com/datafuselabs/openraft/commit/14d42e4f33581dc0ea9c4eeaf0ff00ebec85dbb2) Load mebmership since `last_applied`, not `last_membership.index` on startup. |
| 12 | + |
| 13 | +Detail: |
| 14 | + |
| 15 | +### Added: |
| 16 | + |
| 17 | +- 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 |
| 18 | + |
| 19 | + `#[since(version = "1.0.0")]` adds a doc line `/// Since: Version(1.0.0)`. |
| 20 | + |
| 21 | + Example: |
| 22 | + |
| 23 | + ```rust,ignore |
| 24 | + /// Foo function |
| 25 | + /// |
| 26 | + /// Does something. |
| 27 | + #[since(version = "1.0.0")] |
| 28 | + fn foo() {} |
| 29 | + ``` |
| 30 | +
|
| 31 | + The above code will be transformed into: |
| 32 | +
|
| 33 | + ```rust,ignore |
| 34 | + /// Foo function |
| 35 | + /// |
| 36 | + /// Does something. |
| 37 | + /// |
| 38 | + /// Since: Version(1.0.0) |
| 39 | + fn foo() {} |
| 40 | + ``` |
| 41 | +
|
| 42 | +- Added: [b172dc8e](https://github.com/datafuselabs/openraft/commit/b172dc8e261f4f2b1149c3ada70524cdf520d5b3) Add macro `expand!()` to expand a template; by 张炎泼; 2024-04-13 |
| 43 | +
|
| 44 | + `expand!()` renders a template with arguments multiple times. |
| 45 | +
|
| 46 | + ### Example: |
| 47 | +
|
| 48 | + ```rust,ignore |
| 49 | + expand!(KEYED, // ignore duplicate by `K` |
| 50 | + (K, T, V) => {let K: T = V;}, |
| 51 | + (a, u64, 1), |
| 52 | + (a, u32, 2), // duplicate `a` will be ignored |
| 53 | + (c, Vec<u8>, vec![1,2]) |
| 54 | + ); |
| 55 | + ``` |
| 56 | +
|
| 57 | + The above code will be transformed into: |
| 58 | +
|
| 59 | + ```rust,ignore |
| 60 | + let a: u64 = 1; |
| 61 | + let c: Vec<u8> = vec![1, 2]; |
| 62 | + ``` |
| 63 | +
|
| 64 | +### Improved: |
| 65 | +
|
| 66 | +- Improved: [99596c75](https://github.com/datafuselabs/openraft/commit/99596c754e19792b97737105acea257d70d1d6b6) `declare_raft_types` allows the types in any order; by 张炎泼; 2024-04-13 |
| 67 | +
|
| 68 | + By rewriting the template expanding part with a `#[proc_macro]` |
| 69 | + `expand!()` defined in `openraft_macros`, `declare_raft_types` |
| 70 | + does not require the types in fixed order: |
| 71 | +
|
| 72 | + Example: |
| 73 | +
|
| 74 | + ``` |
| 75 | + declare_raft_types!(All: |
| 76 | + D = (), |
| 77 | + NodeId = u64, |
| 78 | + R = (), |
| 79 | + Node = (), |
| 80 | + ``` |
| 81 | +
|
| 82 | +### Fixed: |
| 83 | +
|
| 84 | +- Fixed: [14d42e4f](https://github.com/datafuselabs/openraft/commit/14d42e4f33581dc0ea9c4eeaf0ff00ebec85dbb2) Load mebmership since `last_applied`, not `last_membership.index` on startup; by 张炎泼; 2024-04-25 |
| 85 | +
|
| 86 | + Modify `StorageHelper::last_membership_in_log()` to scan the log |
| 87 | + starting from the last applied index rather than the index of the last |
| 88 | + applied membership log. This change reduces unnecessary I/O operations |
| 89 | + during startup, previously caused by scanning from an incorrect starting |
| 90 | + point. |
| 91 | +
|
1 | 92 | ## v0.9.5
|
2 | 93 |
|
3 | 94 | Summary:
|
|
0 commit comments