You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This method retrieves all of layer objects the host factory is a member of, in order to add created host objects to these same layers. However, this filter is implemented as Ruby code, rather than through SQL:
This leads to performance issues because the host factory is a "member of" each host it creates, by nature of being the owner. This means that each host is loaded from the database in order to apply the filter against it (membership.role.kind == "layer").
This layer filter should instead be implemented as SQL query returning only the layer memberships directly from the database.
The text was updated successfully, but these errors were encountered:
When a host factory is used to create many hosts (> 1000), the performance of host creation begins to degrade significantly.
This stems from the
layers
retrieval for the host factory:conjur/app/controllers/host_factories_controller.rb
Line 29 in e336a1d
This method retrieves all of
layer
objects the host factory is a member of, in order to add createdhost
objects to these same layers. However, this filter is implemented as Ruby code, rather than through SQL:conjur/app/models/role.rb
Lines 129 to 133 in e336a1d
This leads to performance issues because the host factory is a "member of" each host it creates, by nature of being the
owner
. This means that each host is loaded from the database in order to apply the filter against it (membership.role.kind == "layer"
).This layer filter should instead be implemented as SQL query returning only the layer memberships directly from the database.
The text was updated successfully, but these errors were encountered: