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

Communicate shouldContinueAsNew to Workers #2726

Closed
lorensr opened this issue Apr 14, 2022 · 0 comments · Fixed by #3055
Closed

Communicate shouldContinueAsNew to Workers #2726

lorensr opened this issue Apr 14, 2022 · 0 comments · Fixed by #3055
Assignees
Labels
enhancement New feature or request

Comments

@lorensr
Copy link
Contributor

lorensr commented Apr 14, 2022

Is your feature request related to a problem? Please describe.

When writing a long-running Workflow, I'd like to know when to Continue As New.

Describe the solution you'd like

I'd like to have SDKs provide both of these to Workflows:

The former is the last event ID. The latter can either be:

  1. Set by the SDK: for instance shouldContinueAsNew = eventHistoryLength > 10_000
  2. Communicated by the Server (in an event header?). This might be preferable, as the Server has more knowledge—for example, it might be able to keep a running total size of a Workflow's Event History, and set shouldContinueAsNew=true before 10k events if the Payloads are large. And maybe @mfateev had other reasons for suggesting this route?

We should give Workflow.isContinueAsNewNeeded flag to the SDKs. And it should be coming from the service.

https://temporaltechnologies.slack.com/archives/C01FT8U10GK/p1643400086752909?thread_ts=1643398281.925129&cid=C01FT8U10GK

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants