Exclude draft changes from ReindexAfterUpdate

The draft changes can be deleted but not abandoned so there is no way for
an administrator to get rid of the them on behalf of the users. This can
become a problem when there many draft changes because the mergeability
check can be costly.

No longer reindex draft changes to update mergeability status when tip of
the branch is updated. Mergeability status will be updated when draft
change is published.

Change-Id: I682d5194bbdd372b45c2cb2b66191d5456887c21
This commit is contained in:
Hugo Arès
2016-09-20 16:37:35 +02:00
parent 4734437557
commit 3433f6eec8
2 changed files with 9 additions and 1 deletions

View File

@@ -127,7 +127,7 @@ public class ReindexAfterUpdate implements GitReferenceUpdatedListener {
if (ref.equals(RefNames.REFS_CONFIG)) {
return asChanges(queryProvider.get().byProjectOpen(project));
}
return asChanges(queryProvider.get().byBranchOpen(
return asChanges(queryProvider.get().byBranchNew(
new Branch.NameKey(project, ref)));
}