docs: align jt808 mileage storage

This commit is contained in:
lingniu
2026-07-01 04:00:57 +08:00
parent 371b89aeb0
commit e97116202b
2 changed files with 11 additions and 14 deletions

View File

@@ -126,10 +126,11 @@ calculation_method = JT808_TOTAL_MILEAGE_DIFF
- Store the metric in `vehicle_stat_metric` with
`metric_key = daily_mileage_km`.
- Keep rolling daily calculation state in Redis.
There is no JT808-specific daily mileage table and no in-memory production
state-store mode.
state-store mode. Daily start total, latest total, and derived mileage are all
stored in `vehicle_stat_metric`, so restart recovery does not require a separate
Redis mileage state.
### Latest State
@@ -156,7 +157,6 @@ flowchart LR
kafka --> state["vehicle-state-service"]
history --> tdengine["TDengine<br/>raw_frames + locations"]
analytics --> mysql["MySQL<br/>vehicle_stat_metric"]
analytics --> redisCalc["Redis<br/>mileage state"]
state --> redisState["Redis<br/>latest state"]
```
@@ -167,7 +167,8 @@ flowchart LR
- Kafka producer failures are handled by sink retry/circuit-breaker behavior and
DLQ topics where configured.
- History consumers should commit offsets only after TDengine writes succeed.
- Analytics state can recover from Redis state or Kafka replay.
- Analytics daily mileage state can recover from `vehicle_stat_metric` or Kafka
replay.
- Raw archive failures must be observable, but event publication and history
indexing remain separate concerns.
@@ -182,6 +183,6 @@ flowchart LR
- Location queries page over compact rows and reference raw records instead of
duplicating full raw JSON.
- JT808 daily mileage is stored only in `vehicle_stat_metric`.
- Runtime state needed for 808 mileage uses Redis, with no production memory
mode.
- Runtime state needed for 808 mileage is also in `vehicle_stat_metric`, with no
Redis or production memory state-store mode.
- Build validation covers the active modules and their composition tests.