feat(v2.3): 完成关系表写入闭环
This commit is contained in:
@@ -1,12 +1,17 @@
|
||||
# 开发路线图
|
||||
|
||||
## 当前阶段:V2.2 — 分区关系表与高频读取热路径
|
||||
## 当前阶段:V2.3 — 关系表写入与预计算闭环
|
||||
|
||||
V2.2 已完成第一批高频读取热路径:分区关系表基础、AppData 迁移预演、V2.2 scoped read API,以及版本详情、需求池、与我相关、小宝预警的前端快读接入。业务写入仍保留现有 AppData store 兼容窗口,后续再逐步打开关系表写入和领域 CRUD。
|
||||
V2.3 在 V2.2 快读路径之后补上写入闭环:前端仍保留现有 AppData Store 写入形状,但 AppData 保存成功后会同步关系表、刷新/标脏小宝风险摘要,并记录慢 API 与慢 Prisma 查询。领域 CRUD 仍是后续阶段,当前重点是让版本详情、需求池、与我相关和小宝预警在大数据量下持续命中关系表快读。
|
||||
|
||||
### 已完成(按时间倒序)
|
||||
|
||||
**2026-07-03**
|
||||
- V2.3 AppData write-side bridge added: successful `PUT /api/v1/data/:key` calls now trigger `AppDataV23SyncService` relation-table sync after optimistic-lock AppData writes.
|
||||
- Relation sync reuses the V2.2 mapper and replaces current-state rows by partition scope: requirements by `product_id`, version plans/dev tasks/test cases/bugs by `version_id`.
|
||||
- Append-only evidence tables continue to use duplicate-skipping inserts for work activities, worklogs, overtime, Xiaobao snapshots, and Xiaobao insights.
|
||||
- Xiaobao summaries now refresh from risk snapshots and are marked `dirty=true` when version risk inputs change.
|
||||
- Added lightweight observability: slow API request logging through a global Nest interceptor and slow Prisma query logging through query events.
|
||||
- V2.2 partitioned domain schema foundation added: `requirements` uses HASH partitioning by `product_id`; `dev_tasks`, `test_cases`, and `bugs` use HASH partitioning by `version_id`.
|
||||
- Partitioned table primary keys and business unique constraints now include partition keys, for example `(id, version_id)` and `(version_id, code)`.
|
||||
- Xiaobao precompute storage foundation added: `xiaobao_risk_summaries` stores the current version risk, and `xiaobao_risk_snapshots` stores historical snapshots.
|
||||
|
||||
Reference in New Issue
Block a user