{"record":{"id":"974ed55475e2256f","repo":"apache/iceberg","slug":"failed-to-validate-no-appends-matching-s","errorCode":null,"errorMessage":"Failed to validate no appends matching %s","messagePattern":"Failed to validate no appends matching (.+?)","errorType":"exception","errorClass":"UncheckedIOException","httpStatus":null,"severity":"error","filePath":"core/src/main/java/org/apache/iceberg/MergingSnapshotProducer.java","lineNumber":378,"sourceCode":"   * @param partitionSet a set of partitions to filter new conflicting data files\n   * @param parent ending snapshot on the lineage being validated\n   */\n  protected void validateAddedDataFiles(\n      TableMetadata base, Long startingSnapshotId, PartitionSet partitionSet, Snapshot parent) {\n    CloseableIterable<ManifestEntry<DataFile>> conflictEntries =\n        addedDataFiles(base, startingSnapshotId, null, partitionSet, parent);\n\n    try (CloseableIterator<ManifestEntry<DataFile>> conflicts = conflictEntries.iterator()) {\n      if (conflicts.hasNext()) {\n        throw new ValidationException(\n            \"Found conflicting files that can contain records matching partitions %s: %s\",\n            partitionSet,\n            Iterators.toString(\n                Iterators.transform(conflicts, entry -> entry.file().location().toString())));\n      }\n\n    } catch (IOException e) {\n      throw new UncheckedIOException(\n          String.format(\"Failed to validate no appends matching %s\", partitionSet), e);\n    }\n  }\n\n  /**\n   * Validates that no files matching a filter have been added to the table since a starting\n   * snapshot.\n   *\n   * @param base table metadata to validate\n   * @param startingSnapshotId id of the snapshot current at the start of the operation\n   * @param conflictDetectionFilter an expression used to find new conflicting data files\n   */\n  protected void validateAddedDataFiles(\n      TableMetadata base,\n      Long startingSnapshotId,\n      Expression conflictDetectionFilter,\n      Snapshot parent) {\n    CloseableIterable<ManifestEntry<DataFile>> conflictEntries =","sourceCodeStart":360,"sourceCodeEnd":396,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/core/src/main/java/org/apache/iceberg/MergingSnapshotProducer.java#L360-L396","documentation":"When the conflict validation scan for added data files throws an IOException (while iterating manifests during addedDataFiles), the ValidationException path can't run and the error is wrapped in this UncheckedIOException, naming the partition set that was being validated. It signals an I/O failure reading manifest files during commit-time validation, not a logical conflict.","triggerScenarios":"Manifest files referenced by the snapshot are missing/unreadable during validateAddedDataFiles (deleted by concurrent expire/rewrite, object-store transient errors, or permission problems) while the producer checks for conflicting appends in the given partitions.","commonSituations":"Snapshot expiry removing manifests that a long-running job still validates against; S3 404/403 during manifest reads; HDFS outage mid-commit; orphan/externally deleted metadata.","solutions":["Re-run the operation after refreshing the table (fresh metadata references intact manifests)","Restore/avoid deleting manifests of snapshots still in use (raise history.expire.min-snapshots-kept-to-keep or pause expire during jobs)","Verify storage credentials and network access to manifest files","Check for orphaned or manually deleted manifest files in the metadata chain"],"exampleFix":"// before: long job validates against expired snapshots\n// after: keep enough snapshots for in-flight jobs\ntable.updateProperties().set(TableProperties.MIN_SNAPSHOTS_TO_KEEP, \"10\").commit();","handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { producer.commit(); } catch (UncheckedIOException e) { if (e.getMessage().startsWith(\"Failed to validate no appends\")) { /* refresh table and retry with backoff */ } throw e; }","preventionTips":["Keep expireSnapshots from deleting manifests of snapshots in active use (raise min-snapshots-kept-to-keep)","Pause table maintenance during long-running jobs","Ensure storage credentials remain valid for the whole job duration","Monitor for object-store 404/403 errors on manifest reads"],"tags":["io","manifest-read","concurrency","validation"],"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"}