[ https://issues.apache.org/jira/browse/HIVE-13966?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15346431#comment-15346431 ]
Reuben Kuhnert commented on HIVE-13966: --------------------------------------- Seems like it might make sense to use an interface like {{TransactionalMetastoreEventListener}} or something so that we can enforce compile time safety. Then just tag the relevant classes with said interface so that we can have loops of type (with compile time check): {code} for (TransactionalMetaStoreEventListener listener : listeners) { ... } {code} This allows alows you to enforce that listeners dropped into the {{<name>hive.metastore.synchronous.event.listeners</name>}} bucket all expect to be called within a transaction. Alternatively, it might make sense to invert control such that listeners that care about transactional updates can listen for them, while leaving others unaffected: {code} class MetastoreEventListener { public abstract onTransactionalEvent(SomeEvent event); // Transactionals will listen for this public abstract onEvent(SomeEvent event); // Everyone else will listen for this. } {code} Transactional listeners will implement the first while leaving the second as a {{noop}}. $0.02 > DbNotificationListener: can loose DDL operation notifications > ------------------------------------------------------------- > > Key: HIVE-13966 > URL: https://issues.apache.org/jira/browse/HIVE-13966 > Project: Hive > Issue Type: Bug > Components: HCatalog > Reporter: Nachiket Vaidya > Assignee: Rahul Sharma > Priority: Critical > > The code for each API in HiveMetaStore.java is like this: > 1. openTransaction() > 2. -- operation-- > 3. commit() or rollback() based on result of the operation. > 4. add entry to notification log (unconditionally) > If the operation is failed (in step 2), we still add entry to notification > log. Found this issue in testing. > It is still ok as this is the case of false positive. > If the operation is successful and adding to notification log failed, the > user will get an MetaException. It will not rollback the operation, as it is > already committed. We need to handle this case so that we will not have false > negatives. -- This message was sent by Atlassian JIRA (v6.3.4#6332)