Project

General

Profile

Refactor #20024

Improve performance of rhsm fact importer

Added by Shimon Shtein about 5 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Hosts
Target version:
Branch:
Difficulty:
Triaged:
Yes
Bugzilla link:
Fixed in Releases:
Found in Releases:
Red Hat JIRA:

Description

Today it takes ~600ms for each host, even when the facts are the same.
This is caused by wrong handling of hierarchy - the non-leaf levels are deleted and then re-added on each facts upload.


Related issues

Related to foreman-tasks - Bug #19951: updating host can cause large values to get passed via dynflow envelope, slowing task processingRejected2017-06-07

Associated revisions

Revision 23d08027 (diff)
Added by Shimon Shtein about 5 years ago

Fixes #20024 - Improved RhsmFactImporter to handle hierarchy

Now the importer inherits `StructuredFactImporter` which is
the base class to handle hierarchic facts. All it has to do is
proper fact normalization on init. Everything else is handled
by the framework.

Now the framework does not try to delete parent nodes, which reduces
drastically the number of SQL queries.

History

#1 Updated by Shimon Shtein about 5 years ago

  • Related to Bug #19951: updating host can cause large values to get passed via dynflow envelope, slowing task processing added

#2 Updated by The Foreman Bot about 5 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/6825 added

#3 Updated by Shimon Shtein about 5 years ago

  • Bugzilla link set to 1458857

#4 Updated by Adam Ruzicka about 5 years ago

  • Target version set to 1.14.1

#5 Updated by Shimon Shtein about 5 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#6 Updated by Daniel Lobato Garcia about 5 years ago

  • Legacy Backlogs Release (now unused) set to 250

This would be nice for 3.4.2, but not without tests :/

#7 Updated by Shimon Shtein about 5 years ago

There is a basic importer test that tests basic fact importing: https://github.com/Katello/katello/blob/master/test/models/rhsm_fact_importer_test.rb

#8 Updated by Eric Helms about 5 years ago

  • Legacy Backlogs Release (now unused) deleted (250)

Please try not to set release outside of our weekly triage process. Unsetting the release so it can be triaged.

#9 Updated by Justin Sherrill about 5 years ago

  • Category set to Hosts
  • Legacy Backlogs Release (now unused) set to 258

#10 Updated by Eric Helms about 5 years ago

  • Legacy Backlogs Release (now unused) changed from 258 to 267

#11 Updated by Eric Helms about 5 years ago

  • Legacy Backlogs Release (now unused) changed from 267 to 258

Also available in: Atom PDF