{"record":{"id":"f015e3a8704bd548","repo":"apache/iceberg","slug":"failed-to-read-manifest-f015e3","errorCode":null,"errorMessage":"Failed to read manifest: ","messagePattern":"Failed to read manifest: ","errorType":"exception","errorClass":"UncheckedIOException","httpStatus":null,"severity":"error","filePath":"flink/v2.3/flink/src/main/java/org/apache/iceberg/flink/maintenance/operator/EqualityConvertDVWriter.java","lineNumber":312,"sourceCode":"    }\n\n    return anyPartition;\n  }\n\n  private void readDVEntries(\n      ManifestFile manifest, Set<String> filterPaths, Map<String, DeleteFile> out) {\n    manifestsRead++;\n    try (ManifestReader<DeleteFile> reader =\n        ManifestFiles.readDeleteManifest(manifest, table.io(), table.specs())) {\n      for (DeleteFile deleteFile : reader) {\n        if (ContentFileUtil.isDV(deleteFile)\n            && deleteFile.referencedDataFile() != null\n            && filterPaths.contains(deleteFile.referencedDataFile())) {\n          out.put(deleteFile.referencedDataFile(), deleteFile);\n        }\n      }\n    } catch (IOException e) {\n      throw new UncheckedIOException(\"Failed to read manifest: \" + manifest.path(), e);\n    }\n  }\n\n  @VisibleForTesting\n  int manifestsReadLastCycle() {\n    return manifestsRead;\n  }\n\n  @VisibleForTesting\n  int retainedStateSize() {\n    return positionsByFile.size();\n  }\n\n  private PositionDeleteIndex loadPreviousDV(String dataFilePath, Map<String, DeleteFile> dvs) {\n    DeleteFile existingDV = dvs.get(dataFilePath);\n    if (existingDV == null) {\n      return null;\n    }","sourceCodeStart":294,"sourceCodeEnd":330,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/flink/v2.3/flink/src/main/java/org/apache/iceberg/flink/maintenance/operator/EqualityConvertDVWriter.java#L294-L330","documentation":"Thrown by EqualityConvertDVWriter.readDVEntries when reading a manifest to collect existing deletion vectors fails with an IOException. The library wraps the IOException in an UncheckedIOException, including the manifest path, because the maintenance task cannot proceed without knowing which DVs already exist on the target branch.","triggerScenarios":"An IOException (deleted/corrupt manifest file, unavailable filesystem, transient object-store errors, network blips to HDFS/S3) while iterating manifest entries via CloseableIterable in readDVEntries, called from collectExistingDVs during the DV collection phase of equality delete conversion.","commonSituations":"Underlying data files or manifests deleted by concurrent expiration or compaction while the maintenance job runs; S3/HDFS transient I/O errors or throttling; misconfigured FileIO credentials causing read failures; table metadata pointing to manifests that no longer exist.","solutions":["Check the wrapped cause (e.getCause()) to identify the underlying IOException and verify the manifest at the reported path exists and is readable.","Ensure no concurrent table maintenance (expireSnapshots, removeOrphanFiles, rewriteDataFiles) runs against the table while the equality-conversion job is active.","Verify FileIO/storage credentials and connectivity (S3 endpoint, HDFS NameNode) and retry the job after transient failures.","If manifests are truly missing, inspect table history for metadata corruption and consider rolling back to a valid snapshot."],"exampleFix":"// before: reading manifests while compaction expires old snapshots concurrently\nmaintenanceJob.start(); rewriteDataFiles(table); // causes manifest removal mid-run\n// after\nmaintenanceJob.start();\nmaintenanceJob.await(); // or stop other maintenance tasks first\nrewriteDataFiles(table);","handlingStrategy":"try-catch","validationCode":"TableMetadata meta = table.operations().current();\nSnapshot snap = meta.currentSnapshot();\n// verify referenced manifests are still readable before running the job\nsnap.allManifests(table.io()).forEach(m -> Preconditions.checkArgument(table.io().newInputFile(m.path()).exists(), \"missing manifest \" + m.path()));","typeGuard":null,"tryCatchPattern":"try {\n  runEqualityConvertJob(table, cfg);\n} catch (UncheckedIOException e) {\n  LOG.error(\"DV manifest read failed for {}, cause={}\", cfg.branch(), e.getCause(), e);\n  // retry after verifying storage health / stopping concurrent maintenance\n}","preventionTips":["Do not run expireSnapshots/removeOrphanFiles concurrently with equality-delete conversion","Verify FileIO credentials and storage connectivity before launching the job","Add object-store retries (S3 throttle handling) in your Hadoop/S3 config","Monitor manifest availability after compaction jobs"],"tags":["io","manifest","flink","unchecked-exception"],"backgroundTag":"file-read-failed","analyzedSha":"86d9c8fc543e7c56c9f624eb725f76c9baff9570","analyzedAt":"2026-09-12T00:46:39.097Z","contentChangedAt":"2026-09-12T00:46:39.097Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}