[OJS-3.4.0-4] Statistic problem

Hi @bozana thanks for your support and guidance.

I have cleared the log file of December 2023 and the image below is showing the statistics of 01 December 2023. But on 20231212 I am getting failed jobs, error is mentioned below.

“message”: “SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (ojs4.metrics_submission, CONSTRAINT metrics_submission_representation_id_foreign FOREIGN KEY (representation_id) REFERENCES publication_galleys (galley_id) ON DELETE CASCADE) (SQL: insert into metrics_submission (load_id, context_id, submission_id, representation_id, submission_file_id, file_type, assoc_type, date, metric) select load_id, context_id, submission_id, representation_id, submission_file_id, file_type, assoc_type, DATE(date) as date, count(*) as metric from usage_stats_total_temporary_records where load_id = usage_events_20231212.log and assoc_type = 515 group by load_id, context_id, submission_id, representation_id, submission_file_id, file_type, assoc_type, DATE(date))”,
“code”: “23000”,

I have tried to re-run the stuck log file of 15-17 February 2024 in the Processing and Stage folder. I have tried splitting the log file from 35 MB into smaller file size around 15-15 MB and re-run and 99% of the log file gets processed successfully.

I have run SHOW ENGINE INNODB STATUS and got some lock logs 20231208 and 20231212. I have re-run that date log file and the process completed successfully. 20231202 Log file locking table is not visible for that day after re-run the log file.

Let’s see what happens in the next 3-4 days. If there is any problem then I will try patching as per your suggestion ([OJS-3.4.0-4] Statistic problem - #76 by bozana). :slightly_smiling_face: