LantaoJin edited a comment on pull request #28938:
URL: https://github.com/apache/spark/pull/28938#issuecomment-654836968


   AFAIK, hive client (metastore clien) is not thread-safe. I don't find any 
documentation but I find a patch 
[HIVE-13753](https://issues.apache.org/jira/browse/HIVE-13753) to provide a 
thread-saft client `SynchronizedMetaStoreClient`. So current implementation of 
`HiveClientImpl` still uses `getMSC()` to operate with metastore.
   
   But I think it's fine even the metastore client is not thread-safe but with 
R/W locks per DB. "conflicting operations like creating the same table at the 
same time." is just an example. With the locks, we still can prevent from the 
conflict operations in client side such as `tableExists("db1.table1")` reture 
`false`, but another thread is `createTable("db1.table1")`.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to