Skip to content

Conversation

@gow
Copy link
Contributor

@gow gow commented Nov 21, 2025

What changed?

  • Querying a paused workflow returns a "rejected" response.
  • Added functional test.

Why?

Executing queries on a paused workflow may not provide the updated results since the server withholds events from the worker when a workflow is paused. This breaks the current expectation of read-after-write semantics of Query API. Ex: When a client sends a signal to the workflow and follows up with a query, the expectation is that the query result includes the effect of the signal. But for a paused workflow that guarantee cannot be provided. So we are failing the queries in a paused workflow for now.

How did you test it?

  • built
  • run locally and tested manually
  • covered by existing tests
  • added new unit test(s)
  • added new functional test(s)

Note

Queries against paused workflows now return QueryRejected with PAUSED status; adds a functional test to validate behavior.

  • History API:
    • service/history/api/queryworkflow/api.go: When mutableStateStatus is WORKFLOW_EXECUTION_STATUS_PAUSED, return QueryRejected with status PAUSED.
  • Tests:
    • tests/pause_workflow_execution_test.go: Add TestQueryWorkflowWhenPaused to verify querying a paused workflow returns QueryRejected with PAUSED status.

Written by Cursor Bugbot for commit 0f9a838. This will update automatically on new commits. Configure here.

@gow gow requested review from a team as code owners November 21, 2025 21:44
@gow gow requested a review from spkane31 November 21, 2025 21:45
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