AOS-435 Add in the ability to clean up after defunct sessions and remove need…
Created by: seamuslee001
… from locks in favour of MySQL doing the relevant calculation when updating the counter
This aims to assist AOS-435 by doing a few things
- Removing the aquring and releasing of MySQL locks as i am moving the updating of the counter to just a single query in MySQL and that should be robust enough to not have issues between different sessions.
- Creating a new table
civicrm_event_holding_tickets_sessionwhich not only tracks the count of holding tickets for an event but on a per session basis - Adds in an API method to the Job API to check the
civicrm_event_holding_tickets_sessiontable and to wind down the aggregate counter in the tablecivicrm_event_holding_ticketsby finding any references incivicrm_event_holding_tickets_sessionfor session_ids that no longer exist incivicrm_cacheand then removing those now defunct rows fromcivicrm_event_holding_tickets_session - Adds in an upgrade step to add in the new table