[ https://issues.apache.org/jira/browse/HIVE-19050?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16426644#comment-16426644 ]
Peter Vary commented on HIVE-19050: ----------------------------------- +1 > 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)