Project

General

Profile

Refactor #28564

improve fact cleanup performance

Added by Tomer Brisker over 3 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Facts
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Fixed in Releases:
Found in Releases:
Red Hat JIRA:

Description

`delete_orphaned_facts` step is very slow, it is loading all fact names and checking if they have fact values associated with them, then trying to also delete fact values unnecessarily.


Related issues

Related to Foreman - Feature #25227: Foreman-rake facts:cleanup batch/rolling supportClosed
Related to Foreman - Bug #30028: foreman-rake facts:clean fails with foreign key constraint violationClosed

Associated revisions

Revision 1f2c46e0 (diff)
Added by Tomer Brisker about 3 years ago

Fixes #28564 - improve performance of orphaned facts cleanup

This should greatly improve the performance of cleaning up orphaned
facts. First, we stop trying to delete fact_values for orphaned facts
since they don't exist. Then, instead of checking each compose fact's
descendants to see if they were all deleted, we get a set of all
remaining leaf's ancestors and delete any not on that list.

History

#1 Updated by The Foreman Bot over 3 years ago

  • Assignee set to Tomer Brisker
  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/7288 added

#2 Updated by Tomer Brisker over 3 years ago

  • Related to Feature #25227: Foreman-rake facts:cleanup batch/rolling support added

#3 Updated by The Foreman Bot about 3 years ago

  • Fixed in Releases 2.0.0 added

#4 Updated by Tomer Brisker about 3 years ago

  • Status changed from Ready For Testing to Closed

#5 Updated by Tomer Brisker about 3 years ago

  • Fixed in Releases 1.24.2 added

#6 Updated by Tomer Brisker over 1 year ago

  • Related to Bug #30028: foreman-rake facts:clean fails with foreign key constraint violation added

Also available in: Atom PDF