feat(v2.2): 完成高频读取热路径
This commit is contained in:
@@ -243,3 +243,12 @@ Partitioned tables must include the partition key in every primary key and busin
|
||||
Xiaobao uses two storage shapes: `xiaobao_risk_summaries` keeps one current row per version for fast reads, while `xiaobao_risk_snapshots` stores append-only history for trend analysis.
|
||||
|
||||
The AppData migration path is staged through a pure mapper plus preview service. `AppDataV22MigrationService.preview()` reads the allowed `app_data` keys, maps legacy JSON into partition-key-ready rows, and reports row counts plus skipped records before any insert path is enabled.
|
||||
|
||||
The first V2.2 read layer is query-first and AppData-compatible. `V22QueryModule` exposes scoped read APIs for version detail, requirement pool, workspace, and Xiaobao warning summaries:
|
||||
|
||||
- Version detail reads only the current version's requirements, plans, dev tasks, test cases, and bugs.
|
||||
- Requirement pool queries require `productId`, so list/search/filter operations stay on the `requirements.product_id` partition key.
|
||||
- Workspace reads only the current user's unfinished plans, dev tasks, test cases, and bugs.
|
||||
- Xiaobao warning reads `xiaobao_risk_summaries` first, then maps the precomputed summary into the existing warning UI shape.
|
||||
|
||||
During the V2.2 compatibility window, writes still go through the existing AppData stores. The frontend consumes V2.2 relation-table results for render-heavy pages and falls back to AppData only when the V2.2 read is unavailable or empty.
|
||||
|
||||
Reference in New Issue
Block a user