> On June 29, 2015, 4:55 p.m., Chaoyu Tang wrote: > > metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java, line > > 3477 > > <https://reviews.apache.org/r/35803/diff/3/?file=993090#file993090line3477> > > > > Do we have to use a list of queryWrappers with each wrapper for a > > different listXXX call? If so, we need open eight queries for this > > removeRole methods. Could we use only one and reuse it?
Originally we were already using eight queries and I was not trying to change that logic in this patch. And also we can't reuse the same query since we need to release the resource for each of the query anyway. > On June 29, 2015, 4:55 p.m., Chaoyu Tang wrote: > > metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java, line > > 3485 > > <https://reviews.apache.org/r/35803/diff/3/?file=993090#file993090line3485> > > > > Should listPrincipalGlobalGrants be passed in a queryWrapper as well? listPrincipalGlobalGrants has handled the releasing the resource by itself, so we don't need to pass that in. > On June 29, 2015, 4:55 p.m., Chaoyu Tang wrote: > > metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java, line > > 4939 > > <https://reviews.apache.org/r/35803/diff/3/?file=993090#file993090line4939> > > > > Is there any reason you need an additional list to hold the retrieved > > result? Yeah. That is the place to get all the returned data so that we can close the query. Since it's the public interface, I didn't pass QueryWapper to let the caller to close it. If we think there is a memory issue for some calls, we can do that. > On June 29, 2015, 4:55 p.m., Chaoyu Tang wrote: > > metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java, line > > 1793 > > <https://reviews.apache.org/r/35803/diff/3/?file=993090#file993090line1793> > > > > Have you looked at MetaStoreDirectSql class to see if there is any > > potential query leaking? I will take a look at that class. - Aihua ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/35803/#review89749 ----------------------------------------------------------- On June 26, 2015, 5:23 p.m., Aihua Xu wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/35803/ > ----------------------------------------------------------- > > (Updated June 26, 2015, 5:23 p.m.) > > > Review request for hive. > > > Repository: hive-git > > > Description > ------- > > HIVE-10895 ObjectStore does not close Query objects in some calls, causing a > potential leak in some metastore db resources > > > Diffs > ----- > > metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java > 417ecc8 > metastore/src/java/org/apache/hadoop/hive/metastore/tools/HiveMetaTool.java > d0ff329 > metastore/src/test/org/apache/hadoop/hive/metastore/TestObjectStore.java > PRE-CREATION > > Diff: https://reviews.apache.org/r/35803/diff/ > > > Testing > ------- > > Testing has been done. > > > Thanks, > > Aihua Xu > >