-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Fix Duplicate workflow reminder execution in Scheduler mode #7983
Fix Duplicate workflow reminder execution in Scheduler mode #7983
Conversation
Workflow reminders must have a period set of repeating forever. This is what fundamentally ensures the durability of Workflows. PR updates all workflow reminders to have an infinite period. Workflow reminders repeat execution every 1 minute. In some cases, such as during extremely high load, a workflow reminder may execute whilst a previous execution is still in progress. This leads to situations such as double activity invocation. This patch adds a duplicate internal reminder detector, which silently returns if a duplicate reminder is detected. Removes the background contexts to Scheduler APIs. The Scheduler API server must respect inbound client contexts. Removes unused `--placement` flag from the Scheduler. Signed-off-by: joshvanl <me@joshvanl.dev>
I've confirmed the db is clean after several thousand workflow iterations and the reminders are not triggered indefinitely even while removing the Repeat from 2, should be good with this diff 👍🏻 |
Signed-off-by: joshvanl <me@joshvanl.dev>
Approved, pending validation to pass. |
Signed-off-by: joshvanl <me@joshvanl.dev>
LGTM. Just ran my local test and saw the duplicated triggering since the run activity took longer than a minute and saw the log about ignoring it since one is still active, then deleting it. Post workflow run of 4k workflow iterations my db was clean still 👍🏻
|
Workflow reminders must have a period set of repeating forever. This is what fundamentally ensures the durability of Workflows.
PR updates all workflow reminders to have an infinite period.
Workflow reminders repeat execution every 1 minute. In some cases, such as during extremely high load, a workflow reminder may execute whilst a previous execution is still in progress. This leads to situations such as double activity invocation. This patch adds a duplicate internal reminder detector, which silently returns if a duplicate reminder is detected.
Removes the background contexts to Scheduler APIs. The Scheduler API server must respect inbound client contexts.
Removes unused
--placement
flag from the Scheduler.