{"record":{"id":"9047b50f28340fb9","repo":"apache/iceberg","slug":"unexpected-entry-status-entry-status","errorCode":null,"errorMessage":"Unexpected entry status: ${entry.status}","messagePattern":"Unexpected entry status: (.+?)","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"core/src/main/java/org/apache/iceberg/BaseIncrementalChangelogScan.java","lineNumber":178,"sourceCode":"                    commitSnapshotId,\n                    dataFile,\n                    NO_DELETES,\n                    context.schemaAsString(),\n                    context.specAsString(),\n                    context.residuals());\n\n              case DELETED:\n                return new BaseDeletedDataFileScanTask(\n                    changeOrdinal,\n                    commitSnapshotId,\n                    dataFile,\n                    NO_DELETES,\n                    context.schemaAsString(),\n                    context.specAsString(),\n                    context.residuals());\n\n              default:\n                throw new IllegalArgumentException(\"Unexpected entry status: \" + entry.status());\n            }\n          });\n    }\n  }\n}\n","sourceCodeStart":160,"sourceCodeEnd":184,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/core/src/main/java/org/apache/iceberg/BaseIncrementalChangelogScan.java#L160-L184","documentation":"When materializing changelog entries, each manifest entry status (ADDED=1, EXISTING=0, DELETED=2) must map to a changelog insert/delete record. Any other status value is a spec violation and triggers this IllegalArgumentException. In practice this indicates corrupt manifest data or a newer format version read by an older client.","triggerScenarios":"Changelog scan over snapshots whose manifest entries carry a status byte outside {0,1,2} — typically corrupt/rewritten manifests or format-version incompatibility.","commonSituations":"Reading tables written by a newer Iceberg version with an older client; corrupted manifest files after failed commits or manual metadata edits.","solutions":["Upgrade the Iceberg client to at least the version that wrote the table's manifests","Rewrite manifests/tables (rewrite_manifests procedure) to rebuild valid entries","Check for manual tampering with metadata files; restore from a valid snapshot/metadata checkpoint"],"exampleFix":"// before\nTable table = oldClientCatalog.loadTable(ident);\n// after\n// upgrade dependency to match writer version, e.g. in Gradle:\n// implementation 'org.apache.iceberg:iceberg-core:1.6.x' // matches table writer version\nTable table = catalog.loadTable(ident);","handlingStrategy":"try-catch","validationCode":null,"typeGuard":"boolean knownStatus(int status) { return status == 0 || status == 1 || status == 2; }","tryCatchPattern":"try { changelogScan.iterator(); } catch (IllegalArgumentException e) { logger.error(\"Manifest entry status unrecognized — client/table version mismatch\", e); }","preventionTips":["Keep the Iceberg client version >= the version that wrote the table","Avoid manual edits of manifest files","Rebuild manifests with rewrite_manifests after suspected corruption"],"tags":["changelog","manifest","illegal-argument","internal-state"],"backgroundTag":"internal-invariant-violation","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"}