SEARCH-2408: Hard limit to 512 ACL Change Set lists to get information from repository.

Added a WARN message to log solrcore.properties value has been ignored.
This commit is contained in:
Angel Borroy
2020-09-07 15:51:06 +02:00
parent 262a31b42c
commit 40a40750f7
@@ -81,6 +81,9 @@ public class AclTracker extends ActivatableTracker
private static final int MAX_NUMBER_OF_ACL_CHANGE_SETS = 2000;
private static final long MAX_TIME_STEP = TIME_STEP_32_DAYS_IN_MS;
// Repository Remote API doesn't accept more than 512 aclChangeSetIds by invocation
private static final int MAX_ACL_CHANGE_SET_BATCH_SIZE = 512;
private int aclTrackerParallelism;
@@ -128,6 +131,12 @@ public class AclTracker extends ActivatableTracker
super(p, client, coreName, informationServer, Tracker.Type.ACL);
changeSetAclsBatchSize = Integer.parseInt(p.getProperty("alfresco.changeSetAclsBatchSize",
String.valueOf(DEFAULT_CHANGE_SET_ACLS_BATCH_SIZE)));
if (changeSetAclsBatchSize > MAX_ACL_CHANGE_SET_BATCH_SIZE)
{
LOGGER.warn("Max value for 'alfresco.changeSetAclsBatchSize' is 512. "
+ "This value is being taken instead of the one specified in 'solrcore.properties': " + changeSetAclsBatchSize);
changeSetAclsBatchSize = MAX_ACL_CHANGE_SET_BATCH_SIZE;
}
aclBatchSize = Integer.parseInt(p.getProperty("alfresco.aclBatchSize",
String.valueOf(DEFAULT_ACL_BATCH_SIZE)));
docRouter = DocRouterFactory.getRouter(p, shardMethod);
@@ -763,6 +772,7 @@ public class AclTracker extends ActivatableTracker
long endElapsed = System.nanoTime();
trackerStats.addElapsedAclTime(aclCount, endElapsed-startElapsed);
startElapsed = endElapsed;
totalAclCount += aclCount;
}
}