[ https://issues.apache.org/jira/browse/HIVE-9741?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14329403#comment-14329403 ]
Ashutosh Chauhan commented on HIVE-9741: ---------------------------------------- You may also delete runDbCheck() with this patch, since thats not used anymore. But before that you need to pay attention to MySQL specific query here, because that does more than determining db type, it also sets ansi mode for mysql. We need to run this query but outside of the lock acquired in ObjectStore::setConf(). One way to do that is to keep your current changes as it is and than after doing unlock() in setConf() in objectstore, call a method on MetaStoreDirectSQL to run this query. > Refactor MetaStoreDirectSql by using getProductName instead of querying DB to > determine DbType > ---------------------------------------------------------------------------------------------- > > Key: HIVE-9741 > URL: https://issues.apache.org/jira/browse/HIVE-9741 > Project: Hive > Issue Type: Bug > Components: Metastore > Affects Versions: 1.0.0 > Reporter: Xiaobing Zhou > Assignee: Xiaobing Zhou > Attachments: HIVE-9741.1.patch > > > MetaStoreDirectSql constructor is querying DB to determine dbType. which > leads to too many DB queries to make metastore slow or hanging if > MetaStoreDirectSql constructor is frequently called. This is to propose > getProductName to get dbType info. -- This message was sent by Atlassian JIRA (v6.3.4#6332)