-
Notifications
You must be signed in to change notification settings - Fork 160
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor: Remove
RaftLogReader
trait dependency from RaftLogStorage
This commit removes the dependency of the `RaftLogReader` trait from the `RaftLogStorage` interface in Openraft. `trait RaftLogStorage<C>: RaftLogReader<C> + ...` becomes `trait RaftLogStorage<C>: ...`. This change reflects the infrequent need for reading log entries directly from storage, as it primarily occurs when applying logs to the state machine. Inside Openraft, logs can now be read by acquiring a reader via `RaftLogStorage.get_log_reader().await.xxx()`, rather than requiring `RaftLogStorage` to implement the `RaftLogReader` trait. Upgrade(non-breaking) tip: Implementations are advised (though it is not mandatory) to remove the `impl RaftLogReader for YourRaftLogStore` from their codebase. - Fix: #1118
- Loading branch information
1 parent
b60e7dc
commit fa85822
Showing
7 changed files
with
63 additions
and
9 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
File renamed without changes.
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
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