[ 
https://issues.apache.org/jira/browse/OOZIE-1699?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14008612#comment-14008612
 ] 

Shwetha G S commented on OOZIE-1699:
------------------------------------

lock was added in offer() to avoid the following error:
>>> Exception in thread "pool-2-thread-24" java.lang.IllegalStateException: 
>>> queueElement already in a queue
            at 
org.apache.oozie.util.PriorityDelayQueue.offer(PriorityDelayQueue.java:347)
>From PriorityDelayQueue perspective, lock is required at offer() as it 
>internally does offer and set inQueue. If the 2 queue()s are called in 
>parallel for the same command, one will fail with the above exception(without 
>lock). But from CallableQueueService perspective, I don't see how the same 
>command can be queued in parallel as CallabeQueueService.queue() is 
>synchronised and filterDuplicates will remove the 2nd queue().

Anyways, the lock in offer() can be removed. But the rest of the patch is 
important as it addresses the correctness issue

> Some of the commands submitted to Oozie internal queue are never executed
> -------------------------------------------------------------------------
>
>                 Key: OOZIE-1699
>                 URL: https://issues.apache.org/jira/browse/OOZIE-1699
>             Project: Oozie
>          Issue Type: Bug
>            Reporter: Srikanth Sundarrajan
>            Assignee: Srikanth Sundarrajan
>            Priority: Critical
>             Fix For: trunk
>
>         Attachments: OOZIE-1699-v1-no-prefix.patch, OOZIE-1699.patch
>
>
> At scale, we are seeing issues with some command submitted to the command 
> queue in CallableQueueService aren't getting executed at all.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to