Flaky TestIcebergProcedureCalls.testMigrateTimestampHiveTableWithOrc
Author: guyco33Created Sep 24, 2026Updated Sep 24, 2026
Trino version
master (484-SNAPSHOT)
Please describe the bug
pt (SuiteIceberg) failed on TestIcebergProcedureCalls.testMigrateTimestampHiveTableWithOrc in https://github.com/trinodb/trino/actions/runs/35980654584/job/107573815840 (PR #30551, which does not touch the migrate procedure; the suite passed on the previous two runs of the same code).
[ERROR] testMigrateTimestampHiveTableWithOrc(SparkIcebergEnvironment) (SparkIcebergEnvironment)
java.lang.RuntimeException: Query failed (#20260924_095433_02053_njeup): Failed to migrate table
at io.trino.tests.product.iceberg.TestIcebergProcedureCalls.testMigrateTimestampHiveTable(TestIcebergProcedureCalls.java:149)
at io.trino.tests.product.iceberg.TestIcebergProcedureCalls.testMigrateTimestampHiveTableWithOrc(TestIcebergProcedureCalls.java:68)
Caused by: io.trino.spi.TrinoException: Failed to migrate table
at io.trino.plugin.iceberg.procedure.MigrateProcedure.doMigrate(MigrateProcedure.java:260)
Caused by: io.trino.spi.TrinoException: Recursive directory must not exist when recursive_directory argument is 'fail': hdfs://hadoop-master:9000/user/hive/warehouse/test_migrate_timestamp_ir7n9l5ez3/metadata/6a597099-5844-4042-9698-0aedae3564d8-m0.avro
at io.trino.plugin.iceberg.procedure.MigrationUtils.buildDataFiles(MigrationUtils.java:124)
at io.trino.plugin.iceberg.procedure.MigrateProcedure.doMigrate(MigrateProcedure.java:213)The table name carries a random suffix, so the metadata directory was not left over from an earlier test; it looks like the migration itself had already written Iceberg metadata under the table location before buildDataFiles scanned it (a retry or a partially completed first attempt), and the scan then rejected its own output.
Source: trinodb/trino