Backend: Implement background syncing to ensure catalog_resource_versions is synced with releases
Summary
In order to improve the performance of queries using catalog_resource_versions
, we will need to denormalize releases.releases_at
(#430117 (closed)) and potentially other columns in the future.
The problem with relying on model callbacks to keep the columns in sync is that it may miss bulk updates or direct database updates that don't use ActiveModel. So in order to provide a robust syncing process, we should implement a database trigger along with a queue table and workers.
UPDATE:
We discussed in #432189 (comment 1666538958) that the fields we're syncing between catalog_resource_versions
and releases
have a low risk of going out of sync and a non-critical impact if it does happen. So we can rely on syncing via model callbacks in #430117 (closed).
Closing issue and setting VerifyCancel won't do