Details
-
Type: Improvement
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 4.6.0-b1
-
Component/s: None
-
Labels:None
Description
A deadlock can sometimes be encountered when creating invoices for large data sets, particularly the combination of the cron running to create invoices from services while the system adds an invoice elsewhere.
- Replicate the deadlock consistently to fix
- Attempt to retry the transaction that deadlocked
- If necessary, wait before running
- The script can sleep for a period of time (50-100ms) so there is a small window where a new invoice could be created if they are created too frequently that there is no time window for another process to create an invoice