| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| cli | ||
| common | ||
| config | ||
| modules | ||
| openapi | ||
| prisma | ||
| queues | ||
| redis | ||
| types | ||
| app.module.ts | ||
| health.controller.ts | ||
| instrument.ts | ||
| main.ts |
上一提交给 resolvePlanBatchSize 留了个「显式传 0 = 不分批」当回滚开关,照抄 cold-import 的
resolveCohortBatchSize 形状。2026-09-04 在测试机实跑 A/B 时当场炸:
PAC_PLAN_BATCH_SIZE=0 + 88,728 命中患者
→ Invalid `prisma.followupPlan.findMany()`:
too many bind variables in prepared statement, expected maximum of 32767, received 32769
两个错都在这一档上:
① **它绕过了同一函数里那条 20000 的硬上限。** latest/persona 走 `patientId: { in: ids }`,
每个 id 一个 bind。昨天(b0d45e60)刚给 reparse 夹住同一堵墙、还在注释里写了
「别让墙从另一侧长回来」,今天在这儿亲手开了个后门。同一类错,隔一天,换个入口。
② **它压根不等价于改造前。** 改造前 prefetchForBatch 内部有 CHUNK=2000 循环,
取数从来没有一次超过 2000 个 id;把内循环删掉后,「一批 = 全部患者」是旧代码
**从未有过**的行为。拿它当 A/B 对照组,量出来的东西没有意义 —— 这也是它最误导人的地方:
我本来打算用它做"改造前"的基准。
⇒ 删掉该档,任何取值一律夹进 [1, 20000]。真正的回退手段是 revert,不是拧旋钮;
旋钮只调批大小,不调"分不分批"。注释里把这段经过写下来,防止有人觉得
「加个 single-shot 更灵活」再加回来。
测试:原来那条断言 `0 → 0` 反转成 `0 → 2000`(必须被夹住),describe.each 去掉 0 档。
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| cli | Loading commit data... | |
| common | Loading commit data... | |
| config | Loading commit data... | |
| modules | Loading commit data... | |
| openapi | Loading commit data... | |
| prisma | Loading commit data... | |
| queues | Loading commit data... | |
| redis | Loading commit data... | |
| types | Loading commit data... | |
| app.module.ts | Loading commit data... | |
| health.controller.ts | Loading commit data... | |
| instrument.ts | Loading commit data... | |
| main.ts | Loading commit data... |