mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-11 05:31:48 +00:00
Recovering a poisoned Postgres txn with a full frappe.db.rollback() discards rows the handler already created before the failure -- which MariaDB keeps (no statement-abort) -- so it's a silent MariaDB regression. 'Owns the txn' does not make a full rollback safe in a loop handler. Document the safe cases (re-raise / single op / atomic batch) and the per-iteration/per-record savepoint alternative. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>