Skip to content

Resume queued entity calls after granting a lock - #1449

Open
sophiatev wants to merge 2 commits into
mainfrom
stevosyan/fix-entity-lock-backlog
Open

sophiatev wants to merge 2 commits into
mainfrom
stevosyan/fix-entity-lock-backlog

Conversation

@sophiatev

Copy link
Copy Markdown
Contributor

After an entity grants a queued lock, a call from the new owner can already be waiting behind it. For example, the caller may have received an earlier lock response before the corresponding checkpoint failed. The dispatcher stopped at the lock request and did not schedule another turn, leaving that call stuck until some other message arrived.

Send a continuation when granting the lock makes the next queued request eligible. An empty queue or a request from another caller does not cause a continuation.

The regression test reproduces the missing continuation on main, then follows the emitted continuation to verify that the waiting call executes and returns its result. It also covers empty queues and calls blocked by a different lock owner. All 27 TestTaskEntityDispatcher tests pass on both net8.0 and net48.

Copilot AI balanced review requested due to automatic review settings December 4, 2026 19:51

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No actionable issues were found in the reviewed changes.

No open issues 🎉

What changed in this PR

Fixes stalled entity calls by scheduling a continuation when granting a queued lock makes the next request eligible.

Changes:

  • Continues processing queued calls from the new lock owner.
  • Adds regression coverage for eligible calls, empty queues, and calls from other owners.
  • Extracts a shared test helper for running entity sessions.
File Description
test/​DurableTask.Core.Tests/​TestTaskEntityDispatcher.cs Tests continuation behavior and queued-call completion; extracts a session helper.
src/​DurableTask.Core/​TaskEntityDispatcher.cs Schedules a continuation when queued work becomes eligible after granting a lock.

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings December 4, 2026 21:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No actionable issues were found in the reviewed changes.

No open issues 🎉

Review effort: Balanced

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.

3 participants