You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Konrad Windszus <ko...@netcentric.biz> on 2016/08/29 12:44:47 UTC
Sling Jobs: Ordered Queue and configuration queue.maxparallel
Hi,
if I read the code in JobQueueImpl correctly even for ordered queues there are at most <queue.maxparallel> jobs being executed in parallel (https://github.com/apache/sling/blob/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/queues/JobQueueImpl.java#L197 <https://github.com/apache/sling/blob/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/queues/JobQueueImpl.java#L197>).
Only for the retry handling there seems to be a difference: https://github.com/apache/sling/blob/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/queues/JobQueueImpl.java#L670 <https://github.com/apache/sling/blob/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/queues/JobQueueImpl.java#L670>
So I am wondering if configuring a Job Queue with Type = Ordered and queue.maxparallel > 1 leads to parallel job execution (rather than strict sequential)
Is this a bug in the code or what effects has queue.maxparallel for ordered queues otherwise?
Thanks,
Konrad
Re: Sling Jobs: Ordered Queue and configuration queue.maxparallel
Posted by Konrad Windszus <ko...@gmx.de>.
Thanks for the clarification, I added the description in https://issues.apache.org/jira/browse/SLING-6013 <https://issues.apache.org/jira/browse/SLING-6013>.
Konrad
> On 29 Aug 2016, at 15:05, Carsten Ziegeler <cz...@apache.org> wrote:
>
> Ordered queues are single processing queues, one item after the other.
> This is enforced here:
>
> https://github.com/apache/sling/blob/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/config/InternalQueueConfiguration.java#L224
>
> Regards
> Carsten
>
>> Hi,
>> if I read the code in JobQueueImpl correctly even for ordered queues there are at most <queue.maxparallel> jobs being executed in parallel (https://github.com/apache/sling/blob/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/queues/JobQueueImpl.java#L197 <https://github.com/apache/sling/blob/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/queues/JobQueueImpl.java#L197>).
>> Only for the retry handling there seems to be a difference: https://github.com/apache/sling/blob/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/queues/JobQueueImpl.java#L670 <https://github.com/apache/sling/blob/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/queues/JobQueueImpl.java#L670>
>> So I am wondering if configuring a Job Queue with Type = Ordered and queue.maxparallel > 1 leads to parallel job execution (rather than strict sequential)
>>
>> Is this a bug in the code or what effects has queue.maxparallel for ordered queues otherwise?
>> Thanks,
>> Konrad
>>
>
>
>
>
> --
> Carsten Ziegeler
> Adobe Research Switzerland
> cziegeler@apache.org
>
Re: Sling Jobs: Ordered Queue and configuration queue.maxparallel
Posted by Carsten Ziegeler <cz...@apache.org>.
Ordered queues are single processing queues, one item after the other.
This is enforced here:
https://github.com/apache/sling/blob/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/config/InternalQueueConfiguration.java#L224
Regards
Carsten
> Hi,
> if I read the code in JobQueueImpl correctly even for ordered queues there are at most <queue.maxparallel> jobs being executed in parallel (https://github.com/apache/sling/blob/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/queues/JobQueueImpl.java#L197 <https://github.com/apache/sling/blob/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/queues/JobQueueImpl.java#L197>).
> Only for the retry handling there seems to be a difference: https://github.com/apache/sling/blob/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/queues/JobQueueImpl.java#L670 <https://github.com/apache/sling/blob/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/queues/JobQueueImpl.java#L670>
> So I am wondering if configuring a Job Queue with Type = Ordered and queue.maxparallel > 1 leads to parallel job execution (rather than strict sequential)
>
> Is this a bug in the code or what effects has queue.maxparallel for ordered queues otherwise?
> Thanks,
> Konrad
>
--
Carsten Ziegeler
Adobe Research Switzerland
cziegeler@apache.org