deniskuzZ commented on code in PR #6088:
URL: https://github.com/apache/hive/pull/6088#discussion_r2454629225
##########
ql/src/java/org/apache/hadoop/hive/ql/lockmgr/HiveTxnManagerImpl.java:
##########
@@ -162,7 +167,8 @@ public int lockDatabase(Hive hiveDB, LockDatabaseDesc
lockDb) throws HiveExcepti
String.valueOf(System.currentTimeMillis()),
"EXPLICIT", lockDb.getQueryStr(), conf);
- HiveLock lck = lockMgr.lock(new HiveLockObject(dbObj.getName(), lockData),
mode, true);
+ // Using the catalogName@databaseName format to uniquely identify a
database.
+ HiveLock lck = lockMgr.lock(new HiveLockObject(catName + "@"
+dbObj.getName(), lockData), mode, true);
Review Comment:
oh, nice hack! however, maybe we should use "." ?
note, might be problematic if CU has multiple HMS versions on a cluster
I think it might actually work. i am not sure if `show locks` would handle
this change, might need some tweaks:
````
show locks db1
show locks cat1.db1
````
nit: please add space `+ dbObj.getName()`
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]