aws / aws-swf-flow-library

AWS Simple Workflow Flow framework library
Apache License 2.0
61 stars 54 forks source link

Import Flow-3.7 to external Flow release #30

Closed kongw95 closed 4 years ago

kongw95 commented 4 years ago

Release the internal Flow-3.7

Main changes

  1. Graceful shutdown. When a deployment or whatsoever comes to a host where workflow/activity worker is running, and the worker successfully polls a decision/activity task but cannot finish the task because the host is bounced, the workflow execution will get stuck until reaching the decision/activity task start_to_close_timeout. To address this issue, we add graceful shutdown into SpringWorkflowWorker and SpringActivityWorker, which will stop polling and wait for the current task to complete before initiating shutdown.
  2. Separate threads for polling and executing decider logic. The trigger for this change is to avoid hitting the hard limit (1000) on concurrent polling per task-list. Customers can keep the total polling thread count under 1000 for their workflow worker fleet, while having more than 1000 threads for executing decider logic.

Test I've verified that the changes do not break any of our Flow integration tests.