Skip to content

[Backport release-1.19] fix: hold an actor's turn until a cancelled call finishes - #1878

Merged
javier-aliaga merged 1 commit into
release-1.19from
backport-1877-to-release-1.19
Oct 27, 2026
Merged

javier-aliaga merged 1 commit into
release-1.19from
backport-1877-to-release-1.19

Conversation

@dapr-bot

Copy link
Copy Markdown
Collaborator

Backport 47b9bb5 from #1877.

When a caller cancels an actor call while it runs, daprd releases the
actor and sends the next call, but the SDK kept running the cancelled
method, so two turns ran at once on the same actor.

ActorManager now runs activation, method calls and deactivation through
a per-actor turn lock. A turn keeps the actor until its code and the
state save finish, even if its request is cancelled. Turns that are
still waiting are dropped when cancelled.

Fixes #1871

Signed-off-by: Javier Aliaga <javier@diagrid.io>
(cherry picked from commit 47b9bb5)
@dapr-bot
dapr-bot requested review from a team as code owners October 27, 2026 14:30
@codecov

codecov Bot commented Oct 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.60%. Comparing base (85f04e3) to head (0a1d3ee).

Additional details and impacted files
@@                Coverage Diff                 @@
##             release-1.19    #1878      +/-   ##
==================================================
+ Coverage           80.52%   80.60%   +0.07%     
- Complexity           2832     2847      +15     
==================================================
  Files                 274      275       +1     
  Lines                8412     8459      +47     
  Branches              905      911       +6     
==================================================
+ Hits                 6774     6818      +44     
- Misses               1270     1273       +3     
  Partials              368      368              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@javier-aliaga
javier-aliaga merged commit 4233d4a into release-1.19 Oct 27, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants