ReviewerRecommender: Request APPROVAL field

Calling cd.currentApprovals() a few lines down requires this stored
field rather than REVIEWER. This is not generally a correctness issue,
but the fact that these changes need to be reloaded may be responsible
for some reports of high latency in reviewer recommendations.

Change-Id: I35ef479dcdf9e563337d290681dc44562b142cc7
This commit is contained in:
Dave Borowitz
2017-10-23 15:08:53 -04:00
parent 0f421c3a7f
commit ee3fb8c5d9

View File

@@ -205,7 +205,7 @@ public class ReviewerRecommender {
queryProvider
.get()
.setLimit(25)
.setRequestedFields(ImmutableSet.of(ChangeField.REVIEWER.getName()))
.setRequestedFields(ImmutableSet.of(ChangeField.APPROVAL.getName()))
.query(changeQueryBuilder.owner("self"));
Map<Account.Id, MutableDouble> suggestions = new HashMap<>();
for (ChangeData cd : result) {