cschleiden / go-workflows

Embedded durable workflows for Golang similar to DTFx/Cadence/Temporal
https://cschleiden.github.io/go-workflows/
MIT License
233 stars 49 forks source link

Implement `ContinueAsNew` #211

Closed cschleiden closed 1 year ago

cschleiden commented 1 year ago

This PR adds support for ContinueAsNew. Most of the changes are about adding ExecutionID back and keeping track of ParentExecutionID.

There is potential for loosening the query behavior for some calls where InstanceID might be enough and we could figure out the ExecutionID ourselves, but for now I've kept that explicit.

Closes: #210

cschleiden commented 1 year ago

/bench

cschleiden commented 1 year ago

!bench

github-actions[bot] commented 1 year ago

Default run

Command Mean [ms] Min [ms] Max [ms] Relative
mysql-main 976.9 ± 226.3 681.7 1381.9 1.06 ± 0.36
mysql-pr 918.7 ± 232.1 664.0 1387.6 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
sqlite-main 352.7 ± 103.6 223.0 579.7 1.01 ± 0.38
sqlite-pr 348.5 ± 82.4 209.1 442.5 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
redis-main 333.9 ± 49.7 285.1 395.4 1.05 ± 0.20
redis-pr 317.4 ± 39.4 272.3 393.6 1.00