File tree Expand file tree Collapse file tree 2 files changed +20
-7
lines changed Expand file tree Collapse file tree 2 files changed +20
-7
lines changed Original file line number Diff line number Diff line change @@ -211,13 +211,14 @@ impl CoordinatorState {
211
211
#[ expect( unused) ]
212
212
CoordinatorOperation :: CollectLrtqShares { members, shares } => { }
213
213
CoordinatorOperation :: Prepare { prepares, .. } => {
214
- for ( platform_id, ( config, share) ) in
215
- prepares. clone ( ) . into_iter ( )
216
- {
214
+ for ( platform_id, ( config, share) ) in prepares. iter ( ) {
217
215
if ctx. connected ( ) . contains ( & platform_id) {
218
216
ctx. send (
219
- platform_id,
220
- PeerMsgKind :: Prepare { config, share } ,
217
+ platform_id. clone ( ) ,
218
+ PeerMsgKind :: Prepare {
219
+ config : config. clone ( ) ,
220
+ share : share. clone ( ) ,
221
+ } ,
221
222
) ;
222
223
}
223
224
}
@@ -241,7 +242,6 @@ impl CoordinatorState {
241
242
} => { }
242
243
CoordinatorOperation :: CollectLrtqShares { members, shares } => { }
243
244
CoordinatorOperation :: Prepare { prepares, prepare_acks } => {
244
- let rack_id = self . reconfigure_msg . rack_id ( ) ;
245
245
if let Some ( ( config, share) ) = prepares. get ( & to) {
246
246
ctx. send (
247
247
to,
Original file line number Diff line number Diff line change @@ -568,6 +568,16 @@ impl Node {
568
568
return ;
569
569
}
570
570
571
+ if !config. members . contains_key ( ctx. platform_id ( ) ) {
572
+ error ! (
573
+ self . log,
574
+ "Received Prepare when not a member of configuration" ;
575
+ "from" => %from,
576
+ "prepare_epoch" => %config. epoch
577
+ ) ;
578
+ return ;
579
+ }
580
+
571
581
// We always save the config and share if we haven't committed a later
572
582
// configuration. If we have seen a newer `Prepare`, it's possible
573
583
// that that configuration will not commit, and the latest committed
@@ -594,7 +604,10 @@ impl Node {
594
604
) ;
595
605
}
596
606
// If we are coordinating for an older epoch, then we should stop
597
- // coordinating. This epoch will never commit.
607
+ // coordinating. The configuration at this epoch will either never
608
+ // commit, or has already committed without us learning about it from
609
+ // Nexus. In either case the rest of the system has moved on and we
610
+ // should stop coordinating.
598
611
if let Some ( cs) = & self . coordinator_state {
599
612
if msg_epoch > cs. reconfigure_msg ( ) . epoch ( ) {
600
613
// This prepare is for a newer configuration than the one we are
You can’t perform that action at this time.
0 commit comments