mirror of
https://github.com/tiennm99/goclaw.git
synced 2026-10-15 12:14:17 +00:00
chore(agents): remove dead UUID invalidation in agents_update
Post-Phase-2 canonicalization, router cache entries are always keyed as tenantID:agent_key. The belt-and-suspenders m.agents.InvalidateAgent(ag.ID.String()) call never matched any entry — exact-segment match on the final ":"- delimited segment cannot match a UUID as the agentKey. Removes the dead call and the misleading comment that justified it. Phase 2 follow-up (H7).
This commit is contained in:
1 parent
c599387248
commit
82dc4d3b94
1 file changed
+4
-3
@@ -237,10 +237,11 @@ func (m *AgentsMethods) handleUpdate(ctx context.Context, client *gateway.Client
|
||||
}
|
||||
}
|
||||
|
||||
// Post-Phase-2 canonicalization: router cache entries are always keyed
|
||||
// as `tenantID:agent_key`. The previous belt-and-suspenders UUID-based
|
||||
// invalidation was dead code — exact-segment match never matches a
|
||||
// UUID as the final segment of a canonical cache key.
|
||||
m.agents.InvalidateAgent(params.AgentID)
|
||||
// Also invalidate by UUID — heartbeat/cron sessions cached under UUID key
|
||||
// before the agentKey fix may still be in the router cache.
|
||||
m.agents.InvalidateAgent(ag.ID.String())
|
||||
}
|
||||
|
||||
client.SendResponse(protocol.NewOKResponse(req.ID, map[string]any{
|
||||
|
||||
Reference in new issue
Block a user