Github user aarondav commented on a diff in the pull request:
https://github.com/apache/spark/pull/1412#discussion_r14917306
--- Diff:
sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveMetastoreCatalog.scala ---
@@ -50,7 +50,7 @@ private[hive] class HiveMetastoreCatalog(hive:
HiveContext) extends Catalog with
def lookupRelation(
db: Option[String],
tableName: String,
- alias: Option[String]): LogicalPlan = {
+ alias: Option[String]): LogicalPlan = client.synchronized {
--- End diff --
Since we just had a problem with this in Spark core, I want to point out
that locking other people's objects can lead to deadlock if they use
synchronization on `this` internally. Indeed, this Hive object seems like a
relatively prime candidate for this type of trouble since it's gotten through a
static constructor (so is cache-able) and it's Hive (so is probably not
inherently good at thread safety).
Just pointing this out, perhaps it's not a risk in this case.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---