[
https://issues.apache.org/jira/browse/HIVE-13966?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15323610#comment-15323610
]
Sravya Tirukkovalur commented on HIVE-13966:
--------------------------------------------
+1 to synchronous listener. Writing to notification log outside of transaction
comes with potential correctness issues.
As [~vaidyand] mentioned:
1. Operation fails, but notification entry is added: This can be avoided by
checking the status of the operation
2. Operation succeeds but the notification entry is not written. This means
data/metadata loss for downstream systems relying on NotificationLog.
3. Notification log also allows to get the linear event log when there are
multiple HMSs in a active-active HMS HA setting. But, not having notification
writing as part of transaction means, the commands can be out of order in
notification log.
> 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
> 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)