-
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: Use
CommittedLeaderId
in place of LeaderId
for LogIOId
In this commit, `LeaderId` has been replaced with `CommittedLeaderId` for identifying log IO requests. This change is made because `CommittedLeaderId` is shorter and sufficiently identifies the necessary attributes since only an established leader (a committed leader) can write or replicate logs. Thus, using `CommittedLeaderId` streamlines the identification process for log IO requests.
- Loading branch information
1 parent
a9f696a
commit d1643fe
Showing
4 changed files
with
27 additions
and
14 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
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 |
---|---|---|
@@ -1,9 +1,9 @@ | ||
use crate::node::NodeId; | ||
use crate::vote::leader_id::LeaderId; | ||
use crate::vote::leader_id::CommittedLeaderId; | ||
use crate::vote::Vote; | ||
|
||
impl<NID: NodeId> From<Vote<NID>> for LeaderId<NID> { | ||
impl<NID: NodeId> From<Vote<NID>> for CommittedLeaderId<NID> { | ||
fn from(vote: Vote<NID>) -> Self { | ||
vote.leader_id | ||
vote.leader_id.to_committed() | ||
} | ||
} |