Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Core may sometimes issue an activation for a run ID that lang does not know about #641

Closed
bergundy opened this issue Nov 22, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@bergundy
Copy link
Member

This error is seen on rare occasions in both the TypeScript and Python SDKs:

TypeScript:

IllegalStateError: Received workflow activation for an untracked workflow with no start workflow job

Python:

tests/worker/test_workflow.py::test_workflow_uuid 
-------------------------------- live log call ---------------------------------
21:20:22 [   DEBUG] Evicting workflow with run ID f9b1436c-2766-47d3-be18-0a330e1e398c, message: Workflow cache full (_workflow.py:266)
21:20:22 [   ERROR] Failed handling activation on workflow with run ID f9b1436c-2766-47d3-be18-0a330e1e398c (_workflow.py:216)
Traceback (most recent call last):
  File "/home/runner/work/sdk-python/sdk-python/temporalio/worker/_workflow.py", line 196, in _handle_activation
    workflow = self._create_workflow_instance(act)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/sdk-python/sdk-python/temporalio/worker/_workflow.py", line 294, in _create_workflow_instance
    raise RuntimeError(
RuntimeError: Missing start workflow, workflow could have unexpectedly been removed from cache

It seems to happen with "legacy" queries and is likely to do with evictions but more investigation is required.

This causes a runtime error as it violates the Core-Lang contract.
Core should avoid sending activations to Lang for run IDs Lang is not aware of. If this is related to queries, Core should fetch the history for the run ID and recreate the workflow state so the query can be responded to.

@bergundy bergundy added the bug Something isn't working label Nov 22, 2023
@bergundy
Copy link
Member Author

This may only happen in older versions of Core.
Leaving it open for a while longer.
Let's close if nobody encounters this again with newer versions in a few months.

@Sushisource
Copy link
Member

Old, closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants