You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Vihang Karajgaonkar (JIRA)" <ji...@apache.org> on 2018/03/27 22:39:00 UTC

[jira] [Updated] (HIVE-19050) DBNotificationListener does not catch exceptions in the cleaner thread

     [ https://issues.apache.org/jira/browse/HIVE-19050?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vihang Karajgaonkar updated HIVE-19050:
---------------------------------------
    Attachment: HIVE-19050.01.patch

> DBNotificationListener does not catch exceptions in the cleaner thread
> ----------------------------------------------------------------------
>
>                 Key: HIVE-19050
>                 URL: https://issues.apache.org/jira/browse/HIVE-19050
>             Project: Hive
>          Issue Type: Bug
>          Components: Metastore, Standalone Metastore
>    Affects Versions: 3.0.0, 2.4.0
>            Reporter: Vihang Karajgaonkar
>            Assignee: Vihang Karajgaonkar
>            Priority: Minor
>         Attachments: HIVE-19050.01.patch
>
>
> The DbNotificationListener class has a separate thread which cleans the old notifications from the database. Here is the snippet from the {{run}} method.
> {noformat}
> public void run() {
>       while (true) {
>         rs.cleanNotificationEvents(ttl);
>         LOG.debug("Cleaner thread done");
>         try {
>           Thread.sleep(sleepTime);
>         } catch (InterruptedException e) {
>           LOG.info("Cleaner thread sleep interrupted", e);
>         }
>       }
>     }
> {noformat}
> If {{rs.cleanNotificationEvents}} throws a RuntimeException which datanucleus can throw the exception remains uncaught and the thread will die. This can lead to older notifications never getting cleaned until we restart HMS. Given that many operations generate loads of events, the notification log table can quickly have thousands of rows which are never get cleaned up.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)