Forums | Mahara Community
Support
/
Upgrade from 17.04 to 18.10 issue
14 August 2019, 8:14
Hi,
It's very stange when a try to updrage site from 17.04 to 18.10, i fall into long process with no end :).
in the upgrade.php file (ln 235) this piece of code cosume too many time
log_debug('Adjust existing "event_log" data for "saveview" and "deleteview" events');
$sql = "UPDATE {event_log} e
LEFT JOIN {view} v ON v.id = JSON_EXTRACT( CAST( e.data AS JSON ), '$.id')
SET e.resourceid = JSON_EXTRACT( CAST( e.data AS JSON ), '$.id'),
e.resourcetype = 'view',
e.ownerid = v.owner,
e.ownertype = CASE WHEN v.owner IS NULL THEN NULL ELSE 'view' END
WHERE e.event IN ('saveview', 'deleteview')";
execute_sql($sql);
In the fisrt try, it tooks more 2 hours (in fact i lost connection after long time), in the second try i comment this code and i upgrade run like a charm and i finish my upgrade.
But i'am not sure that is a good way to make this workaround.
I tried to identify what's happens but no success.
Thank you
22 August 2019, 9:18
Hi Aurelien,
Can you tell us if you're using MySQL or postgres and what version?
Thanks,
Cecilia
23 August 2019, 10:42
Hi Aurelien,
I tried replicating the problem but couldn't with a simple database with just a few logs. If you didn't see any errors when you tried to upgrade, then it's likely the number of logs you have in the "event_log" table that's breaking it.
I made a bug report to improve the query that you reported, you can check the progress here
It would be really useful for us to know how many logs you have in the event_log table so we can test and fix the problem. Could you please run the following query in your database and let us know how many records you get?
SELECT COUNT(*) FROM event_log WHERE event IN ('saveview', 'deleteview')
You can let us know by replying here or in the bug report as a comment.
Thank you,
Cecilia
19 October 2019, 1:19
Hi Cecilia,
Did you have some news. We runed updrage trhough cron tab and it takes 2 hours.
Do you have possibilities to change script for better performance ?
Regards