-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Current Status
Currently, hauls and trips have a column cache_version in the database that gets incremented every time the row is updated through triggers.
This causes the Meilisearch worker to update these values in the cache.
Similarly, landings has a column version that works the same way, however, this column comes from the raw CSV data and is not managed by us because we never update the landings table.
After PR #930
PR #930 added trip_id to the Haul and Landing.
This means that every time a haul or landing gets connected/disconnected from a trip their cache_version needs to be incremented (for landings we also need to add a cache_version column instead of using the version field).
The cache_versions can be incremented in two ways:
- A trigger on
vessel_eventsthat increments thecache_versionof its correspondinghaul/landing. - Modify every query that updates
vessel_eventsto also increment thecache_versionof its correspondinghaul/landing.
Caution
These changes must be implemented before we can deploy the Meilisearch cache.