Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TestDeltaLakePreferredPartitioning.testPreferredWritePartitioningCreateTable is Flaky #12300

Closed
alexjo2144 opened this issue May 9, 2022 · 4 comments · Fixed by #12537
Closed
Assignees

Comments

@alexjo2144
Copy link
Member

alexjo2144 commented May 9, 2022

Error:  io.trino.plugin.deltalake.TestDeltaLakePreferredPartitioning.testPreferredWritePartitioningCreateTable  Time elapsed: 3.818 s  <<< FAILURE!
java.lang.RuntimeException: Failed to write Delta Lake transaction log entry
	at io.trino.testing.AbstractTestingTrinoClient.execute(AbstractTestingTrinoClient.java:122)
	at io.trino.testing.DistributedQueryRunner.execute(DistributedQueryRunner.java:526)
	at io.trino.testing.QueryAssertions.assertUpdate(QueryAssertions.java:71)
	at io.trino.testing.AbstractTestQueryFramework.assertUpdate(AbstractTestQueryFramework.java:324)
	at io.trino.plugin.deltalake.TestDeltaLakePreferredPartitioning.testPreferredWritePartitioningCreateTable(TestDeltaLakePreferredPartitioning.java:65)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:104)
	at org.testng.internal.Invoker.invokeMethod(Invoker.java:645)
	at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:851)
	at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1177)
	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:129)
	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:112)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:829)
	Suppressed: java.lang.Exception: SQL: CREATE TABLE IF NOT EXISTS table_03bbe33f92944a0da517d32d2c79b555 WITH (location = 's3://mock-delta-lake-bucket/table_03bbe33f92944a0da517d32d2c79b555', partitioned_by = ARRAY['partkey']) AS SELECT orderkey, partkey % 101 AS partkey FROM tpch.tiny.lineitem
		at io.trino.testing.DistributedQueryRunner.execute(DistributedQueryRunner.java:529)
		... 16 more
Caused by: io.trino.spi.TrinoException: Failed to write Delta Lake transaction log entry
	at io.trino.plugin.deltalake.DeltaLakeMetadata.finishCreateTable(DeltaLakeMetadata.java:892)
	at io.trino.plugin.base.classloader.ClassLoaderSafeConnectorMetadata.finishCreateTable(ClassLoaderSafeConnectorMetadata.java:478)
	at io.trino.metadata.MetadataManager.finishCreateTable(MetadataManager.java:865)
	at io.trino.sql.planner.LocalExecutionPlanner.lambda$createTableFinisher$3(LocalExecutionPlanner.java:3949)
	at io.trino.operator.TableFinishOperator.getOutput(TableFinishOperator.java:318)
	at io.trino.operator.Driver.processInternal(Driver.java:388)
	at io.trino.operator.Driver.lambda$processFor$9(Driver.java:292)
	at io.trino.operator.Driver.tryWithLock(Driver.java:693)
	at io.trino.operator.Driver.processFor(Driver.java:285)
	at io.trino.execution.SqlTaskExecution$DriverSplitRunner.processFor(SqlTaskExecution.java:1092)
	at io.trino.execution.executor.PrioritizedSplitRunner.process(PrioritizedSplitRunner.java:163)
	at io.trino.execution.executor.TaskExecutor$TaskRunner.run(TaskExecutor.java:488)
	at io.trino.$gen.Trino_testversion____20220509_202105_3299.run(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: io.trino.plugin.hive.TableAlreadyExistsException: Table already exists: 'default.table_03bbe33f92944a0da517d32d2c79b555'
	at io.trino.plugin.hive.metastore.thrift.ThriftHiveMetastore.createTable(ThriftHiveMetastore.java:1080)
	at io.trino.plugin.hive.metastore.thrift.BridgingHiveMetastore.createTable(BridgingHiveMetastore.java:205)
	at io.trino.plugin.hive.metastore.cache.CachingHiveMetastore.createTable(CachingHiveMetastore.java:474)
	at io.trino.plugin.deltalake.metastore.HiveMetastoreBackedDeltaLakeMetastore.createTable(HiveMetastoreBackedDeltaLakeMetastore.java:160)
	at io.trino.plugin.deltalake.DeltaLakeMetadata.finishCreateTable(DeltaLakeMetadata.java:879)
	... 15 more
@ebyhr
Copy link
Member

ebyhr commented May 20, 2022

@findinpath
Copy link
Contributor

@findepi
Copy link
Member

findepi commented May 24, 2022

@ebyhr ebyhr self-assigned this May 25, 2022
@ebyhr
Copy link
Member

ebyhr commented May 25, 2022

It seems retry happened with java.net.SocketTimeoutException: Read timed out, but the operation in Thrift Hive metastore succeeded remotely. Then, we get TableAlreadyExistsException in subsequent call.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

4 participants