Merged BRANCHES\DEV\AUTH_BRIDGE to HEAD

43735: Final part of ALF-14861 	SOLR to scale for non-admin users in 100k sites and a subgroup of each of 1000 independent groupings with 1000 subgroups 


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@44243 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Andrew Hind
2012-12-03 11:39:36 +00:00
parent 5a512655e6
commit d4e4455229
16 changed files with 2158 additions and 34 deletions

View File

@@ -747,8 +747,7 @@ public class WorkflowServiceImpl implements WorkflowService
// Expand authorities to include associated groups (and parent groups)
List<String> authorities = new ArrayList<String>();
authorities.add(authority);
Set<String> parents = authorityService.getContainingAuthoritiesInZone(AuthorityType.GROUP, authority,
null, null, 100);
Set<String> parents = authorityService.getContainingAuthorities(AuthorityType.GROUP, authority, false);
authorities.addAll(parents);
// Retrieve pooled tasks for authorities (from each of the registered
@@ -758,7 +757,10 @@ public class WorkflowServiceImpl implements WorkflowService
for (String id : ids)
{
TaskComponent component = registry.getTaskComponent(id);
tasks.addAll(component.getPooledTasks(authorities));
for(int i = 0; i < authorities.size(); i+=1000)
{
tasks.addAll(component.getPooledTasks(authorities.subList(i*1000, ((i+1)*1000) > authorities.size() ? authorities.size() : ((i+1)*1000))));
}
}
return Collections.unmodifiableList(tasks);
}