Skip to content

How cadence do keep execution history order? #4684

Answered by longquanzheng
zedongh asked this question in Q&A
Discussion options

You must be logged in to vote

The trick is within the SDK and has nothing to do with server.
SDK will make sure all the goroutines( they are called coroutine in the Go SDK) are executed in a deterministic order.
And that's exactly why it's required to use workflow.Go because native go func... will lead to non-deterministic error.

For more details, see this dispatcherImpl https://github.com/uber-go/cadence-client/blob/26294594c6dd6b74e8d626a929968cace8e3148a/internal/internal_workflow.go#L157
Which provides ExecuteUntilAllBlocked
https://github.com/uber-go/cadence-client/blob/26294594c6dd6b74e8d626a929968cace8e3148a/internal/internal_workflow.go#L901

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@zedongh
Comment options

Answer selected by zedongh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants