1
1
use std:: fmt:: Debug ;
2
- use std:: sync:: Arc ;
3
2
4
3
use tokio:: sync:: oneshot;
5
4
@@ -13,7 +12,6 @@ use crate::raft::AppendEntriesResponse;
13
12
use crate :: raft:: InstallSnapshotResponse ;
14
13
use crate :: raft:: VoteRequest ;
15
14
use crate :: raft:: VoteResponse ;
16
- use crate :: EffectiveMembership ;
17
15
use crate :: LogId ;
18
16
use crate :: MetricsChangeFlags ;
19
17
use crate :: Node ;
69
67
/// Replicate log entries or snapshot to a target.
70
68
Replicate { target : NID , req : Inflight < NID > } ,
71
69
72
- // /// Replicate a snapshot to a target.
73
- // ReplicateSnapshot {
74
- // target: NID,
75
- // snapshot_last_log_id: Option<LogId<NID>>,
76
- // },
77
- /// Membership config changed, need to update replication streams.
78
- UpdateMembership {
79
- // TODO: not used yet.
80
- membership : Arc < EffectiveMembership < NID , N > > ,
81
- } ,
82
-
83
70
/// Membership config changed, need to update replication streams.
84
71
/// The Runtime has to close all old replications and start new ones.
85
72
/// Because a replication stream should only report state for one membership config.
@@ -150,7 +137,6 @@ where
150
137
( Command :: LeaderCommit { already_committed, upto, } , Command :: LeaderCommit { already_committed : b_committed, upto : b_upto, } , ) => already_committed == b_committed && upto == b_upto,
151
138
( Command :: FollowerCommit { already_committed, upto, } , Command :: FollowerCommit { already_committed : b_committed, upto : b_upto, } , ) => already_committed == b_committed && upto == b_upto,
152
139
( Command :: Replicate { target, req } , Command :: Replicate { target : b_target, req : other_req, } , ) => target == b_target && req == other_req,
153
- ( Command :: UpdateMembership { membership } , Command :: UpdateMembership { membership : b } , ) => membership == b,
154
140
( Command :: RebuildReplicationStreams { targets } , Command :: RebuildReplicationStreams { targets : b } , ) => targets == b,
155
141
( Command :: UpdateProgressMetrics { target, matching } , Command :: UpdateProgressMetrics { target : b_target, matching : b_matching, } , ) => target == b_target && matching == b_matching,
156
142
( Command :: SaveVote { vote } , Command :: SaveVote { vote : b } ) => vote == b,
@@ -187,7 +173,6 @@ where
187
173
Command :: LeaderCommit { .. } => flags. set_data_changed ( ) ,
188
174
Command :: FollowerCommit { .. } => flags. set_data_changed ( ) ,
189
175
Command :: Replicate { .. } => { }
190
- Command :: UpdateMembership { .. } => flags. set_cluster_changed ( ) ,
191
176
Command :: RebuildReplicationStreams { .. } => flags. set_replication_changed ( ) ,
192
177
Command :: UpdateProgressMetrics { .. } => flags. set_replication_changed ( ) ,
193
178
Command :: SaveVote { .. } => flags. set_data_changed ( ) ,
0 commit comments