You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Templates are themes table are re-initialized at application startup in a transaction that empties the database table and feeds it using the discovered files.
In a multi-process setup with (u)wsgi and lazy-apps set to true, multiple transactions may be performed in parallel during application startup. This leads to the failure and rollback of one or several of them because the first one may be in the commit stage while the other is in the processing stage.
This is not destructive as the transaction is rolled back but sqlobject.dberrors.DuplicateEntryError as well as psycopg2.errors.UniqueViolation exceptions are raised and never caught, making the app crash.
While we could logically accept such a failure and pass on sqlobject.dberrors.DuplicateEntryError, it is not sufficient to catch the sqlobject backend underlying exception (psyscopg in the case of postgre). Catching all exceptions and passing could lead to more instable behaviour (I/O erros, ...)...
The text was updated successfully, but these errors were encountered:
Templates are themes table are re-initialized at application startup in a transaction that empties the database table and feeds it using the discovered files.
ICTV/ictv/app.py
Line 372 in 97c8dcb
ICTV/ictv/app.py
Lines 87 to 90 in 97c8dcb
In a multi-process setup with (u)wsgi and lazy-apps set to true, multiple transactions may be performed in parallel during application startup. This leads to the failure and rollback of one or several of them because the first one may be in the commit stage while the other is in the processing stage.
This is not destructive as the transaction is rolled back but
sqlobject.dberrors.DuplicateEntryError
as well aspsycopg2.errors.UniqueViolation
exceptions are raised and never caught, making the app crash.While we could logically accept such a failure and pass on
sqlobject.dberrors.DuplicateEntryError
, it is not sufficient to catch the sqlobject backend underlying exception (psyscopg in the case of postgre). Catching all exceptions andpass
ing could lead to more instable behaviour (I/O erros, ...)...The text was updated successfully, but these errors were encountered: