Project

General

Profile

Actions

Bug #11400

open

Taxonomy validation causes N+1 warnings

Added by Lukas Zapletal almost 9 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Discovery plugin
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Many of them:

2015-08-18T12:40:18 [app] [W] user: lzap
 | http://localhost:3000/discovered_hosts/mac525400130513/auto_provision
 | N+1 Query detected
 |   Host::Managed => [:location]
 |   Add to your finder: :includes => [:location]
 | N+1 Query method call stack
 |   /home/lzap/work/foreman/app/models/nic/base.rb:238:in `validate_host_location'
 |   /home/lzap/work/foreman/app/models/concerns/orchestration.rb:59:in `valid?'
 |   /home/lzap/work/foreman/app/models/concerns/foreman/sti.rb:29:in `save_with_type'
 |   /home/lzap/work/foreman/app/models/host/base.rb:267:in `becomes'
 |   /home/lzap/work/foreman_discovery/app/services/foreman_discovery/host_converter.rb:10:in `to_managed'
 |   /home/lzap/work/foreman_discovery/app/controllers/concerns/foreman/controller/discovered_extensions.rb:48:in `block in perform_auto_provision'
 |   /home/lzap/work/foreman/app/models/host.rb:15:in `method_missing'
 |   /home/lzap/work/foreman_discovery/app/controllers/concerns/foreman/controller/discovered_extensions.rb:47:in `perform_auto_provision'
 |   /home/lzap/work/foreman_discovery/app/controllers/discovered_hosts_controller.rb:130:in `block in auto_provision'
 |   /home/lzap/work/foreman/app/models/host.rb:15:in `method_missing'
 |   /home/lzap/work/foreman_discovery/app/controllers/discovered_hosts_controller.rb:128:in `auto_provision'
 |   /home/lzap/work/foreman/app/controllers/concerns/application_shared.rb:13:in `set_timezone'
 |   /home/lzap/work/foreman/app/models/concerns/foreman/thread_session.rb:32:in `clear_thread'
 |   /home/lzap/work/foreman/lib/middleware/catch_json_parse_errors.rb:9:in `call'

No data to display

Actions

Also available in: Atom PDF