Skip to content

Commit

Permalink
chore(reqactor): logs for cancel non-registered and non-wip requests
Browse files Browse the repository at this point in the history
  • Loading branch information
keroro520 committed Jan 22, 2025
1 parent 0ab7722 commit 619facd
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions reqactor/src/backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -256,10 +256,12 @@ impl Backend {
request_key: RequestKey,
old_status: StatusWithContext,
) -> Result<StatusWithContext, String> {
debug_assert!(
old_status.status() == &Status::WorkInProgress
|| old_status.status() == &Status::Registered
);
if old_status.status() != &Status::Registered
&& old_status.status() != &Status::WorkInProgress
{
tracing::warn!("Actor Backend received cancel-action {request_key}, but it is not registered or work-in-progress, skipping");
return Ok(old_status);
}

// Case: old_status is registered: mark the request as cancelled in the pool and return directly
if old_status.status() == &Status::Registered {
Expand Down

0 comments on commit 619facd

Please sign in to comment.