feat(unreachable-cooldown): 连接层不可达客户端级冷却,四家判定下沉共用

BACKLOG B24(窗长 300s 已拍板):连续 2 次连接未建立即对该 host 进
冷却窗,窗内调用零探针快速失败(归因文案与调用内短路逐字一致);到期
后下一条真实调用兼作探针,失败重进、成功恢复。isConnectFailure 四处
副本(BrandCheckClient/AppearancePatentLlmClient/SimilarAsinLlmClient/
TaskOwnerForwardService)下沉 common/retry 共用。三家客户端接入同一
冷却表(两个 LLM 客户端共用 ai.t8star.org 一格,16890 独立一格),
窗长可配(0=关闭退回调用内短路)。另修 CollectDataBrandBatchFilter
首批预算竞态(1ms 预算下 GC 停顿误切首批,照 BrandCheckClient 首轮
不掐契约补 start>0 守卫)。变异验证:冷却禁用 6 例判红;定向 47/47 绿。
This commit is contained in:
2026-10-23 20:58:32 +08:00
parent 6af19b51ba
commit 09dfb01f9c
22 changed files with 426 additions and 99 deletions
@@ -118,7 +118,10 @@ public class CollectDataBrandBatchFilter {
}
continue;
}
if (deadlineNanos != Long.MAX_VALUE && System.nanoTime() >= deadlineNanos) {
// 首批不掐(与 BrandCheckClient 的 attempt>1 同契约):预算检查只拦后续批次。
// 对首批也查的话,deadline 计算与检查之间一次 GC/调度停顿(毫秒级)就会把首批
// 整组误切成 queryFailed——1ms 预算的测试已实测抖出过这个形状。
if (start > 0 && deadlineNanos != Long.MAX_VALUE && System.nanoTime() >= deadlineNanos) {
// 预算用尽:不再为后面的批次捶上游。已缓存的品牌仍按缓存结论归类(不花代价),
// 没结论的行归 queryFailed 入补测队列——既不按 accepted 放行(可能正是侵权品牌),
// 也不按 rejected 拉黑(没查过就不该写进无效品牌表,否则永久误杀)。