Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Implement QueryOrchestrationStatesSegmentedAsync functionality in DurableTask.Emulator (LocalOrchestrationService)

Open
#1,332 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 3 days

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
csharp

Research direction

Start with LocalOrchestrationService.cs and trace QueryOrchestrationStatesSegmentedAsync alongside the corresponding AzureTableInstanceStore implementation. Reproduce the call with a LocalOrchestrationService client, then verify that orchestration state queries work against in-memory state or return a clear NotSupportedException instead of a NullReferenceException.

Written by the indexing model from the issue text.

Description

Problem

Currently, calling QueryOrchestrationStatesSegmentedAsync on client services that use DurableTask.Emulator (LocalOrchestrationService) results in a NullReferenceException, since the emulator does not implement the instance store query APIs. This breaks scenarios where consumers want to test or query orchestration states in-proc (e.g., for integration testing or local feature development) and depend on behavior parity with instance-backed services like AzureTableInstanceStore.

This is only specific to client using DurableTask.ServiceBus backend in production and using DurableTask.Emulator for local runs.

Expected Behavior

  • The emulator should provide a (possibly in-memory) implementation of QueryOrchestrationStatesSegmentedAsync that allows query patterns similar to those in AzureTableInstanceStore.
  • Querying orchestration state in local scenarios would enable better automated tests and developer workflows without requiring a full Azure Storage/Table backend.

Actual Behavior

  • QueryOrchestrationStatesSegmentedAsync is not implemented and instanceStore is null, so attempting to call it results in a crash (NullReferenceException).
  • This is confusing when writing code agnostic to target backend.

To Reproduce

  • Use any client with LocalOrchestrationService and call QueryOrchestrationStatesSegmentedAsync.
  • Observe the crash.

Suggestions

  • Implement QueryOrchestrationStatesSegmentedAsync in the emulator so the query will enumerate in-memory orchestration state.
  • At a minimum, gracefully throw NotSupportedException with a clear message instead of returning null or failing with NullReferenceException.

References

  • [Issue context and analysis: https://github.com/Azure/durabletask]
  • [Emulator implementation: LocalOrchestrationService.cs]
Dominant language
C#
Stars
1.7k
Forks
335
Avg merge
5d 3h
Merged PRs (30d)
8

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Azure/durabletask

All issues in Azure/durabletask

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.