23tae commented on code in PR #67900:
URL: https://github.com/apache/airflow/pull/67900#discussion_r3345541315
##########
airflow-core/src/airflow/api_fastapi/core_api/routes/public/backfills.py:
##########
@@ -253,6 +259,15 @@ def create_backfill(
)
return BackfillResponse.model_validate(backfill_obj)
+ except OperationalError as e:
+ if e.orig and hasattr(e.orig, "args") and e.orig.args and "database is
locked" in str(e.orig.args[0]):
+ raise HTTPException(
+ status_code=status.HTTP_503_SERVICE_UNAVAILABLE,
+ detail="Database is locked. Backfill creation is not supported
on SQLite "
+ "under concurrent access. Please use PostgreSQL or MySQL.",
+ )
+ raise
Review Comment:
Could we add a small regression test for this SQLite `"database is locked"`
case to make sure it returns 503?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]