Project

General

Profile

Refactor #28564

improve fact cleanup performance

Added by Tomer Brisker 7 months ago. Updated 7 months ago.

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

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

Associated revisions

Revision 1f2c46e0 (diff)
Added by Tomer Brisker 7 months 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 7 months 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 7 months ago

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

#3 Updated by The Foreman Bot 7 months ago

  • Fixed in Releases 2.0.0 added

#4 Updated by Tomer Brisker 7 months ago

  • Status changed from Ready For Testing to Closed

#5 Updated by Tomer Brisker 7 months ago

  • Fixed in Releases 1.24.2 added

Also available in: Atom PDF