zhangbutao commented on code in PR #6088:
URL: https://github.com/apache/hive/pull/6088#discussion_r2567056771


##########
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:
   Upon further inspection here, it was found that HIVE-2093 introduced the 
semantics for SHOW LOCKS DATABASE, specifically designed to retrieve the lock 
objects for a particular database. Therefore, I still need to spend some time 
confirming this.



-- 
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]

Reply via email to