From 3456eb0b2c1935c65624709d3656a7bd7d870cf4 Mon Sep 17 00:00:00 2001 From: Ashwin Sekar Date: Wed, 12 Jun 2024 22:14:11 -0400 Subject: [PATCH] replay: do not hold bank forks lock during mark_dead_slot (#1597) --- core/src/replay_stage.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/src/replay_stage.rs b/core/src/replay_stage.rs index 2f469d10f6239a..4861b7893e5554 100644 --- a/core/src/replay_stage.rs +++ b/core/src/replay_stage.rs @@ -2979,10 +2979,11 @@ impl ReplayStage { match replay_result { Ok(replay_tx_count) => tx_count += replay_tx_count, Err(err) => { + let root = bank_forks.read().unwrap().root(); Self::mark_dead_slot( blockstore, bank, - bank_forks.read().unwrap().root(), + root, err, rpc_subscriptions, duplicate_slots_tracker, @@ -3022,10 +3023,11 @@ impl ReplayStage { .accumulate(metrics); if let Err(err) = result { + let root = bank_forks.read().unwrap().root(); Self::mark_dead_slot( blockstore, bank, - bank_forks.read().unwrap().root(), + root, &BlockstoreProcessorError::InvalidTransaction(err), rpc_subscriptions, duplicate_slots_tracker,