From 5c83cda10a02249b22c6ab677c62f68993ae2d1f Mon Sep 17 00:00:00 2001 From: YUAN Date: Sun, 6 Sep 2026 21:14:06 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20L3=20=E9=94=81=E5=A4=96=20DEL=20?= =?UTF-8?q?=E7=AB=9E=E6=80=81=E7=AA=97=E5=8F=A3=E7=95=99=E7=97=95(?= =?UTF-8?q?=E4=B8=80=E6=9C=9F=E6=97=A0=E8=AF=BB=E8=B7=AF=E5=BE=84=E6=97=A0?= =?UTF-8?q?=E5=BD=B1=E5=93=8D,=E5=AF=B9=E8=AF=9D=E7=BA=BF=E6=8E=A5?= =?UTF-8?q?=E7=BC=93=E5=AD=98=E6=97=B6=E6=94=B9=E5=8F=8C=E5=88=A0,=20B7=20?= =?UTF-8?q?=E8=87=AA=E6=9F=A5)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/service/risk/profile_l3.py | 5 +++++ 1 file changed, 5 insertions(+) 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)