-
Notifications
You must be signed in to change notification settings - Fork 15
Description
The daily GTFS update flow refreshes in-memory static data only.
The persistent SQLite database (gtfs.db) is not rebuilt, causing SQL-backed endpoints to serve stale data.
TODOs
-
Build New SQLite Database
After downloading the new GTFS feed inupdateStaticGTFS, build a fresh SQLite database to a temporary file (e.g.gtfs_next.db) with all tables and indexes. -
Initialize New GtfsDB Client
Open a newGtfsDBclient using the newly built database and verify it is readable before activation. -
Hot-Swap Active GtfsDB
Atomically replace the activeGtfsDBclient inManagerso new requests use the updated database without downtime. -
Sync In-Memory Static Data
Reload or realign in-memory static data structures to ensure consistency with the newly swapped SQLite database. -
Clean Up Old Database
Gracefully close the old database connection and remove the previous SQLite file after the swap succeeds.
Acceptance Criteria
- SQLite-backed endpoints serve fresh GTFS data after the daily update
- No downtime or inconsistent reads during the database swap
- In-memory and persistent GTFS data remain in sync