- Remove use of get_lock which is unsupported in galera clustering, and causes errors in Percona XtraDB Cluster.
- Improve reliability of updating forum's last post so it doesn't sometimes include very old threads
- Fix deleting a post in a thread not updating the forum last post
- Fix Out of range value for column 'discussion_count' error
Tweak SQL to ensure forum last post stats updates as expected.
- Note; by design the last post may not update all the time, but on average isn't noticeable on a active forum.
- Preserve original ordering of closures when pushing functions out of a transaction
- Hoist updating forum counters out of the new post/add reply transaction. Relaxes updates;
- removing a thread will not re-populate the last updated post
- moving a thread out of an empty forum has a race condition between the thread saving and the forum counters updating
- Forum counters are atomically incremented outside of a large transaction, and atomically conditionally updating the last post via SQL instead of read-mutate-update datawriter cycle
- Always defer user alerts inside a known DataWriter transaction to after that transaction.
- Revert previous attempt at preventing Like deadlocks.
- Allow Likes to retry once in case of a deadlock.
- Tweak how user alerts counter is incremented to reduce chance of a deadlock by touching less data.
- Remove the user of LOCK FOR UPDATE on thread select when deleting. Instead use "NulledTeam Post Delete Time Limit" add-on to restrict, independent of edit-times, for how old a post can be and still be deleted.