vr-shopxo-plugin/plan.md

63 lines
2.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

# Plan — Round 1 Performance Evaluation (2026-05-26)
> Agent: council/PerformanceBenchmarker
## Phase: Draft → Review → Finalize
---
## 评估任务清单
- [x] **Task 1**: [Done: PerformanceBenchmarker] 检查 git log 和文件结构
- [x] **Task 2**: [Done: PerformanceBenchmarker] 探索 SeatMapService + seatmap API + SKIP LOCKED 实现
- [x] **Task 3**: [Done: PerformanceBenchmarker] 输出性能评估报告 → `docs/council-eval-performancebenchmark.md`
- [ ] **Task 4**: [Pending] 等待其他成员完成后,汇总至最终报告(西莉雅负责)
---
## 阶段划分
| 阶段 | 内容 | 状态 |
|------|------|------|
| **Draft** | Task 1-3独立评估 + 输出报告) | ✅ 完成 |
| **Review** | 等待 BackendArchitect、FrontendDeveloper、SecurityEngineer 完成评估 | ⏳ 等待 |
| **Finalize** | 西莉雅汇总所有成员报告,输出综合决策报告 | ⏳ 等待 |
---
## 依赖关系
- 本轮评估无对其他成员的依赖,可独立完成
- 最终综合报告由西莉雅(协调者)负责
---
## 投票结果
**议题:下一步主攻方向**
- 投票:**C双线并行**
- 备选A后端优先补充 seatSpecMap + 性能 P0 同步修复)
详见 `docs/council-eval-performancebenchmark.md`
---
## 关键发现摘要
| # | 严重程度 | 问题 | 量化 |
|---|----------|------|------|
| P1 | 🔴 严重 | `GoodsSpecBase` 全量扫描无分页 | 响应体 1-5 MBTTFB > 2s |
| P2 | 🔴 严重 | 无 `FOR UPDATE SKIP LOCKED`,超卖竞态 | 超卖率 = f(并发 × 事务时长) |
| P3 | 🟡 高 | 轮询无差异化,缓存击穿 | 500 并发 DB QPS = 2500+ |
| P4 | 🟡 高 | SoldSeats API stub | 支付后状态短暂不一致 |
| P5 | 🟢 中 | 模板缓存 TTL=60s 与轮询周期耦合 | 感知延迟 0-60s |
---
## 优先级建议
1. **P0**实现库存行锁FOR UPDATE SKIP LOCKED— 消除超卖
2. **P0**:添加 `(goods_id, inventory)` 复合索引 — 消除全表扫描
3. **P1**:实现细粒度库存轮询 API差量更新— 降低 80% DB 负载
4. **P2**Tree API 实现Phase 4