Files

10 lines
692 B
Markdown
Raw Permalink Normal View History

# CSV Storage Engine Manifest
2026-10-23 11:43:49 -05:00
## Purpose
Partitioned CSV file storage engine (`core/Storage/csvStorage.ts`) responsible for writing, rotating, inspecting, and pruning collected event datasets on disk.
2026-10-23 11:43:49 -05:00
## Storage Conventions
- **Path Pattern**: `/storage/data/{clientId}/{YYYY-MM-DD}.csv`
- **Columns**: `clientId,eventId,timestamp,payload`
- **Size & Daily Rotation**: Creates a new daily file per client and rotates to `{YYYY-MM-DD}-part2.csv` when a file reaches `maxFileSizeBytes` (configurable via `fileRotationMb`, default `100MB`).
- **Retention Pruning**: `pruneExpiredPartitions(autoPruneDays)` automatically removes daily CSV partitions older than the configured retention period.