Skip to content

Commit

Permalink
Chore: mark StorageIOError as deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
drmingdrmer committed Jul 22, 2024
1 parent fff880a commit 55f4e5a
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 4 deletions.
1 change: 0 additions & 1 deletion openraft/src/engine/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ where C: RaftTypeConfig
/// inclusive.
TruncateLog { since: LogId<C::NodeId> },

// TODO(1): current it is only used to replace BuildSnapshot, InstallSnapshot, CancelSnapshot.
/// A command send to state machine worker [`sm::worker::Worker`].
///
/// The runtime(`RaftCore`) will just forward this command to [`sm::worker::Worker`].
Expand Down
3 changes: 0 additions & 3 deletions openraft/src/engine/handler/vote_handler/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -235,9 +235,6 @@ where C: RaftTypeConfig
///
/// This node then becomes raft-follower or raft-learner.
pub(crate) fn become_following(&mut self) {
// TODO: entering following needs to check last-log-id on other node to decide the election
// timeout.

debug_assert!(
self.state.vote_ref().leader_id().voted_for() != Some(self.config.id)
|| !self.state.membership_state.effective().membership().is_voter(&self.config.id),
Expand Down
1 change: 1 addition & 0 deletions openraft/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ pub use crate::storage::StorageHelper;
pub use crate::storage_error::ErrorSubject;
pub use crate::storage_error::ErrorVerb;
pub use crate::storage_error::StorageError;
#[allow(deprecated)]
pub use crate::storage_error::StorageIOError;
pub use crate::storage_error::ToStorageResult;
pub use crate::summary::MessageSummary;
Expand Down
1 change: 1 addition & 0 deletions openraft/src/storage_error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ impl fmt::Display for ErrorVerb {
}

/// Backward compatible with old application using `StorageIOError`
#[deprecated(note = "use StorageError instead", since = "0.10.0")]
pub type StorageIOError<C> = StorageError<C>;

impl<C> StorageError<C>
Expand Down

0 comments on commit 55f4e5a

Please sign in to comment.