deniskuzZ commented on code in PR #6088:
URL: https://github.com/apache/hive/pull/6088#discussion_r2454648064
##########
ql/src/java/org/apache/hadoop/hive/ql/lockmgr/HiveTxnManagerImpl.java:
##########
@@ -173,13 +179,15 @@ public int lockDatabase(Hive hiveDB, LockDatabaseDesc
lockDb) throws HiveExcepti
public int unlockDatabase(Hive hiveDB, UnlockDatabaseDesc unlockDb) throws
HiveException {
HiveLockManager lockMgr = getAndCheckLockManager();
+ String catName = Objects.requireNonNullElse(unlockDb.getCatalogName(),
+ HiveUtils.getCurrentCatalogOrDefault(conf));
String dbName = unlockDb.getDatabaseName();
- Database dbObj = hiveDB.getDatabase(dbName);
+ Database dbObj = hiveDB.getDatabase(catName, dbName);
if (dbObj == null) {
throw new HiveException("Database " + dbName + " does not exist ");
}
- HiveLockObject obj = new HiveLockObject(dbObj.getName(), null);
+ HiveLockObject obj = new HiveLockObject(catName + "@" +dbObj.getName(),
null);
Review Comment:
space
--
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]