mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
MNT-24503 - FixedAclUpdater Job - Skip count if maxSize is set (#2809)
This commit is contained in:
@@ -235,6 +235,11 @@ public class FixedAclUpdater extends TransactionListenerAdapter implements Appli
|
||||
|
||||
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<Integer>()
|
||||
@@ -246,12 +251,6 @@ public class FixedAclUpdater extends TransactionListenerAdapter implements Appli
|
||||
return countNodesCallback.getCount();
|
||||
}
|
||||
}, false, true);
|
||||
|
||||
if (count > maxItems)
|
||||
{
|
||||
log.info("Total nodes with pending acl: " + count + " Limiting work to " + maxItems);
|
||||
return maxItems;
|
||||
}
|
||||
return count;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user