Skip to content

Commit

Permalink
Move temporary error logs to lower level than WARN (#897)
Browse files Browse the repository at this point in the history
  • Loading branch information
sergerad authored Jan 13, 2025
1 parent 3f001c9 commit b8b0528
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
4 changes: 4 additions & 0 deletions crates/derive/src/pipeline/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,10 @@ where
}
StepResult::AdvancedOrigin
}
PipelineErrorKind::Temporary(_) => {
trace!(target: "pipeline", "Attributes queue step failed due to temporary error: {:?}", err);
StepResult::StepFailed(err)
}
_ => {
warn!(target: "pipeline", "Attributes queue step failed: {:?}", err);
StepResult::StepFailed(err)
Expand Down
13 changes: 9 additions & 4 deletions crates/driver/src/pipeline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,16 @@ where
info!(target: "client_derivation_driver", "Advanced origin")
}
StepResult::OriginAdvanceErr(e) | StepResult::StepFailed(e) => {
warn!(target: "client_derivation_driver", "Failed to step derivation pipeline: {:?}", e);

// Break the loop unless the error signifies that there is not enough data to
// complete the current step. In this case, we retry the step to see if other
// stages can make progress.
match e {
PipelineErrorKind::Temporary(_) => continue,
PipelineErrorKind::Temporary(_) => {
trace!(target: "client_derivation_driver", "Failed to step derivation pipeline temporarily: {:?}", e);
continue
}
PipelineErrorKind::Reset(e) => {
warn!(target: "client_derivation_driver", "Failed to step derivation pipeline due to reset: {:?}", e);
let system_config = self
.system_config_by_number(l2_safe_head.block_info.number)
.await?;
Expand Down Expand Up @@ -85,7 +87,10 @@ where
.await?;
}
}
PipelineErrorKind::Critical(_) => return Err(e),
PipelineErrorKind::Critical(_) => {
warn!(target: "client_derivation_driver", "Failed to step derivation pipeline: {:?}", e);
return Err(e)
}
}
}
}
Expand Down

0 comments on commit b8b0528

Please sign in to comment.