← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1218675] Re: N+1 lookups in groups SQL

 

** Changed in: keystone
       Status: Fix Committed => Fix Released

** Changed in: keystone
    Milestone: None => havana-3

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Keystone.
https://bugs.launchpad.net/bugs/1218675

Title:
  N+1 lookups in groups SQL

Status in OpenStack Identity (Keystone):
  Fix Released

Bug description:
  In the SQL for list_users_in_groups we perform

  - One lookup to verify that the group exists.
  - One lookup to get the users associated with this group
  - N lookups to retrieve each of the N associated users

  The same pattern is used in list_groups_for_user.

  We can replace this with a join query.

  I'm not aware if we can drop the initial verify, theoretically if the
  group doesn't exist then there are no entries in the join table
  however there may be code specifically relying on this behaviour.

To manage notifications about this bug go to:
https://bugs.launchpad.net/keystone/+bug/1218675/+subscriptions