SEARCH-2408: Limit by the count of Change Set instead by the number of ACLs contained in the Change Set batch.

This commit is contained in:
Angel Borroy
2020-09-07 18:11:16 +02:00
parent 40a40750f7
commit a5d1460d0a
@@ -758,7 +758,7 @@ public class AclTracker extends ActivatableTracker
Collection<List<AclChangeSet>> changeSetBatches = aclChangeSets.getAclChangeSets().stream()
.peek(changeSetsFound::add)
.filter(this::isAclChangeSetAlreadyIndexed)
.collect(Collectors.groupingBy(it -> counter.getAndAdd(it.getAclCount()) / changeSetAclsBatchSize))
.collect(Collectors.groupingBy(it -> counter.getAndAdd(1) / changeSetAclsBatchSize))
.values();