catalyst / moodle-tool_excimer

A Moodle tool to find bottlenecks in your code safely in production
https://moodle.org/plugins/tool_excimer
GNU General Public License v3.0
13 stars 9 forks source link

Add unique index for page groups #348 #350

Closed bwalkerl closed 3 months ago

bwalkerl commented 3 months ago

Closes #348

We have a minor loss in data with concurrent updates that can cause duplicate rows, so this adds a unique index on name and month and catches unique key errors.

This same problem does occur with updates when fuzzycount is low, but realistically this isn't a big concern as these are estimates, and the ones with the low fuzzycount will get updated quickly.

We don't want any sort of transactions or locking to ensure we do no harm - so best to ignore those cases.

For upgrade script logic: