ReviewersUtil: Increase multiplier for candidate list to 3
Since the frontend reduced the number of suggested reviewers to 6 [1] we
have users complaining about users being missing in the reviewer
suggestion. This is because the account query to compute the reviewer
candidates is limited to 2 x <limit-from-the-request>, which is 12 now.
If there are more than 12 matches some accounts are dropped, which may
contain the account that the user expects. In the case I debugged there
were 15 candidates, out of which only 2 are suggested in the end. When
the limit is set to 12, 1 of them got dropped.
Increasing the multiplier for the candidate list to 3 shouldn't have bad
impacts on the performance, basically 3 * 6 = 18 is still lower than the
limit that we used before [1], 2 * 10 = 20, and that limit worked well.
[1] https://gerrit-review.googlesource.com/c/gerrit/+/222655
Signed-off-by: Edwin Kempin <ekempin@google.com>
Change-Id: Ia3121d1708444b80a53a421f24f05a89c87ea80d
(cherry picked from commit c528072d07
)
This commit is contained in:
@@ -115,9 +115,9 @@ public class ReviewersUtil {
|
||||
}
|
||||
}
|
||||
|
||||
// Generate a candidate list at 2x the size of what the user wants to see to
|
||||
// Generate a candidate list at 3x the size of what the user wants to see to
|
||||
// give the ranking algorithm a good set of candidates it can work with
|
||||
private static final int CANDIDATE_LIST_MULTIPLIER = 2;
|
||||
private static final int CANDIDATE_LIST_MULTIPLIER = 3;
|
||||
|
||||
private final AccountLoader.Factory accountLoaderFactory;
|
||||
private final AccountQueryBuilder accountQueryBuilder;
|
||||
|
Reference in New Issue
Block a user