Skip to content

Commit

Permalink
MNT-24503 - FixedAclUpdater Job - Skip count if maxSize is set (#2809) (
Browse files Browse the repository at this point in the history
#2810)

(cherry picked from commit a3f6e13)
  • Loading branch information
evasques authored Jul 24, 2024
1 parent 481c1e2 commit bf5518f
Showing 1 changed file with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,11 @@ public List<NodeRef> 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<Integer>()
Expand All @@ -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;
}
}
Expand Down

0 comments on commit bf5518f

Please sign in to comment.