diff --git a/app/service/risk/profile_l3.py b/app/service/risk/profile_l3.py index bfc587a..875d85c 100644 --- a/app/service/risk/profile_l3.py +++ b/app/service/risk/profile_l3.py @@ -107,6 +107,11 @@ def upsert_profile_l3( 返回合并后的 L3 行(含 customer_id)。MySQL 写成功后 DEL Redis 读缓存 `profile:l3:{customer_id}`(B7 挂账②落地,PRD §5.1;DEL 失败降级 TTL 过期, 不阻塞业务)。 + + 已知窗口(B7 自查留痕):DEL 在锁外执行,存在 cache-aside 经典竞态 + (读方 miss 读旧值 → 写方 DEL → 读方回填旧值),TTL 5 分钟兜底。一期 + 无读路径写缓存(get_profile_l3 直读 MySQL),窗口无实际影响;**对话线 + 接入 Redis 热读缓存时须改延迟双删或写后比对**。 """ repo = risk_repo or RiskRepository() mapped_tier = tier_of(alert_type)