Project

General

Profile

Actions

Task #1837

closed

Task #724: Process long running task in more threads

Implement thread rejection policy for LRT pool

Added by Petr Fišer over 4 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Radek Tomiška
Category:
Long running task
Target version:
Start date:
09/05/2019
Due date:
% Done:

100%

Estimated time:
Owner:

Description

I am running IdM with this configuration:

...
scheduler.task.executor.corePoolSize=2
scheduler.task.executor.maxPoolSize=10
scheduler.task.executor.queueCapacity=2
...

When I create more than 2 LRTs, the pool is expanded and additional LRTs become Running.
When I create more than maxPoolSize LRTs, all LRTs are enqueued. LRTs that were created after the number of LRTs reached maxPoolSize seem to be correct. However, when they are about to run, they enter the Failed state with following error:
java.lang.IllegalArgumentException: [Assertion failed] - this argument is required; it must not be null
    at org.springframework.util.Assert.notNull(Assert.java:115)
    at org.springframework.util.Assert.notNull(Assert.java:126)
    at eu.bcvsolutions.idm.core.api.bulk.action.AbstractBulkAction.process(AbstractBulkAction.java:172)
    at eu.bcvsolutions.idm.core.api.bulk.action.AbstractBulkAction.process(AbstractBulkAction.java:47)
    at eu.bcvsolutions.idm.core.scheduler.api.service.AbstractLongRunningTaskExecutor.call(AbstractLongRunningTaskExecutor.java:197)
    at eu.bcvsolutions.idm.core.scheduler.api.service.AbstractLongRunningTaskExecutor$$FastClassBySpringCGLIB$$f9eae371.invoke(<generated>)
    at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
    at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:720)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
    at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
    at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:655)
    at eu.bcvsolutions.idm.acc.bulk.action.impl.IdentityAccountManagementBulkAction$$EnhancerBySpringCGLIB$$f9ddabf2.call(<generated>)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at org.springframework.security.concurrent.DelegatingSecurityContextRunnable.run(DelegatingSecurityContextRunnable.java:80)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)

This is because a rejection policy on the task queue is not implemented yet.


Related issues

Related to IdStory Identity Manager - Feature #2040: Provisioning system timeout - Execute provisioning synchronously from long running task is stucked ClosedRadek Tomiška02/05/2020

Actions
Related to IdStory Identity Manager - Task #2107: LRT: persist bulk action into long running task agendaClosedRadek Tomiška03/09/2020

Actions
Actions

Also available in: Atom PDF