KamoCRM

Give each organization a real transaction boundary

FixBillingService
Shipped
9 ஆகஸ்ட், 2026 அன்று 4:46 AM UTC
Author
Kamo
Commit
cfdf8f7

StorageSnapshotSweep.catchUp carried @Transactional(REQUIRES_NEW) and was called from sweep() on the same bean. Spring applies @Transactional through a proxy, so a self-call bypasses it entirely — the annotation described a boundary that did not exist, and the guarantee it was there for (one organization's failure cannot affect the rest) was resting on nothing. Moves the per-organization work into OrgStorageSnapshotWriter so the sweep calls across a bean boundary and the boundary is real. Also drops the per-page-load scan for the latest snapshot date in favour of the repository's MAX query.

All changes

Like what you see shipping?

All of it arrives in your workspace on its own. Start on the free plan and read this page again in a month.

Start Free ForeverView Pricing