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

Quanlong Huang commented on IMPALA-9140:
----------------------------------------

{quote}I think the PriorityQueue solution actually makes sense here. The starve 
situation Quanlong Huang mentioned also exist in the current implementation. 
Because we can get a lot of new sync load requests and there is no guarantee 
when will an idle thread in tblLoadingPool_ pick up an async task.
{quote}
[~jiawei.wang], I think you may miss the fact that tblLoadingPool_ is a 
FixedThreadPool that uses a LinkedBlockingQueue to queue the submitted tasks. 
So the task being submitted first will be executed first. Async load requests 
won't starve since there are always _numLoadingThreads_ of tasks of them 
submitted. New sync load requests are submitted later.

> Get rid of the unnecessary load submitter thread pool in tblLoadingMgr
> ----------------------------------------------------------------------
>
>                 Key: IMPALA-9140
>                 URL: https://issues.apache.org/jira/browse/IMPALA-9140
>             Project: IMPALA
>          Issue Type: Bug
>            Reporter: Vihang Karajgaonkar
>            Priority: Major
>
> This JIRA is created as a followup on the discussion on 
> https://gerrit.cloudera.org/#/c/14611 related to various pools used for 
> loading tables.
> It looks like there are 2 pools of threads both of the size 
> {{num_metadata_loading_threads}}. One pool is used to submit the load 
> requests to another pool {{tblLoadingPool_}} which does the actual loading of 
> the tables. I think we can get rid of the pool which submits the tasks since 
> it is not very time-consuming operation and can be done synchronously (all it 
> needs to do submit the task in the queue in the front or back based on 
> whether its a prioritized load or background load). This will simplify the 
> loading code and  reduce unnecessary number of threads being created by 
> {{TblLoadingMgr}}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to