Skip to content

Commit

Permalink
chore: rebase on master
Browse files Browse the repository at this point in the history
Signed-off-by: iGxnon <[email protected]>
  • Loading branch information
iGxnon committed Dec 13, 2023
1 parent 25107fb commit 9786975
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 14 deletions.
6 changes: 3 additions & 3 deletions curp/src/rpc/connect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ use crate::{
AppendEntriesRequest, AppendEntriesResponse, CurpError, FetchClusterRequest,
FetchClusterResponse, FetchReadStateRequest, FetchReadStateResponse,
InstallSnapshotRequest, InstallSnapshotResponse, ProposeConfChangeRequest,
ProposeConfChangeResponse, ProposeRequest, ProposeResponse, PublishRequest, PublishRequest,
PublishResponse, PublishResponse, TriggerShutdownRequest, VoteRequest, VoteResponse,
WaitSyncedRequest, WaitSyncedResponse,
ProposeConfChangeResponse, ProposeRequest, ProposeResponse, PublishRequest,
PublishResponse, TriggerShutdownRequest, VoteRequest, VoteResponse, WaitSyncedRequest,
WaitSyncedResponse,
},
snapshot::Snapshot,
};
Expand Down
3 changes: 1 addition & 2 deletions curp/src/server/curp_node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -520,8 +520,7 @@ impl<C: Command, RC: RoleChange> CurpNode<C, RC> {
SyncAction::AppendEntries(ae) => {
let is_empty = ae.entries.is_empty();
let is_commit_shutdown = ae.entries.last().is_some_and(|e| {
matches!(e.entry_data, EntryData::Shutdown(_))
&& e.index == ae.leader_commit
matches!(e.entry_data, EntryData::Shutdown) && e.index == ae.leader_commit
});
// (hb_opt, entries) status combination
// (false, empty) => send heartbeat to followers
Expand Down
12 changes: 6 additions & 6 deletions curp/src/server/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ use crate::{
members::{ClusterInfo, ServerId},
role_change::RoleChange,
rpc::{
AppendEntriesRequest, AppendEntriesResponse, ConfChangeEntry, FetchClusterRequest,
FetchClusterResponse, FetchReadStateRequest, FetchReadStateResponse, InnerProtocolServer,
InstallSnapshotRequest, InstallSnapshotResponse, ProposeConfChangeRequest,
ProposeConfChangeResponse, ProposeRequest, ProposeResponse, ProtocolServer, PublishRequest,
PublishResponse, ShutdownRequest, ShutdownResponse, TriggerShutdownRequest,
TriggerShutdownResponse, VoteRequest, VoteResponse, WaitSyncedRequest, WaitSyncedResponse,
AppendEntriesRequest, AppendEntriesResponse, FetchClusterRequest, FetchClusterResponse,
FetchReadStateRequest, FetchReadStateResponse, InnerProtocolServer, InstallSnapshotRequest,
InstallSnapshotResponse, ProposeConfChangeRequest, ProposeConfChangeResponse,
ProposeRequest, ProposeResponse, ProtocolServer, PublishRequest, PublishResponse,
ShutdownRequest, ShutdownResponse, TriggerShutdownRequest, TriggerShutdownResponse,
VoteRequest, VoteResponse, WaitSyncedRequest, WaitSyncedResponse,
},
};

Expand Down
6 changes: 3 additions & 3 deletions xline-client/src/clients/auth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ impl AuthClient {
/// .auth_client();
///
/// let resp = client
/// .authenticate(AuthenticateRequest::new("root", "rootpw"))
/// .authenticate(AuthenticateRequest::new("root", "root pass word"))
/// .await?;
///
/// println!("auth token: {}", resp.token);
Expand Down Expand Up @@ -536,7 +536,7 @@ impl AuthClient {
///
/// let resp = client.role_get(AuthRoleGetRequest::new("role")).await?;
///
/// println!("permmisions:");
/// println!("permissions:");
/// for perm in resp.perm {
/// println!("{} {}", perm.perm_type, String::from_utf8_lossy(&perm.key));
/// }
Expand Down Expand Up @@ -716,7 +716,7 @@ impl AuthClient {
use_fast_path: bool,
) -> Result<Res> {
let request = RequestWithToken::new_with_token(request.into(), self.token.clone());
let cmd = Command::new(vec![], request);
let cmd = command_from_request_wrapper(request);

let res_wrapper = if use_fast_path {
let (cmd_res, _sync_error) = self.curp_client.propose(cmd, true).await?;
Expand Down

0 comments on commit 9786975

Please sign in to comment.