temporalio / temporalio/sdk-java
ServiceWorkflowHistoryIterator should eagerly request the next page
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 433
- Forks
- 249
- Avg merge
- 5d 6h
- Merged PRs (30d)
- 26
Description
Is your feature request related to a problem? Please describe.
Some users experience issues with replays of long workflow histories.
Describe the solution you'd like
While this process will always inherently has O(n) complexity and there is not much that we can do with that, there is one low hanging fruit to improve it.
Currently ServiceWorkflowHistoryIterator requests the next page only when the worker is already blocked and finished processing the previous page. It may be optimized by requesting the next page immediately.
Additional context
See io.temporal.client.EagerPaginator and it's implementations where such an approach and logic are already implemented.
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 by locating ServiceWorkflowHistoryIterator and read io.temporal.client.EagerPaginator and its implementations for the existing eager-request approach. Confirm how the iterator fetches pages, then verify that the next page is requested before the current page is exhausted and that long workflow-history replays retain their behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100