Atomic configuration writes with provider calls before persistence
Context
Owned configuration collections must change together. Exchange-rate filling also needs an external read, whose latency should not hold configuration locks.
Decision
Books commits or rolls back each configuration write as a database transaction. Rate filling calls the provider before persistence and outside that transaction; a provider quote is corrected by deleting it and filling again.
Alternatives Considered
Call the provider while holding the transaction. A slow or failed external request would prolong database locks.
Edit provider quotes directly. Editing would obscure which value actually came from the provider.
Persist before the provider read and compensate. The implemented provider operation is a read; delaying persistence avoids a separate undo flow.
Consequences
Rollback restores only the writes in the failed transaction, not previously committed work or consumer effects.
If persistence fails after a provider response, staff can request another fill.
Posting and other downstream effects have their own consistency boundaries.