Error handling strategies for tasks (original) (raw)
The error handling strategy for a task specifies the action to take if the task fails due to a temporary error.
The following tables describes the different error handling strategies that you can use for a task:
| Strategy type | Description |
|---|---|
| Fatal | Stops the execution of the entire integration and marks the execution status as Failed. |
| Ignore | Ignores the failure of the task. The integration continues to run the next tasks assuming the failed task has Succeeded. |
| None | Stops execution of the task and marks the integration status as Failed. If an alternate path to the final task (leaf task) exists, tasks in the alternate path are run. If all tasks in the alternate path run successfully, marks the integration status as Succeeded. |
| Restart integration with backoff | Runs the entire integration from the first task. However, the task might fail again. To avoid repeat failure, specify the time interval between restarts in the Retry interval (in seconds) field and the number of permitted restart attempts in the Maximum retry count field. |
| Retry task with exponential backoff | Runs the integration from the failed task. If the task fails during a retry, the time interval between each retry attempt increases by the power of 2. There is a delay of 1 to 5 seconds that is added to the backoff time. For example, if the specified retry interval is 3 seconds, the first retry occurs after 3 seconds. The second retry occurs after 9 seconds, the third retry after 81 seconds, and so on. The process continues until the maximum number of retries is reached or the task succeeds, whichever is earlier. |
| Retry task with fixed interval | Runs the integration from the failed task. If the task fails during a retry, the time interval between each retry attempt remains constant. For example, if the specified retry interval is 3 seconds, retries occur every 3 seconds. The process continues until the maximum number of retries is reached or the task succeeds, whichever is earlier. |
| Retry task with linear backoff | Runs the integration from the failed task. If the task fails during a retry, the time interval between each retry attempt increases linearly. There is a delay of 1 to 5 seconds that is added to the backoff time. For example, if the specified retry interval is 3 seconds, the first retry occurs after 3 seconds. The second retry occurs after 6 seconds, the third retry after 9 seconds, and so on. The process continues until the maximum number of retries is reached or the task succeeds, whichever is earlier. |
Backoff retries
The default concurrency limit is set to 50 executions for each project and region. Failed executions are queued and retried using an exponential backoff algorithm, which gradually increases the wait time between retries up to 10 times. For example:
- Execute an integration.
- If the request fails, waits 10 minutes and retries the request.
- If the request fails, waits 20 minutes and retries the request.
- If the request fails, waits 40 minutes and retries the request.
- And so on, up to a maximum backoff retries of 10 times.
Retry conditions
The retry condition specifies the condition that must match for the error handling strategy to execute. The following table describes the supported operators and functions that you can use in the retry condition:
Supported operators
The following table describes the supported operators available for use in retry conditions.
| Operator | Description | Example |
|---|---|---|
| = | Checks for equality between two values | varvarvar = "value" |
| != | Checks for inequality between two values | varvarvar != "value" |
| < | Checks if a value is less than another value | 5 < 10 |
| <= | Checks if a value is less than or equal to another value | varvarvar <= 5 |
| > | Checks if a value is greater than another value | 1 > 0 |
| >= | Checks if a value is greater than or equal to another value | varvarvar >= 0 |
| : | Checks if a string contains a substring within it, or checks if a list contains a specific primitive value. | longStringlongStringlongString : "substring" listofvalueslist of valueslistofvalues : "value" |
| AND | Checks two expressions and returns true if both the expressions evaluate to true. | aaa > bbb AND bbb < ccc |
| OR | Checks two expressions and returns true if any one of the expressions evaluates to true. | aaa > bbb OR bbb < ccc |
| NOT | Negation operator. Flips the result of an expression. | NOT($var$ = "value") |
Supported functions
The following table describes supported functions available for use in retry conditions.
| Function | Description |
|---|---|
| exists(VARIABLE) | Checks if a given variable exists |
| does_not_exist(VARIABLE) | Checks if a given variable does not exist |
| is_empty(VARIABLE) | Checks if a given variable is a list AND is empty. Supports array variable type except JSON array. |
| is_not_empty(VARIABLE) | Checks if a given variable is a list AND is not empty. Supports array variable type except JSON array. |