neos / neos-development-collection

The unified repository containing the Neos core packages, used for Neos development.
https://www.neos.io/
GNU General Public License v3.0
260 stars 221 forks source link

TASK: Remove transaction closures from projections #5075

Closed bwaidelich closed 4 months ago

bwaidelich commented 4 months ago

Removes the many transactional closures from our projections that made the code harder to read and especially made exceptions much harder to debug.

Due to our current architecture (see #4746) all Projection::apply() calls are wrapped in a transaction anyways

Related: #3854

mhsdesign commented 4 months ago

I guess this fixes our problem https://github.com/neos/neos-development-collection/issues/4970 as well?

mhsdesign commented 4 months ago

Ah and i see #4988 will remove the whole DbalCheckpointStorage and thus my todo comment that would be solved via this pr. But thats oke thanks a lot!!

https://github.com/neos/neos-development-collection/blob/e5d9595cca8135b44222a737c9cc69f4be1b8061/Neos.ContentRepository.Core/Classes/Infrastructure/DbalCheckpointStorage.php#L118-L121

mhsdesign commented 4 months ago

Due to our current architecture (see #4746) all Projection::apply() calls are wrapped in a transaction anyways

okay so currently the nested transactions are obsolete? and how will this change with #4988 will there also be one transaction around?

bwaidelich commented 4 months ago

I'll add one beginTransaction call at the start and one commit call to the end of apply

mhsdesign commented 4 months ago

sounds good but you might want to have input from someone more qualified than a wall (me regarding this topic :D)