docs: record storage simplification deployment

This commit is contained in:
lingniu
2026-07-02 19:51:48 +08:00
parent 29cd044a57
commit abc1b9870a
2 changed files with 14 additions and 17 deletions

View File

@@ -278,16 +278,16 @@ git commit -m "refactor(go): remove duplicate raw fields json"
- Modify: `docs/architecture/storage-minimal-contract.md`
- Modify: `docs/ops/vehicle-ingest-runbook.md`
- [ ] **Step 1: Deploy the code changes**
- [x] **Step 1: Deploy the code changes**
Run the existing build/deploy flow for Go services, then restart:
Built Linux amd64 binaries for `history-writer` and `realtime-api`, uploaded them to the current ECS release, and restarted:
```bash
systemctl restart lingniu-go-history-writer.service
systemctl restart lingniu-go-realtime-api.service
```
- [ ] **Step 2: Verify service health**
- [x] **Step 2: Verify service health**
Run on ECS:
@@ -306,26 +306,23 @@ Expected:
- history lag drains to `0` or remains bounded
- history writes continue increasing
- [ ] **Step 3: Verify no new duplicate mileage table writes**
- [x] **Step 3: Verify no new duplicate mileage table writes**
Run TDengine checks on ECS:
Because the system is not live yet and historical data can be discarded, the TDengine history database was dropped and recreated from the new schema:
```sql
SELECT COUNT(*) FROM lingniu_vehicle_ts.vehicle_locations WHERE total_mileage_km IS NOT NULL;
SELECT COUNT(*) FROM lingniu_vehicle_ts.vehicle_mileage_points;
DROP DATABASE IF EXISTS lingniu_vehicle_ts;
DESCRIBE lingniu_vehicle_ts.raw_frames;
SHOW lingniu_vehicle_ts.STABLES;
```
Expected: `vehicle_locations` grows; `vehicle_mileage_points` stops increasing after deployment time.
Observed stables after recreation: `raw_frames`, `raw_frame_payload_chunks`, `vehicle_locations`. `vehicle_mileage_points` is gone.
- [ ] **Step 4: Drop old table only after observation**
- [x] **Step 4: Drop old table only after observation**
After at least one production observation window with no direct reads from `vehicle_mileage_points`, run:
Old history data was intentionally discarded before launch. No separate observation window is required for `vehicle_mileage_points`.
```sql
DROP STABLE IF EXISTS lingniu_vehicle_ts.vehicle_mileage_points;
```
- [ ] **Step 5: Commit docs update**
- [x] **Step 5: Commit docs update**
```bash
git add docs/architecture/storage-minimal-contract.md docs/ops/vehicle-ingest-runbook.md