-
Notifications
You must be signed in to change notification settings - Fork 17
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
SDKs should expose history length and size via Workflow info #16
Comments
Related:
|
I think we should expose
if (workflowInfo().shouldContinueAsNew) {
cAN()
} is shorter & easier to read/understand compared to: if (workflowInfo().historyLength < 10_000 && workflowInfo().historySize < 10_000_000) {
cAN()
}
|
Concur, when available in server (no benefit in supporting before server). Or is it already available in server? What is the logic there and is it configurable? |
It will be important to mention in documentation the fact that relying on these properties is useless and dangerous if using an older server. |
We could make it a capability and error (i.e. wft failure) if invoked for older server. But I think this is a good enough reason to not even expose this until it is available on cloud. |
Note, we should call this "continue as new suggested" across all SDKs I think. |
A caveat that SDKs need to note here: these three values may be delayed if viewed via query. Since the value is on wft start, a query-only poll response won't have updated history. So if you, say, sent a signal to start far-out 50 timers, and then, even after already in history stored, sent just a query, there is no new wft and therefore no value updates even though current event count is actually quite different on the server. Basically every SDK needs to document that these values may be delayed if accessed in a query. |
History length:
History size and "should continue as new":
WorkflowInfo.historySizeInBytes
sdk-typescript#695The text was updated successfully, but these errors were encountered: