You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Eugene Chung (Jira)" <ji...@apache.org> on 2021/10/21 12:00:00 UTC

[jira] [Commented] (HIVE-25633) Prevent shutdown of MetaStore scheduled worker ThreadPool

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

Eugene Chung commented on HIVE-25633:
-------------------------------------

I missed that in HMSHandler#init, ThreadPool#initialize is called in the _alwaysThreadsInitialized.compareAndSet(false, true)_ block.

If you think ThreadPool#shutdown is called in HMSHandler#shutdown, _alwaysThreadsInitialized.set(false)_ should be called.

Or I think ThreadPool#shutdown could be omitted because ThreadPool is created with daemon flag. It won't block the JVM termination.

> Prevent shutdown of MetaStore scheduled worker ThreadPool
> ---------------------------------------------------------
>
>                 Key: HIVE-25633
>                 URL: https://issues.apache.org/jira/browse/HIVE-25633
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Zoltan Haindrich
>            Assignee: Zoltan Haindrich
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> [~lpinter] have noticed that this patch has some sideffect:
> in HIVE-23164 the patch have added a {{ThreadPool#shutdown}} to {{HMSHandler#shutdown}} - which could cause trouble in case a {{HMSHandler}} is shutdown and a new one is created
> I was looking for cases in which a HMSHandler is created inside the metastore (beyond the one HiveMetaStore is using) - and I think tasks like PartitionManagementTask which uses Msck which uses HMC to access the metastore - and they close the client - which closes the hmshandler client ; which will shut down the threadpool



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