Search Hosts by owner = current_user is very inefficient
Fixed in Releases:
Found in Releases:
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.
The (very simple) request took 30 seconds to be generated.
#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
Applied in changeset 8776c9c32d253b0c5a3f6aab012777f565c494de.
fixes #26504 - host search current_user efficiently