You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by GitBox <gi...@apache.org> on 2022/05/18 11:17:27 UTC
[GitHub] [hive] hmangla98 commented on a diff in pull request #3298: HIVE-26237: Check if replication cause metastore connection leakage
hmangla98 commented on code in PR #3298:
URL: https://github.com/apache/hive/pull/3298#discussion_r875771882
##########
ql/src/java/org/apache/hadoop/hive/ql/ddl/DDLOperationContext.java:
##########
@@ -51,8 +51,8 @@ public DDLOperationContext(HiveConf conf, Context context, DDLTask task, DDLWork
this.console = console;
}
- public Hive getDb() {
- return db;
+ public Hive getDb() throws HiveException {
+ return Hive.getCurrHiveDb(db, conf);
Review Comment:
Yes, there is a situation where hive connections is closed and it still returns reference of the closed hive object.
##########
ql/src/java/org/apache/hadoop/hive/ql/ddl/DDLOperationContext.java:
##########
@@ -51,8 +51,8 @@ public DDLOperationContext(HiveConf conf, Context context, DDLTask task, DDLWork
this.console = console;
}
- public Hive getDb() {
- return db;
+ public Hive getDb() throws HiveException {
+ return Hive.getCurrHiveDb(db, conf);
Review Comment:
Yes, there is a situation where hive connection is closed and it still returns reference of the closed hive object.
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org