> On April 17, 2020, 7:03 p.m., Peter Vary wrote: > > Thanks Peter for the patch! > > This fix is long overdue! > > > > I do not understand one thing, see below. > > > > Also I would like to ask Denys to confirm, that running the init sqls again > > and again will not cause too much overhead in test runtime as he mentioned > > in our discussion. (5 min tests are fine, 1 hour tests are not fine :)) > > > > Thanks!
In this version we do not run the init sql again and again. We just run it once, and we just run the cleanDb between tests. There might be some Test classes that is not true, because there are multiple prepDb calls (I solved in in Qtest, TestDbTxnManager2) but in those places it will be just one call to check if the txns table exists, and then we return - Peter ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/72380/#review220352 ----------------------------------------------------------- On April 17, 2020, 3:24 p.m., Peter Varga wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/72380/ > ----------------------------------------------------------- > > (Updated April 17, 2020, 3:24 p.m.) > > > Review request for hive, Denys Kuzmenko and Zoltan Chovan. > > > Repository: hive-git > > > Description > ------- > > In the final version the prepDb creates the transactional tables with the > init schema (and ignores the others if they exists). The cleanDb resets the > database to the starting point. So between the test cases the cleanDb call is > enough. If the prepDb is called unneccessary it will just check if the txns > table exist and then return, so it will be fast > > > Diffs > ----- > > itests/hive-blobstore/pom.xml 09955c55f3 > itests/qtest-accumulo/pom.xml a35d2a8a10 > itests/qtest-druid/pom.xml cc0cceff68 > itests/qtest-kudu/pom.xml f23399fa37 > > itests/util/src/main/java/org/apache/hadoop/hive/ql/QTestMetaStoreHandler.java > b86d736a89 > pom.xml 90e39702a1 > ql/pom.xml d1846c9245 > > ql/src/test/org/apache/hadoop/hive/metastore/txn/TestCompactionTxnHandler.java > 15fcfc0e35 > ql/src/test/org/apache/hadoop/hive/metastore/txn/TestTxnHandler.java > 1d211857bf > > ql/src/test/org/apache/hadoop/hive/metastore/txn/TestTxnHandlerNoConnectionPool.java > ebe4880e3a > ql/src/test/org/apache/hadoop/hive/ql/lockmgr/ITestDbTxnManager.java > PRE-CREATION > ql/src/test/org/apache/hadoop/hive/ql/lockmgr/TestDbTxnManager2.java > 73d3b91585 > > standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/DatabaseProduct.java > 3e56ad513c > > standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnDbUtil.java > a66e16973f > > standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java > 962a63d418 > > standalone-metastore/metastore-server/src/main/sql/derby/hive-schema-4.0.0.derby.sql > 1ace9d3ef0 > > standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/TestHiveMetaStoreTxns.java > 5f3db52c2f > > standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/dbinstall/rules/Mysql.java > c537d95470 > > > Diff: https://reviews.apache.org/r/72380/diff/1/ > > > Testing > ------- > > On my machine the 50 tests in TestDbTxnManager2 on postgres runs under 5 > minutes. > > > Thanks, > > Peter Varga > >