Make sure that only one engine starts a workflow for every cron
trigger cycle by checking the row count of the DML statements used
to update the cron trigger in the DB:
* Modify the update cron trigger to include a WHERE statement that
verifies that no other engine already updated the cron trigger.
* Change the sqlachemy method used for deleting the cron trigger to be
able to retrieve the row count of the deleted rows
Start the workflow execution only if the current engine was able to
update the cron trigger DB row
Change-Id: I9d3bec51844de218a46cf6ff53bedf9a00069e30
Closes-Bug: #1513548
(cherry picked from commit 7f9c0c62419888201e129282ba9d548d5fffdff5)
Reviewed: https:/ /review. openstack. org/250206 /git.openstack. org/cgit/ openstack/ mistral/ commit/ ?id=b2aa9810ff9 f8b3f160b4fc2e6 6c33cb103160a3
Committed: https:/
Submitter: Jenkins
Branch: stable/liberty
commit b2aa9810ff9f8b3 f160b4fc2e66c33 cb103160a3
Author: Moshe Elisha <email address hidden>
Date: Mon Nov 9 17:20:35 2015 +0000
Ensure only one WF execution for every CT cycle
Make sure that only one engine starts a workflow for every cron
trigger cycle by checking the row count of the DML statements used
to update the cron trigger in the DB:
* Modify the update cron trigger to include a WHERE statement that
verifies that no other engine already updated the cron trigger.
* Change the sqlachemy method used for deleting the cron trigger to be
able to retrieve the row count of the deleted rows
Start the workflow execution only if the current engine was able to
update the cron trigger DB row
Change-Id: I9d3bec51844de2 18a46cf6ff53bed f9a00069e30 01e129282ba9d54 8d5fffdff5)
Closes-Bug: #1513548
(cherry picked from commit 7f9c0c624198882