Skip to content

CallEntityAsync hangs indefinitely when targeting an unregistered entity type #668

@kshyju

Description

@kshyju

When an orchestration calls CallEntityAsync targeting an entity type that is not registered with any worker, the call hangs indefinitely instead of returning an error.

This is a breaking behavioral change. With SDK 1.18.0, the same call correctly failed with EntityOperationFailedException, allowing the orchestration to handle the error. With SDK 1.22.0, the entity message is sent to the scheduler but never dispatched to the worker — the orchestration waits forever with no error, no timeout, and no way to recover.

Environment

Component Version
Microsoft.DurableTask.Worker.AzureManaged 1.22.0 (broken), 1.18.0 (works)
Microsoft.DurableTask.Client.AzureManaged 1.22.0 (broken), 1.18.0 (works)
DTS Emulator mcr.microsoft.com/dts/dts-emulator:latest
.NET 10.0

Steps to reproduce

  1. Start the DTS emulator:

    docker run -d --name dts-emulator -p 8080:8080 -e DTS_USE_DYNAMIC_TASK_HUBS=true mcr.microsoft.com/dts/dts-emulator:latest
  2. Clone and run the repro:

    git clone https://github.com/kshyju/dts-entity-repro && cd dts-entity-repro && dotnet run

Expected behavior (works with SDK 1.18.0)

The orchestration completes. CallEntityAsync throws EntityOperationFailedException, the orchestration catches it, and completes successfully:

DurableTask SDK version: 1.18.0.0
Task hub: repro-b806ec

Starting orchestration that calls an UNREGISTERED entity type...
Waiting for orchestration c3ccc2e2... to complete (30s timeout)...
Orchestration completed: Status=Completed

Actual behavior (SDK 1.22.0)

The orchestration hangs indefinitely. The SendEntityMessage action is sent to the scheduler, but the scheduler never dispatches it to the worker:

DurableTask SDK version: 1.22.0.0
Task hub: repro-cb77ae

Starting orchestration that calls an UNREGISTERED entity type...
Waiting for orchestration 0b3355b8... to complete (30s timeout)...

BUG: Orchestration TIMED OUT after 30s.
The entity message to 'UnregisteredEntity' was never dispatched by the scheduler.
Expected the orchestration to fail with an error, not hang.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions