From 0b59d10ab6150c6d2ecb4fceb76ca7ef77d5c217 Mon Sep 17 00:00:00 2001 From: Pawan Dhananjay Date: Thu, 8 Feb 2024 08:10:51 +0530 Subject: [PATCH] Fix backfill stalling (#5192) * Prevent early short circuit in `peer_disconnected` * lint --- beacon_node/network/src/sync/backfill_sync/mod.rs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/beacon_node/network/src/sync/backfill_sync/mod.rs b/beacon_node/network/src/sync/backfill_sync/mod.rs index 0d7e7c16c3..4e24aca07f 100644 --- a/beacon_node/network/src/sync/backfill_sync/mod.rs +++ b/beacon_node/network/src/sync/backfill_sync/mod.rs @@ -332,7 +332,16 @@ impl BackFillSync { } // If we have run out of peers in which to retry this batch, the backfill state // transitions to a paused state. - self.retry_batch_download(network, id)?; + // We still need to reset the state for all the affected batches, so we should not + // short circuit early + if self.retry_batch_download(network, id).is_err() { + debug!( + self.log, + "Batch could not be retried"; + "batch_id" => id, + "error" => "no synced peers" + ); + } } else { debug!(self.log, "Batch not found while removing peer"; "peer" => %peer_id, "batch" => id)