mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-20 19:16:08 +00:00
61ea6b648c
UnitOfWork took the engine's write lock, but four repositories opened transactions of their own: the demo addon set, the plugin user erasure's savepoints, and the plugin metadata and scheduler cap checks. On Postgres those ran beside the others on the pool. writeTransaction (src/db/engine/write-transaction.ts) is now the one transaction that writes: UnitOfWork wraps it, and the demo seed and reset, which run outside the container, call it with the engine the environment names. The capped plugin writes run in their caller's unit of work instead of a transaction of their own, and the plugin erasure runs in the erasure's transaction without savepoints, since its three tables come with the migrations on both engines. lint:tx counts writeTransaction as a transaction.