Details
Description
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.