Project

General

Profile

Bug #26504

Search Hosts by owner = current_user is very inefficient

Added by Timo Goebel almost 4 years ago. Updated almost 4 years ago.

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

Description

When a user is a member of four groups and the groups each have a role that allows view_hosts access with a "owner = current_user" search condition, page loading is very slow.
For every group the user leaves, the requests get faster.

This gist contains a request log from api/hosts/redacted.example.com.

https://gist.github.com/timogoebel/91bc1b6af28a1a6cdb598d713c3dc264/raw/0c33d1e7d8c379f52ca958641472828bcc6113a4/api-cleaned-sql.txt

The (very simple) request took 30 seconds to be generated.

Associated revisions

Revision 8776c9c3 (diff)
Added by Timo Goebel almost 4 years ago

fixes #26504 - host search current_user efficiently

History

#1 Updated by The Foreman Bot almost 4 years ago

  • Assignee set to Timo Goebel
  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/6636 added

#2 Updated by Tomer Brisker almost 4 years ago

  • Fixed in Releases 1.22.0 added

#3 Updated by Timo Goebel almost 4 years ago

  • Status changed from Ready For Testing to Closed

Also available in: Atom PDF