mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +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()
|
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();
|
final CountNodesWithAspectCallback countNodesCallback = new CountNodesWithAspectCallback();
|
||||||
int count = transactionService.getRetryingTransactionHelper()
|
int count = transactionService.getRetryingTransactionHelper()
|
||||||
.doInTransaction(new RetryingTransactionCallback<Integer>()
|
.doInTransaction(new RetryingTransactionCallback<Integer>()
|
||||||
@@ -246,12 +251,6 @@ public class FixedAclUpdater extends TransactionListenerAdapter implements Appli
|
|||||||
return countNodesCallback.getCount();
|
return countNodesCallback.getCount();
|
||||||
}
|
}
|
||||||
}, false, true);
|
}, false, true);
|
||||||
|
|
||||||
if (count > maxItems)
|
|
||||||
{
|
|
||||||
log.info("Total nodes with pending acl: " + count + " Limiting work to " + maxItems);
|
|
||||||
return maxItems;
|
|
||||||
}
|
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user