[
https://issues.apache.org/jira/browse/HIVE-26145?focusedWorklogId=761741&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-761741
]
ASF GitHub Bot logged work on HIVE-26145:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 25/Apr/22 12:14
Start Date: 25/Apr/22 12:14
Worklog Time Spent: 10m
Work Description: zabetak commented on code in PR #3215:
URL: https://github.com/apache/hive/pull/3215#discussion_r857554725
##########
hcatalog/server-extensions/src/main/java/org/apache/hive/hcatalog/listener/DbNotificationListener.java:
##########
@@ -174,12 +174,17 @@ public class DbNotificationListener extends
TransactionalMetaStoreEventListener
//cleaner is a static object, use static synchronized to make sure its
thread-safe
private static synchronized void init(Configuration conf) throws
MetaException {
- if (cleaner == null) {
+ long freq = MetastoreConf.getTimeVar(conf,
MetastoreConf.ConfVars.EVENT_DB_LISTENER_CLEAN_INTERVAL, TimeUnit.MILLISECONDS);
+ if (cleaner == null && freq > 0) {
cleaner =
Review Comment:
The `cleaner` object is accessed in many places in this class and in order
to ensure that we are not going to have a NPE we need to review all calls
carefully. For instance, it seems that configuration changes (`onConfigChange`)
may touch try to update some aspects of the `cleaner` assuming that the latter
one is initialized.
Issue Time Tracking
-------------------
Worklog Id: (was: 761741)
Time Spent: 0.5h (was: 20m)
> Disable notification cleaner if interval is zero
> ------------------------------------------------
>
> Key: HIVE-26145
> URL: https://issues.apache.org/jira/browse/HIVE-26145
> Project: Hive
> Issue Type: Sub-task
> Components: Metastore
> Reporter: Janos Kovacs
> Assignee: Janos Kovacs
> Priority: Major
> Labels: pull-request-available
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> Many of the housekeeping/background tasks can be turned off in case of having
> multiple instances running parallel.
> Some are controlled via the housekeeping node configuration, others are not
> started if their frequency is set to zero.
> The DB-Notification cleaner unfortunately doesn't have this functionality
> which makes all instances to race for the lock on the backend HMS database.
> Goal is to add change to be able to turn cleaner off in case if there are
> multiple instances running (be able to bound it to the housekeeping
> instance).
--
This message was sent by Atlassian Jira
(v8.20.7#820007)