datastrato / gravitino

World's most powerful open data catalog for building a high-performance, geo-distributed and federated metadata lake.
https://datastrato.ai/docs/
Apache License 2.0
654 stars 199 forks source link

[Bug report] Test cases in jdbc-mysql/00008_alter_catalog.sql failed on distributed Trino environment #3650

Open danhuawang opened 1 month ago

danhuawang commented 1 month ago

Version

main branch

Describe what's wrong

image

Error message and/or stacktrace

2024-05-30 15:41:17 ERROR [pool-2-thread-1] TrinoQueryIT:225 - Execute sql in the tester jdbc-mysql/00008_alter_catalog.sql under catalog mysql failed. Sql: select * from gravitino.system.catalog where name = 'gt_mysql_xxx1'; Expect: "gt_mysql_xxx1","jdbc-mysql","{""jdbc-url"":""jdbc:mysql://%/?useSSL=false"",""jdbc-user"":""trino"",""jdbc-password"":""ds123"",""jdbc-driver"":""com.mysql.cj.jdbc.Driver""}" Actual:

Failed to execute test org.opentest4j.AssertionFailedError: Execute sql in the tester jdbc-mysql/00008_alter_catalog.sql under catalog mysql failed. Sql: select from gravitino.system.catalog where name = 'gt_mysql_xxx1'; Expect: java.lang.RuntimeException: Failed to execute test org.opentest4j.AssertionFailedError: Execute sql in the tester jdbc-mysql/00008_alter_catalog.sql under catalog mysql failed. Sql: select from gravitino.system.catalog where name = 'gt_mysql_xxx1'; Expect: "gt_mysql_xxx1","jdbc-mysql","{""jdbc-url"":""jdbc:mysql://%/?useSSL=false"",""jdbc-user"":""trino"",""jdbc-password"":""ds123"",""jdbc-driver"":""com.mysql.cj.jdbc.Driver""}" Actual:

"gt_mysql_xxx1","jdbc-mysql","{""jdbc-url"":""jdbc:mysql://%/?useSSL=false"",""jdbc-user"":""trino"",""jdbc-password"":""ds123"",""jdbc-driver"":""com.mysql.cj.jdbc.Driver""}" Actual:

    at com.datastrato.gravitino.integration.test.trino.TrinoQueryIT.waitForCompleted(TrinoQueryIT.java:342)
    at com.datastrato.gravitino.integration.test.trino.TrinoQueryIT.testSql(TrinoQueryIT.java:329)
    at com.datastrato.gravitino.integration.test.trino.TrinoQueryTestTool.main(TrinoQueryTestTool.java:175)

Caused by: java.util.concurrent.ExecutionException: org.opentest4j.AssertionFailedError: Execute sql in the tester jdbc-mysql/00008_alter_catalog.sql under catalog mysql failed.

How to reproduce

  1. Set up Trino distributed environment
  2. Run jdbc-mysql test set:
    ./gradlew :integration-test:TrinoTest '-PappArgs="--auto=none --test_set=jdbc-mysql --tester_id=00008 --postgresql_uri=jdbc:postgresql://pg-16-postgresql.relational-catalog:5432 --mysql_uri=jdbc:mysql://my-8-mysql.relational-catalog:3306 --hdfs_uri=hdfs://hadoop-hdfs-namenode.hadoop:8020 --hive_uri=thrift://hadoop-metastore.hadoop:9083 --gravitino_uri=http://a20b1e50807a547e1bf8187651d92e86-1205661208.ap-northeast-1.elb.amazonaws.com:8090 --trino_uri=http://af93449fcaf1a4c0e81068b736a36db4-1625278435.ap-northeast-1.elb.amazonaws.com:8080"'

Additional context

No response

diqiu50 commented 2 weeks ago

@danhuawang It's still in the current version of gravitino-trino-connector

danhuawang commented 2 weeks ago

@danhuawang It's still in the current version of gravitino-trino-connector

Yes, the issue still exists in the latest version of gravitino-trino-connector.

2024-06-12 10:58:53 ERROR [pool-2-thread-1] TrinoQueryIT:225 - Execute sql in the tester jdbc-mysql/00008_alter_catalog.sql under catalog mysql failed.
java.lang.RuntimeException: Failed to execute test org.opentest4j.AssertionFailedError: Execute sql in the tester jdbc-mysql/00008_alter_catalog.sql under catalog mysql failed.
Sql:
select * from gravitino.system.catalog where name = 'gt_mysql_xxx1';
Expect:
"gt_mysql_xxx1","jdbc-mysql","{""jdbc-url"":""jdbc:mysql://%/?useSSL=false"",""jdbc-user"":""trino"",""jdbc-password"":""ds123"",""jdbc-driver"":""com.mysql.cj.jdbc.Driver""}"
Actual:

Failed to execute test org.opentest4j.AssertionFailedError: Execute sql in the tester jdbc-mysql/00008_alter_catalog.sql under catalog mysql failed.
Sql:
select * from gravitino.system.catalog where name = 'gt_mysql_xxx1';
Expect:
"gt_mysql_xxx1","jdbc-mysql","{""jdbc-url"":""jdbc:mysql://%/?useSSL=false"",""jdbc-user"":""trino"",""jdbc-password"":""ds123"",""jdbc-driver"":""com.mysql.cj.jdbc.Driver""}"
Actual:

Sql:
select * from gravitino.system.catalog where name = 'gt_mysql_xxx1';
Expect:
"gt_mysql_xxx1","jdbc-mysql","{""jdbc-url"":""jdbc:mysql://%/?useSSL=false"",""jdbc-user"":""trino"",""jdbc-password"":""ds123"",""jdbc-driver"":""com.mysql.cj.jdbc.Driver""}"
Actual:

    at com.datastrato.gravitino.integration.test.trino.TrinoQueryIT.waitForCompleted(TrinoQueryIT.java:342)
    at com.datastrato.gravitino.integration.test.trino.TrinoQueryIT.testSql(TrinoQueryIT.java:329)
    at com.datastrato.gravitino.integration.test.trino.TrinoQueryTestTool.main(TrinoQueryTestTool.java:175)
Caused by: java.util.concurrent.ExecutionException: org.opentest4j.AssertionFailedError: Execute sql in the tester jdbc-mysql/00008_alter_catalog.sql under catalog mysql failed.
Sql:
select * from gravitino.system.catalog where name = 'gt_mysql_xxx1';
Expect:
"gt_mysql_xxx1","jdbc-mysql","{""jdbc-url"":""jdbc:mysql://%/?useSSL=false"",""jdbc-user"":""trino"",""jdbc-password"":""ds123"",""jdbc-driver"":""com.mysql.cj.jdbc.Driver""}"
Actual:

    at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122)
    at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191)
    at com.datastrato.gravitino.integration.test.trino.TrinoQueryIT.waitForCompleted(TrinoQueryIT.java:339)
    ... 2 more
Caused by: org.opentest4j.AssertionFailedError: Execute sql in the tester jdbc-mysql/00008_alter_catalog.sql under catalog mysql failed.
Sql:
select * from gravitino.system.catalog where name = 'gt_mysql_xxx1';
Expect:
"gt_mysql_xxx1","jdbc-mysql","{""jdbc-url"":""jdbc:mysql://%/?useSSL=false"",""jdbc-user"":""trino"",""jdbc-password"":""ds123"",""jdbc-driver"":""com.mysql.cj.jdbc.Driver""}"
Actual:

    at org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:39)
    at org.junit.jupiter.api.Assertions.fail(Assertions.java:134)
    at com.datastrato.gravitino.integration.test.trino.TrinoQueryIT.executeSqlFileWithCheckResult(TrinoQueryIT.java:226)
    at com.datastrato.gravitino.integration.test.trino.TrinoQueryIT.runOneTestSetWithCatalog(TrinoQueryIT.java:116)
    at com.datastrato.gravitino.integration.test.trino.TrinoQueryIT.lambda$runOneTestset$5(TrinoQueryIT.java:364)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
    at java.base/java.lang.Thread.run(Thread.java:840)

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.