{"record":{"id":"1851d88b5a68e232","repo":"apache/iceberg","slug":"unrecognized-version-or-corrupt-state-1851d8","errorCode":null,"errorMessage":"Unrecognized version or corrupt state: ","messagePattern":"Unrecognized version or corrupt state: ","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"flink/v2.3/flink/src/main/java/org/apache/iceberg/flink/sink/IcebergCommittableSerializer.java","lineNumber":66,"sourceCode":"    view.writeInt(committable.manifest().length);\n    view.write(committable.manifest());\n    return out.toByteArray();\n  }\n\n  @Override\n  public IcebergCommittable deserialize(int version, byte[] serialized) throws IOException {\n    if (version == 1) {\n      DataInputDeserializer view = new DataInputDeserializer(serialized);\n      String jobId = view.readUTF();\n      String operatorId = view.readUTF();\n      long checkpointId = view.readLong();\n      int manifestLen = view.readInt();\n      byte[] manifestBuf;\n      manifestBuf = new byte[manifestLen];\n      view.read(manifestBuf);\n      return new IcebergCommittable(manifestBuf, jobId, operatorId, checkpointId);\n    }\n    throw new IOException(\"Unrecognized version or corrupt state: \" + version);\n  }\n}\n","sourceCodeStart":48,"sourceCodeEnd":69,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/flink/v2.3/flink/src/main/java/org/apache/iceberg/flink/sink/IcebergCommittableSerializer.java#L48-L69","documentation":"IcebergCommittableSerializer.deserialize throws this IOException when the first byte (version marker) of a serialized IcebergCommittable does not match the current serializer version. It indicates the byte stream was written by an incompatible serializer version or the payload is truncated/corrupt.","triggerScenarios":"Deserializing an IcebergCommittable during Flink checkpoint/state recovery whose version byte differs from CURRENT_VERSION, or reading a corrupted/truncated state byte stream.","commonSituations":"Restoring a Flink savepoint/checkpoint taken with a different Iceberg version; upgraded connector reading old job state; Kafka/network corruption of serialized committables in exactly-once topologies.","solutions":["Restore the job with the same Iceberg Flink runtime version that produced the savepoint/checkpoint","Start a new job without the incompatible savepoint state (accept re-processing of in-flight committables)","If corruption is suspected, re-run from an earlier healthy checkpoint and verify storage backend integrity"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  IcebergCommittable c = serializer.deserialize(version, view);\n} catch (IOException e) {\n  if (e.getMessage().startsWith(\"Unrecognized version\")) {\n    // fall back to previous serializer version or fail the restore with a clear upgrade message\n  }\n  throw e;\n}","preventionTips":["Keep the same Iceberg version across savepoint creation and restore","Enable Flink state compatibility / serializer version checks before upgrading","Test savepoint restore in staging before production upgrades"],"tags":["flink","serialization","checkpointing","version-compatibility"],"backgroundTag":"checksum-mismatch","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"}