{"record":{"id":"bcbce6f8b6aeb82c","repo":"prestodb/presto","slug":"iceberg-filesystem-error-bcbce6","errorCode":"ICEBERG_FILESYSTEM_ERROR","errorMessage":"Failed to read equality delete information","messagePattern":"Failed to read equality delete information","errorType":"error_code","errorClass":"PrestoException","httpStatus":null,"severity":"error","filePath":"presto-iceberg/src/main/java/com/facebook/presto/iceberg/optimizer/IcebergEqualityDeleteAsJoin.java","lineNumber":335,"sourceCode":"                            }\n                            partitionFieldsBuilder.put(field.fieldId(), new PartitionFieldInfo(partitionType.field(field.fieldId()), field));\n                        });\n                        ImmutableMap<Integer, PartitionFieldInfo> partitionFields = partitionFieldsBuilder.build();\n                        ImmutableSet<Integer> identityPartitionFieldSourceIds = identityPartitionFieldSourceIdsBuilder.build();\n                        HashSet<Integer> result = new HashSet<>();\n                        result.addAll(partitionFields.keySet());\n\n                        // Filter out identity partition columns from delete file's `equalityFieldIds` to support `delete-schema-merging` within the same partition spec.\n                        List<Integer> equalityFieldIdsExcludeIdentityPartitionField = delete.equalityFieldIds().stream()\n                                .filter(fieldId -> !identityPartitionFieldSourceIds.contains(fieldId))\n                                .collect(Collectors.toList());\n                        result.addAll(equalityFieldIdsExcludeIdentityPartitionField);\n                        deleteInformations.put(ImmutableSet.copyOf(result), new DeleteSetInfo(partitionFields, equalityFieldIdsExcludeIdentityPartitionField));\n                    }\n                });\n            }\n            catch (IOException e) {\n                throw new PrestoException(ICEBERG_FILESYSTEM_ERROR, \"Failed to read equality delete information\", e);\n            }\n            return ImmutableMap.copyOf(deleteInformations);\n        }\n\n        private TableScanNode createDeletesTableScan(ImmutableMap<VariableReferenceExpression, ColumnHandle> deleteColumnAssignments,\n                IcebergTableHandle icebergTableHandle,\n                IcebergTableName tableName,\n                TableHandle table,\n                DeleteSetInfo deleteInfo)\n        {\n            List<VariableReferenceExpression> outputs = deleteColumnAssignments.keySet().asList();\n            IcebergTableHandle deletesTableHandle = new IcebergTableHandle(icebergTableHandle.getSchemaName(),\n                    new IcebergTableName(tableName.getTableName(),\n                            IcebergTableType.EQUALITY_DELETES, // Read equality deletes instead of data\n                            tableName.getSnapshotId(),\n                            tableName.getBranchName(),\n                            Optional.empty()),\n                    icebergTableHandle.isSnapshotSpecified(),","sourceCodeStart":317,"sourceCodeEnd":353,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-iceberg/src/main/java/com/facebook/presto/iceberg/optimizer/IcebergEqualityDeleteAsJoin.java#L317-L353","documentation":"The IcebergEqualityDeleteAsJoin optimizer reads data file metadata (delete files and their schemas) from Iceberg table metadata through a callable that can raise IOException. Any I/O failure while collecting equality delete information is rethrown as ICEBERG_FILESYSTEM_ERROR 'Failed to read equality delete information'. This is a wrapper: the real cause is the attached IOException.","triggerScenarios":"Planning a query against an Iceberg v2 table with equality deletes where reading the table's manifest/delete-file metadata throws IOException — metastore or filesystem unreachable, missing manifest files, or credential failures during optimizer metadata access.","commonSituations":"HDFS NameNode or S3 temporarily unreachable during query planning; expired S3 credentials; Iceberg table metadata files deleted by concurrent compaction/expire_snapshots while a query plans against it.","solutions":["Retry the query — planning-time filesystem blips are often transient.","Inspect the wrapped IOException cause (connectivity, credentials, missing file) and fix that.","Verify delete/manifest files referenced in table metadata still exist; re-snapshot or roll back if expire_snapshots raced the query.","Refresh credentials / fix Hadoop configuration (fs.defaultFS, auth) for the Presto process."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// verify metadata reachability before querying\nhadoop fs -ls <table_metadata_location>/metadata/","typeGuard":null,"tryCatchPattern":"for (int attempt = 0; attempt < 3; attempt++) {\n  try { runQuery(); break; }\n  catch (PrestoException e) {\n    if (!e.getErrorCode().getName().equals(\"ICEBERG_FILESYSTEM_ERROR\")) throw e;\n    sleep(backoff(attempt));\n  }\n}","preventionTips":["Ensure stable connectivity/credentials between Presto and HDFS/S3 during planning.","Avoid expire_snapshots/compaction racing live query planning.","Rotate long-lived credentials before expiry.","Inspect the wrapped IOException cause for the real failure."],"tags":[],"backgroundTag":null,"analyzedSha":"55bb57d202de3b926896fa966c2c4a44c779634e","analyzedAt":"2026-09-04T12:50:26.162Z","contentChangedAt":"2026-09-04T12:50:26.162Z","schemaVersion":2},"datasetVersion":"2026-09-11T21:17:09.523Z"}