diff --git a/repository/src/main/java/org/alfresco/repo/domain/permissions/FixedAclUpdater.java b/repository/src/main/java/org/alfresco/repo/domain/permissions/FixedAclUpdater.java index 10c249285f2..f8a6de44115 100644 --- a/repository/src/main/java/org/alfresco/repo/domain/permissions/FixedAclUpdater.java +++ b/repository/src/main/java/org/alfresco/repo/domain/permissions/FixedAclUpdater.java @@ -229,6 +229,11 @@ public List execute() throws Throwable int countNodesWithAspects() { + if (maxItems < DEFAULT_MAX_ITEMS) { + log.info("Job limited to process a maximum of " + maxItems + " Pending Acls"); + return maxItems; + } + final CountNodesWithAspectCallback countNodesCallback = new CountNodesWithAspectCallback(); int count = transactionService.getRetryingTransactionHelper() .doInTransaction(new RetryingTransactionCallback() @@ -240,12 +245,6 @@ public Integer execute() throws Throwable return countNodesCallback.getCount(); } }, false, true); - - if (count > maxItems) - { - log.info("Total nodes with pending acl: " + count + " Limiting work to " + maxItems); - return maxItems; - } return count; } }