Skip to content

Commit 785e3bb

Browse files
authored
core: Restart store on revert errors to clear poisoned writer (#6422)
The runner FSM refactor mapped Action::Restart from handle_revert to RestartReason::DataSourceExpired, skipping store.restart(). Fix by using RestartReason::StoreError for revert errors and remove the unused DataSourceExpired variant.
1 parent 9e65f6f commit 785e3bb

2 files changed

Lines changed: 1 addition & 3 deletions

File tree

core/src/subgraph/runner/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -619,7 +619,7 @@ where
619619
match action {
620620
Action::Continue => Ok(RunnerState::AwaitingBlock { block_stream }),
621621
Action::Restart => Ok(RunnerState::Restarting {
622-
reason: RestartReason::DataSourceExpired,
622+
reason: RestartReason::StoreError,
623623
}),
624624
Action::Stop => Ok(RunnerState::Stopped {
625625
reason: StopReason::Canceled,

core/src/subgraph/runner/state.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,6 @@ pub enum RunnerState<C: Blockchain> {
7474
pub enum RestartReason {
7575
/// New dynamic data source was created that requires filter updates.
7676
DynamicDataSourceCreated,
77-
/// A data source reached its end block.
78-
DataSourceExpired,
7977
/// Store error occurred and store needs to be restarted.
8078
StoreError,
8179
/// Possible reorg detected, need to restart to detect it.

0 commit comments

Comments
 (0)