Commit 6084e852 authored by Vincent Pelletier's avatar Vincent Pelletier

CMFActivity.Activity.SQLBase: Do not increment priority after failure

When an activity failure happens, the SQL row is updated:
- date is set to a future value, so the activity does not get retried
  immediately, in the expectation that what caused the failure may have
  cleared by that point.
- retry is incremented, to allow limiting the total number of retries
- priority is incremented

This last point seems harder to justify, and seems redundant with the date
increase. In the context of processing node families and with a steady
influx of similar activities at a base priority level, such priority
increment can postpone the victim activity execution to an arbitrarily
large amount of time, which is undesirable.
So, remove this increment.
parent 8197ba1d
Pipeline #29554 failed with stage
in 0 seconds
......@@ -1049,7 +1049,7 @@ CREATE TABLE %s (
" date = DATE_ADD(UTC_TIMESTAMP(6), INTERVAL %s SECOND)"
"%s WHERE uid IN (%s)" % (
self.sql_table, delay,
", priority = priority + 1, retry = retry + 1" if retry else "",
", retry = retry + 1" if retry else "",
",".join(map(str, uid_list))))
def finalizeMessageExecution(self, activity_tool, message_list,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment