-
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
dc18dc6
commit 3d35ca9
Showing
2 changed files
with
89 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,43 @@ | ||
Summary: | ||
|
||
- Improved: | ||
- [536a435e](https://github.com/datafuselabs/openraft/commit/536a435e2fccc98c37a776322d0f7e4aba26c179) Chunk read log entry and check range on startup. | ||
- [dc18dc6f](https://github.com/datafuselabs/openraft/commit/dc18dc6f5fed49c1a4717133fbc489eb57efda79) remove `Copy` bound from `NodeId`. | ||
|
||
Detail: | ||
|
||
### Improved: | ||
|
||
- Improved: [536a435e](https://github.com/datafuselabs/openraft/commit/536a435e2fccc98c37a776322d0f7e4aba26c179) Chunk read log entry and check range on startup; by 张炎泼; 2024-09-14 | ||
|
||
- Implement chunk-based reading of committed log entries when | ||
re-applying to state machine upon startup. | ||
|
||
- Add validation for log entry indexes, to avoid applying wrong entries | ||
to state machine. | ||
|
||
- Improved: [dc18dc6f](https://github.com/datafuselabs/openraft/commit/dc18dc6f5fed49c1a4717133fbc489eb57efda79) remove `Copy` bound from `NodeId`; by 张炎泼; 2024-10-14 | ||
|
||
The `NodeId` type is currently defined as: | ||
|
||
```rust | ||
type NodeId: .. + Copy + .. + 'static; | ||
``` | ||
|
||
This commit removes the `Copy` bound from `NodeId`. | ||
This modification will allow the use of non-`Copy` types as `NodeId`, | ||
providing greater flexibility for applications that prefer | ||
variable-length strings or other non-`Copy` types for node | ||
identification. | ||
|
||
This change maintain compatibility by updating derived `Copy` | ||
implementations with manual implementations: | ||
|
||
```rust | ||
// Before | ||
#[derive(Copy...)] | ||
pub struct LogId<NID: NodeId> {} | ||
|
||
// After | ||
impl<NID: Copy> Copy for LogId<NID> {} | ||
``` |