You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We don't implement purge_associated_records in many of these models so the association tables are left orphaned. I think we can add CustomAttribute to that list also.
The text was updated successfully, but these errors were encountered:
"we remove purging from container_group, container_image, container_node, container_project, container, keep the schedule, but in the schedule it just does a destroy_all - probably don't need batching at all as long as each record is committed"
Basically, we can ensure archiving works for the container* primary tables and then make sure the archived rows are removed and when removed, they should use destroy_all so the associated tables are cascaded, leaving no orphaned associations in other tables. Note, we'll need to make sure the destroy_all happens in a small enough batch size so the work item doesn't timeout trying to remove the data associated with the record.
jrafanie
changed the title
Some of the Container related tables implement purging but don't purge_associated_records
Change Container related tables purging to use archiving and destroy_all on archived records as they age out
Jan 14, 2025
I found the following workaround I could run in bin/rails console in dev or on appliances to clean up some of the container related tables with orphaned rows after the purger removed the higher level container entities but not the associated tables.
Container related tables
These tables aren't being purged with the purger for the principal container* models.
Even with these configured in my db:
and running:
I'm still seeing several tables with orphaned records:
We don't implement
purge_associated_records
in many of these models so the association tables are left orphaned. I think we can add CustomAttribute to that list also.The text was updated successfully, but these errors were encountered: