Skip to content

AOS-435 Add in the ability to clean up after defunct sessions and remove need…

Monish Deb requested to merge AOS-435 into master

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

  1. 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.
  2. Creating a new table civicrm_event_holding_tickets_session which not only tracks the count of holding tickets for an event but on a per session basis
  3. Adds in an API method to the Job API to check the civicrm_event_holding_tickets_session table and to wind down the aggregate counter in the table civicrm_event_holding_tickets by finding any references in civicrm_event_holding_tickets_session for session_ids that no longer exist in civicrm_cache and then removing those now defunct rows from civicrm_event_holding_tickets_session
  4. Adds in an upgrade step to add in the new table

Merge request reports

Loading