LantaoJin commented on pull request #28938: URL: https://github.com/apache/spark/pull/28938#issuecomment-654796439
I think it's safe to use database level R/W locks here with thread-unsafe hive-client. Use one object lock is over kill in `HiveExternalCatalog`. You never know how slow a RPC in hive-metastore could be in production. In the underlay storage in hive-metastore, MySQL help to provide a transaction lock. So the metadata tables in MySQL is safe. Using a lock in client side is to prevent from the cases such as two clients creating a same table at the same time. But with the DB level R/W locks, no conflicted operations in the same database. Could you give a case about conflict with this kind of locks? ---------------------------------------------------------------- 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