These 11 commits are when the Protocol Buffers files have changed:
Commit: | b3b0af0 | |
---|---|---|
Author: | 张炎泼 | |
Committer: | 张炎泼 |
Doc: Finish gRPC example raft-kv-memstore-grpc A rust test `tests/test_cluster.rs` brings up a 3 nodes cluster and executes write and read on it. - Fix: #1287
The documentation is generated from this commit.
Commit: | 1e883d7 | |
---|---|---|
Author: | 张炎泼 | |
Committer: | 张炎泼 |
Refactor: example raft-kv-memstore-grpc Move protobuf types to 3 files: - `app.proto` defines application API and types. - `raft.proto` defines Raft-protocol API and types. - `management.proto` defines non-app management API and types, such as membership config API. - Part of #1287
Commit: | 7bebecb | |
---|---|---|
Author: | 张炎泼 | |
Committer: | 张炎泼 |
Change: Refine Log Entry Traits This commit refines the `RaftEntry` and related traits, to better support application defined log `Entry` type. Key Changes: 1. Remove `FromAppData` trait: - The `FromAppData` trait, which was used to create log `Entry` from application data, is removed. - Applications should now implement the new `RaftEntry::new()` method to create log entries directly. 2. Remove `RaftLogId` trait, it becomes an internal trait. 3. Update `RaftEntry` trait: - The `RaftEntry` trait no longer requires `RaftLogId` (due to its redefinition) and now mandates the implementation of: - `new()`: For creating a log `Entry`. - `log_id_parts()`: To return references to the log ID's committed leader ID(term) and index. - `set_log_id()`: To update the log entry's ID. - Default methods are provided: - `new_blank()`, `new_normal()`, `new_membership()` for creating different types of log entries. - `log_id()` returns an owned `LogId` instance. - `index()` returns the index of the log entry. 4. Introduce `RefLogId`: - `RefLogId` is a reference-based representation of a log ID, complementing the existing `LogIdOf<C>` (a storage-based implementation). - `RefLogId` adds system-defined properties (e.g., `Ord` implementation) while referencing an existing `LogIdOf<C>`. - Internal components now use `RefLogId` where possible, improving flexibility and consistency. 5. Update example `raft-kv-memstore-grpc`: - Updated to implement log `Entry` and related types using protobuf, including state machine and RPC message types. - Added snapshot streaming transmission implementation. - Removed `serde` dependency from the example. - Part of #1278. --- Upgrade tips: 1. For Applications with Custom `RaftEntry` Implementations: If you've declared a custom `RaftEntry` (e.g., `declare_raft_types!(MyTypes: Entry = MyEntry)`): - Remove the implementation of `FromAppData`. - Implement the following new methods: - `new()` - `log_id_parts()` - `set_log_id()` 2. For Applications Using OpenRaft's Default `Entry`: - No changes are required.
Commit: | f18e3cf | |
---|---|---|
Author: | 张炎泼 | |
Committer: | 张炎泼 |
Refactor: update gRPC example to adapt to `LeaderId` changes - Update the `raft-kv-memstore-grpc` example to use the protobuf-defined `LeaderId`. - Automatically implement `CommittedLeaderId` for all types. - Add `openraft::vote::LeaderIdCompare` to provide comparison functions for both single-leader-per-term and multi-leader-per-term implementations.
Commit: | a83ea29 | |
---|---|---|
Author: | Sainath Singineedi | |
Committer: | GitHub |
Refactor: Add gRPC network kv-memstore example (#1274) * CI: add raft-kv-memstore-grpc in ci * CI: add install protoc in steps examples
Commit: | 3325f6c | |
---|---|---|
Author: | Anthony Dodd | |
Committer: | Anthony Dodd |
Very large scale refactor based on experience so far. Very large overhaul to streamline API and interfaces. Removed protobuf in favor of standard Rust types with serde. Protobuf and any other serialization types can be added as extensions or very easily implemented by users of the crate. Serde allows for broad serialization options as well. Finally found a solid pattern for being able to remove the need for allocating application specific errors from the RaftStorage layer. These are now expressed as generic constraints. Using PhantomData for the various types to keep track of the type parameter where it is otherwise not being used. All of the logic of the Raft system has been cleanly separated into submodules for more easier reasoning about the system. Previous implementation of the system overall algorithm has been reinstated.
This commit does not contain any .proto
files.
Commit: | 1e2f901 | |
---|---|---|
Author: | Anthony Dodd | |
Committer: | Anthony Dodd |
Finished up the election timeout system. README updates on AdminCommand structure for controlling the Raft node from outside of the Raft protocol itself. A few new node states have been introduced for more clearly handling the Raft node startup lifecycle. This provides more visibility into the state of the system for the app which is using this system. A bit of refactoring to remove unnecessary copy ops.
Commit: | 28bd094 | |
---|---|---|
Author: | Anthony Dodd | |
Committer: | Anthony Dodd |
AppendEntries impl is complete. The storage interface for dealing with snapshots is pretty much completely spec'ed out.
Commit: | b1e97c6 | |
---|---|---|
Author: | Anthony Dodd |
Raft API has been a little further pinned down. Raft API has been segmented into 4 layers. All in terms of message handling. Still need to pin down the storage interface.
Commit: | 6fefd51 | |
---|---|---|
Author: | Anthony Dodd |
Good progress being made.
Commit: | 9593a3f | |
---|---|---|
Author: | Anthony Dodd |
Initial commit.