Fixed an intermittent freeze where a save on a tamper-evident audit document could hang indefinitely, blocking every other write behind it.
Audit Trail Self-Deadlock on Tenant Writes
Saving an invoice or other audit-tracked document occasionally froze the whole request, and every subsequent write queued up behind it. The cause was the audit log being written on a different database connection than the record it was recording — two separate connections to the same database ended up waiting on each other's lock. The audit event now always uses the exact same connection as the save it belongs to.