You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Eugene Koifman (JIRA)" <ji...@apache.org> on 2016/06/13 21:25:03 UTC

[jira] [Comment Edited] (HIVE-13725) ACID: Streaming API should synchronize calls when multiple threads use the same endpoint

    [ https://issues.apache.org/jira/browse/HIVE-13725?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15328300#comment-15328300 ] 

Eugene Koifman edited comment on HIVE-13725 at 6/13/16 9:24 PM:
----------------------------------------------------------------

[~vgumashta] is it feasible to add a test here?
More importantly, this is not a generally available thread safe metastore client.  Using proxy is probably a perf overhead which makes sense if you are creating a general purpose client

If this is specifically for use by HiveEndPoint it seems like making a custom client that will do simple delegation (with sychronized wrapper) is more appropriate since this only uses 4-5 methods.  Something like DbTxnManager.SynchronizedMetaStoreClient


was (Author: ekoifman):
[~vgumashta] is it feasible to add a test here?

> ACID: Streaming API should synchronize calls when multiple threads use the same endpoint
> ----------------------------------------------------------------------------------------
>
>                 Key: HIVE-13725
>                 URL: https://issues.apache.org/jira/browse/HIVE-13725
>             Project: Hive
>          Issue Type: Bug
>          Components: HCatalog, Metastore, Transactions
>    Affects Versions: 1.2.1, 2.0.0
>            Reporter: Vaibhav Gumashta
>            Assignee: Vaibhav Gumashta
>            Priority: Critical
>              Labels: ACID, Streaming
>         Attachments: HIVE-13725.1.patch
>
>
> Currently, the streaming endpoint creates a metastore client which gets used for RPC. The client itself is not internally thread safe. Therefore, the API methods should provide the relevant synchronization so that the methods can be called from different threads. A sample use case is as follows:
> 1. Thread 1 creates a streaming endpoint and opens a txn batch.
> 2. Thread 2 heartbeats the txn batch.
> With the current impl, this can result in an "out of sequence response", since the response of the calls in thread1 might end up going to thread2 and vice-versa.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)