mirror of
https://github.com/Wei-Shaw/sub2api
synced 2026-12-06 01:12:31 +00:00
fix(repository): 对齐 ErrTxStarted 分支调度快照同步(兼容 testEntTx 夹具)
This commit is contained in:
1 parent
517f3222e4
commit
76981e526b
1 file changed
+3
-2
@@ -298,8 +298,9 @@ func (r *accountRepository) updateOllamaCloudUsageGroup(
|
||||
if err := apply(ctx, r.client); err != nil {
|
||||
return err
|
||||
}
|
||||
// 外层事务尚未提交且未把 tx 放进 ctx:outbox 已在事务内落库,
|
||||
// 不能提前把未提交行刷进 Redis 快照,交由 outbox 在外层提交后异步同步。
|
||||
// 对齐 account_repo.go:516(contextTx == nil 时立即刷快照,兼容 testEntTx 集成测试夹具;
|
||||
// 生产嵌套事务均经 dbent.TxFromContext 走上方 AfterAccountCommit 分支)。
|
||||
r.syncSchedulerAccountSnapshots(ctx, syncedMemberIDs)
|
||||
return nil
|
||||
}
|
||||
if err != nil {
|
||||
|
||||
Reference in new issue
Block a user