Merge changes I9b6c165c,Iae24118a

* changes:
  Show project name in config push failure log 
  Further clarify the function of SectionSortCache
This commit is contained in:
David Ostrovsky
2018-01-31 19:32:34 +00:00
committed by Gerrit Code Review
2 changed files with 9 additions and 2 deletions

View File

@@ -450,7 +450,7 @@ public class CommitValidators {
+ " tried to push an invalid project configuration "
+ receiveEvent.command.getNewId().name()
+ " for project "
+ receiveEvent.project,
+ receiveEvent.project.getName(),
e);
throw new CommitValidationException("invalid project configuration", messages);
}

View File

@@ -31,7 +31,14 @@ import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/** Caches the order AccessSections should be sorted for evaluation. */
/**
* Caches the order AccessSections should be sorted for evaluation.
*
* <p>Access specifications for a more specific ref (eg. refs/heads/master rather than refs/heads/*)
* take precedence in ACL evaluations. So for each combination of (ref, list of access specs) we
* have to order the access specs by their distance from the ref to be matched. This is expensive,
* so cache the sorted ordering.
*/
@Singleton
public class SectionSortCache {
private static final Logger log = LoggerFactory.getLogger(SectionSortCache.class);