temporalio / temporalio/temporal
Cache event history from query tasks
Nobody has claimed this yet.
- 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.
Currently, if a query task is delivered to a worker through a normal queue, the event history is discarded after handling the query task since RespondQueryTaskCompletedRequest does not carry any sticky attributes.
For query heavy workflows with large history, especially when codec is involved, discarding the payload seems to be wasteful, and paying latency penalty unnecessarily.
Describe the solution you'd like
I'd like to see sticky attributes to be added to RespondQueryTaskCompletedRequest or in any other ways to cache the event history on worker in order to handle subsequent queries more efficiently.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with temporal/api/workflowservice/v1/request_response.proto, especially RespondQueryTaskCompletedRequest and the referenced sticky attributes definition. Trace how query tasks delivered through a normal queue handle event history and determine where a cache-carrying response would fit. Done means an agreed approach for retaining history and the corresponding API and implementation scope are defined.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- api, distributed-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100