-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Description
Preconditions and environment
- 2.4.7
Steps to reproduce
A Magento module with a cron job in the default group, with a scheduled time that overlaps with other crons.
The new cron job runs before some other cron jobs.
The new cron job starts a transaction and then throws an error leaving the transaction open.
Expected result
Later cron jobs all start with transaction level=0. (And the DB does not have an open transaction).
Actual result
Later cron jobs all start with transaction level=1. (And the DB has an open transaction).
Also, increased rates of lock wait timeout as the locks taken are kept open until all the cron jobs finish running.
Additional information
Note: It is not currently possible to access all connections from ResourceConnection as the named connections from the connections
property are not exposed via a public method.
Note: Closing all connections is possible via closeConnection(null). (Though this may unlock locks held by the ProcessCronQueueObserver)
It would be a significant improvement if ProcessCronQueueObserver checked if the default connection's Transaction level was not equal to 0, and if so, it rolled back until it reached zero. (Or closing the connection; or even aborting would be better than starting a new job with transaction level not equal to zero).
Release note
No response
Triage and priority
- Severity: S0 - Affects critical data or functionality and leaves users without workaround.
- Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
- Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
- Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
- Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status