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

Samarth Jain commented on PHOENIX-1432:
---------------------------------------

I was thinking it would be good to call ThreadPoolExecutor.purge() when we end 
up canceling queued tasks. 
https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ThreadPoolExecutor.html#purge()
This way queue capacity/space would be available much sooner than relying on 
worker threads to clean up the queue. This would need 
QueryServices.getExecutor() to return a ThreadPoolExecutor instead of 
ExecutorService. 

> Run limit query that has only leading PK column filter serially
> ---------------------------------------------------------------
>
>                 Key: PHOENIX-1432
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-1432
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: James Taylor
>            Assignee: James Taylor
>         Attachments: PHOENIX-1432.patch, PHOENIX-1432_v1.patch, 
> PHOENIX-1432_v2.patch
>
>
> If we have a query with a LIMIT clause and either no WHERE clause or a WHERE 
> clause that only filters on the leading PK columns, we should run it 
> serially. Otherwise, we're spawning too many client-side threads that likely 
> won't be required.



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

Reply via email to