temporalio / temporalio/temporal

Cache event history from query tasks

Open
#4,463 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
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

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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.