Skip to content

Commit

Permalink
optimize code
Browse files Browse the repository at this point in the history
  • Loading branch information
realtaobo committed Sep 4, 2024
1 parent 8e9ce54 commit ebbcba2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/common/procedure/src/local/runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1104,7 +1104,6 @@ mod tests {

#[tokio::test]
async fn test_rollback_exceed_max_retry_later() {
common_telemetry::init_default_ut_logging();
let exec_fn =
|_| async { Err(Error::retry_later(MockError::new(StatusCode::Unexpected))) }.boxed();
let rollback_fn = move |_| {
Expand Down
4 changes: 4 additions & 0 deletions src/common/procedure/src/procedure.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,10 @@ impl<T: Procedure + ?Sized> Procedure for Box<T> {
(**self).execute(ctx).await
}

async fn rollback(&mut self, ctx: &Context) -> Result<()> {
(**self).rollback(ctx).await
}

fn rollback_supported(&self) -> bool {
(**self).rollback_supported()
}
Expand Down

0 comments on commit ebbcba2

Please sign in to comment.