rwadurian/backend/services/mining-service/src/infrastructure
hailin 49949ff979 fix(mining): use unified transaction to prevent timeout errors
- Wrap all database operations in executeSecondDistribution with
  UnitOfWork.executeInTransaction
- Pass transaction client to repository save methods
- Use longer transaction timeout (60s) for batch operations
- Move Redis operations outside transaction (non-ACID)
- Add distributeToSystemAndPendingInTx method that accepts tx client

This resolves the "Unable to start a transaction in the given time"
error caused by multiple concurrent transactions competing for
database connections.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 00:31:20 -08:00
..
kafka feat(2.0-services): 为auth/mining/trading服务添加Outbox事件发布机制 2026-01-10 20:54:37 -08:00
persistence fix(mining): use unified transaction to prevent timeout errors 2026-01-17 00:31:20 -08:00
redis fix(mining-service): Redis锁使用毫秒PX代替秒EX支持小数TTL 2026-01-14 03:52:22 -08:00
infrastructure.module.ts fix(mining): remove duplicate burn mechanism from mining-service 2026-01-16 07:31:13 -08:00