cadence-client
cadence-client copied to clipboard
Defer cancel() causes non-determinstic error
WF(){
ctx, cancel := workflow.WithCancel(ctx)
defer cancel()
scheduleActivities...
}
Looks like this would cause non-deterministic error when workflow is kicked out of cache(cancel() will be called) We need to write test to verify it and see if we can fix this issue.
This doesn't make sense as no decision task should be running while workflow is kicked out of the cache. The only possibility is that there is a race condition between a decision task execution and cache eviction.
there's a decent chance this was filed for the errors I'm seeing. if so: we've been investigating in a lot more detail, our defers don't seem related.