dev/core#1675 and dev/core#1695 - Revert part of DB package upgrade that is causing transaction issues #289
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
In 5.23 the DB package was upgraded and part of that upgrade causes it to start a database transaction as soon as CRM_Core_Transaction is initialized, whereas before it wouldn't until a "manipulation" statement was issued. That's not necessarily bad, but seems incompatible with some transactions in civi.
https://lab.civicrm.org/dev/core/-/issues/1675
https://lab.civicrm.org/dev/core/-/issues/1695
Before
Adding a timeline messes up the last activity.
Submissions of custom fields from webform don't get created.
After
Hopefully this buys more time and heads off more similar issues until can figure out if there's a better way.
Technical Details
Lots of details in the tickets.
Comments
If going this route I'd remove the hack in XMLProcessor/Process.php that was a quickfix in 5.24 for the first issue.
I've done some minimal clicking around and haven't seen anything break yet.
Note that tests might not catch these since if running within a transaction it will still "see" the created entries even when not committed yet.