AssetManager.API/AssetManager.Infrastructure
OpenClaw Agent cbe0ac9f4a fix: 每次写入创建新 SqlSugarClient 实例
根因分析:
- MarketDataRepository 使用注入的 ISqlSugarClient(Scoped)
- 多个 Task.Run 并发调用 SavePriceCacheAsync
- Storageable 操作使用同一个 SqlSugarScope 实例
- 连接在 await 边界被复用 → 冲突

正确方案:
- SavePriceCacheAsync 每次创建新的 SqlSugarClient 实例
- MySQL 连接池会复用底层 TCP 连接,性能开销很小
- 不再需要 SemaphoreSlim 锁

优点:
- 完全避免连接冲突
- 代码更简洁
- 并发写入无限制
2026-03-25 02:37:18 +00:00
..
Services fix: 每次写入创建新 SqlSugarClient 实例 2026-03-25 02:37:18 +00:00
StrategyEngine fix: 请求收益曲线时自动回填历史数据 2026-03-13 16:21:31 +00:00
AssetManager.Infrastructure.csproj feat(市场数据): 添加Yahoo财经服务并设为优先数据源 2026-03-17 12:06:47 +08:00