The GitHub Actions job "Tests" on airflow.git/fix/issue-61705 has failed.
Run started by GitHub user YoannAbriel (triggered by YoannAbriel).

Head commit for run:
946710821a71cee0a0e7761c7a54d1bb88761948 / Yoann Abriel <[email protected]>
fix(api): handle concurrent RTIF writes with IntegrityError retry

When multiple workers try to write rendered task instance fields for the
same task instance simultaneously, a race condition in session.merge()
can cause an IntegrityError (unique constraint violation). This happens
because both workers SELECT (find no record), then both try to INSERT.

Fix the ti_put_rtif endpoint to catch IntegrityError, rollback the
failed transaction, re-fetch the task instance, and retry the write.
The retry succeeds because merge() now finds the existing record and
performs an UPDATE instead of INSERT.

Closes: #61705

Report URL: https://github.com/apache/airflow/actions/runs/24120621263

With regards,
GitHub Actions via GitBox


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to