Skip to content

retry_exponential_backoff algorithm does not account for case when retry_delay is zero #17005

@edwardwang888

Description

@edwardwang888

Apache Airflow version: 2.1.2

Kubernetes version (if you are using kubernetes) (use kubectl version):

Environment:

  • Cloud provider or hardware configuration:
  • OS (e.g. from /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Others:

What happened:
When retry_exponential_backoff is enabled and retry_interval is inadvertently set to zero, a divide by zero error occurs in the modded_hash calculation of the exponential backoff algorithm, causing the scheduler to crash.

What you expected to happen:
Scheduler should treat it as a task with retry_delay of zero.

How to reproduce it:
Create a task with retry_delay=timedelta() and retry_exponential_backoff=True.

Anything else we need to know:
Willing to submit a PR; opened #17003 (WIP) with possible fix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions