[
https://issues.apache.org/jira/browse/HCATALOG-627?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13616507#comment-13616507
]
Arup Malakar edited comment on HCATALOG-627 at 3/28/13 6:28 PM:
----------------------------------------------------------------
Thanks Allan, I happen to have a badly indented portion of code in the patch,
fixed in the updated patch.
was (Author: amalakar):
Thanks Allan, I happen to have a badly indented portion of code in the
patch.
> NotificationListener is not thread safe
> ---------------------------------------
>
> Key: HCATALOG-627
> URL: https://issues.apache.org/jira/browse/HCATALOG-627
> Project: HCatalog
> Issue Type: Bug
> Affects Versions: 0.4, 0.5, 0.6
> Reporter: Arup Malakar
> Assignee: Arup Malakar
> Attachments: HCATALOG-627-branch-0.5-0.patch,
> HCATALOG-627-branch-0.5-1.patch, HCATALOG-627-branch-0.5-2.patch,
> HCATALOG-627-trunk-0.patch, HCATALOG-627-trunk-1.patch,
> HCATALOG-627-trunk-2.patch, HCATALOG-627-trunk-3.patch
>
>
> From the code in
> [HiveMetaStore|http://svn.apache.org/repos/asf/hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java]
> it appears that only one instance of the provided listener is created which
> then gets used by the thread pool. But the methods in the
> NotificationListnener in HCatalog is not threadsafe. For example according to
> JMS api documentation a Connection object can be shared among threads, but
> the [Session|http://docs.oracle.com/javaee/1.4/api/javax/jms/Session.html]
> [1] object should be specific to a thread.
> | A Session object is a single-threaded context for producing and consuming
> messages. Although it may allocate provider resources outside the Java
> virtual machine (JVM), it is considered a lightweight JMS object.
> But NotificationListener has only one session object which gets shared among
> threads. While testing I have observed cases where messages were getting
> drooped, using a ThreadLocal Session solved the problem for me. But I am
> interested in knowing if anyone else has seen dropped messages.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira