New issue
Advanced search Search tips
Starred by 6 users

Issue metadata

Status: Submitted
Owner:
Closed: May 18
Cc:
Components:



Sign in to add a comment

Poor performance of onwerin predicate

Project Member Reported by huga...@gmail.com, May 4

Issue description

*****************************************************************
*****                                                       *****
***** !!!! THIS BUG TRACKER IS FOR GERRIT CODE REVIEW !!!!  *****
*****                                                       *****
***** DO NOT SUBMIT BUGS FOR CHROME, ANDROID, CYANOGENMOD,  *****
***** INTERNAL ISSUES WITH YOUR COMPANY'S GERRIT SETUP, ETC.*****
*****                                                       *****
*****   THOSE ISSUES BELONG IN DIFFERENT ISSUE TRACKERS     *****
*****                                                       *****
*****************************************************************

Affected Version: 2.14

This predicate is slow as it it evaluated by gerrit and not the secondary index. On top of that, the evaluation itself is taking a long time because for every candidate change returned by the secondary index, the effective group memberships of the owner of the change are computed in order to evalute if owner is member of the specified group in the query.

When query "status:merged ownerin:someGroup" is executed:
1-secondary index will scan merged changes
2-for every merged change, change owner effective groups membership is computed
3- repeat step 2 until
  a) we have number of matching result = max-result
  b) no more merged changes (up to 2.2 million changes in our case)

Also, group membership evaluation is iterating through available group backends. In our case, on top of built in group backends, we have singleuser group and LDAP.

For example, query "status:merged ownerin:someGroup" where someGroup is a gerrit(internal) group who recently started to have merged changes (this means almost all the merged changes are scanned) takes about 4 minutes to complete.
 
Project Member

Comment 1 by huga...@gmail.com, May 4

Owner: borui....@gmail.com
Status: Started (was: New)
Status: ChangeUnderReview (was: Started)
https://gerrit-review.googlesource.com/c/gerrit/+/179311
Labels: FixedIn-2.14.9
Status: Submitted (was: ChangeUnderReview)

Sign in to add a comment