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

Akshay Goyal commented on LENS-777:
-----------------------------------

This was happening due to intersecting waiting query selector. It was causing 
blockage for queries of other users since it was doing intersection on 
candidate queries from waiting queries for that user and for the driver of the 
finished query. Fixing this by doing a union on these candidate sets.

> Query remains in queue even when driver is free 
> ------------------------------------------------
>
>                 Key: LENS-777
>                 URL: https://issues.apache.org/jira/browse/LENS-777
>             Project: Apache Lens
>          Issue Type: Bug
>            Reporter: Arshad Matin
>            Assignee: Akshay Goyal
>
> Scenario:
> Config
> {noformat}
>   <property>
>     <name>driver.max.concurrent.launched.queries</name>
>     <value>1</value>
>     <description>Maximum queries which can be launched simultaneously on this 
> driver. This should be equal to
>       lens.driver.jdbc.pool.max.size. This configuration value is only useful 
> when MaxConcurrentDriverQueriesConstraint
>       is enabled by using 
> org.apache.lens.server.api.query.constraint.MaxConcurrentDriverQueriesConstraintFactory
>  as
>       one of the factories in lens.driver.jdbc.query.constraint.factories 
> property.</description>
>   </property>
> <property>
>     <name>lens.driver.jdbc.pool.max.size</name>
>     <value>1</value>
>     <description>Maximum number of concurrent connections allowed in 
> pool</description>
>   </property>
> {noformat}
> Launched 1st query with user U1
> Launched 2nd query with user U2
> Launched 3rd query with user U1
> Launched 4th query with user U2
> Query Status
> ==========
> Q1 -> Running
> Q2 -> Queued(queue number = 1)
> Q3 -> Queued(queue number = 2)
> Q4 -> Queued(queue number = 3)
> When Q1 completes, Query Status
> ==========================
> Q1 -> Successful
> Q2 -> Queued(queue number = 1)
> Q3 -> Running
> Q4 -> Queued(queue number = 2)
> When Q2 completes, Query Status
> ==========================
> Q1 -> Successful
> Q2 -> Queued(queue number = 1)
> Q3 -> Successful
> Q4 -> Queued(queue number = 2)
> user "U2" query will never get picked. Another query launched by user "U1" 
> will be answered.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to