temporalio / temporalio/temporal

Expiration policy for signal requestIDs in mutable state

Open
#4,021 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement P0
Dominant language
Go
Stars
23.2k
Forks
1.9k
Avg merge
2d 8h
Merged PRs (30d)
228

Description

Is your feature request related to a problem? Please describe.
Today if workflow is signal directly via the Signal api (not workflow-to-workflow signal), signal requestID will be store in workflow mutable state forever, which will result in an increase in mutable state size, which could lead to performance issue when say there're 30K signal requestIDs.

Describe the solution you'd like

  • Simply rely on the existing max signal count limit.
  • Give up the existing guarantee we have on signal deduplication and remove those requestIDs before workflow is closed.
    • Expire requestID based on time (still need to enforce the max signal count limit)
    • Expire requestID based on count

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Contributor guide

Open the contributing guide

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.

Research direction

Start with the signal API path and the workflow mutable state that stores signal requestIDs. Read how the existing maximum signal count limit is enforced, then compare the proposed time-based, count-based, and workflow-close expiration options. Done requires a decided policy and an agreed way to preserve the maximum signal count limit while addressing unbounded state growth.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
distributed-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.