- SearchIdentity 增加 NoTenantField,按目标 profile 决定是否注入 tenant_id (写入、归属预检、恢复搬运三条路径) - 归属冲突与写集合不匹配写明具体字段,排查不用再猜 - 网关侧 acquire 冲突打印 plan/claim/owner 三项
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"github.com/jackc/pgx/v5"
|
||||
"log"
|
||||
"math"
|
||||
)
|
||||
|
||||
@@ -39,6 +40,9 @@ func (g *Gateway) Acquire(ctx context.Context, c Claim) (Grant, error) {
|
||||
return Grant{}, e
|
||||
}
|
||||
if plan.Digest != c.PlanDigest || plan.Owner != Digest([]byte(c.JobID)) {
|
||||
// 冲突原因要能在服务端日志里定位:是谁的 plan、对不上哪一项。
|
||||
log.Printf("gateway acquire conflict job=%s op=%s plan=%s claim=%s owner_ok=%t",
|
||||
c.JobID, c.OperationID, plan.Digest, c.PlanDigest, plan.Owner == Digest([]byte(c.JobID)))
|
||||
return Grant{}, ErrConflict
|
||||
}
|
||||
if e = g.InstallPlan(ctx, plan); e != nil {
|
||||
|
||||
Reference in New Issue
Block a user