iconsulting/packages/services/payment-service/src/infrastructure/database
hailin 65c0bdd17c feat(payment): add transaction reliability and idempotency support
- Add TransactionService for atomic database operations with optimistic lock retry
- Implement pessimistic locking in payment callback handling to prevent race conditions
- Add idempotency check via transactionId unique index to prevent duplicate processing
- Add version columns to PaymentORM and OrderORM for optimistic locking
- Add composite indexes for performance (order_status, transaction_id)
- Optimize connection pool settings for both payment and conversation services
- Update init-db.sql with version columns and new indexes

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 07:00:01 -08:00
..
postgres/entities feat(payment): add transaction reliability and idempotency support 2026-01-25 07:00:01 -08:00
transaction.service.ts feat(payment): add transaction reliability and idempotency support 2026-01-25 07:00:01 -08:00