{"record":{"id":"c4e32526f2d3ff3a","repo":"apache/iceberg","slug":"unknown-serialize-version-c4e325","errorCode":null,"errorMessage":"Unknown serialize version: ","messagePattern":"Unknown serialize version: ","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"critical","filePath":"flink/v2.2/flink/src/main/java/org/apache/iceberg/flink/sink/DeltaManifestsSerializer.java","lineNumber":85,"sourceCode":"    out.write(deleteManifestBinary);\n\n    CharSequence[] referencedDataFiles = deltaManifests.referencedDataFiles();\n    out.writeInt(referencedDataFiles.length);\n    for (CharSequence referencedDataFile : referencedDataFiles) {\n      out.writeUTF(referencedDataFile.toString());\n    }\n\n    return binaryOut.toByteArray();\n  }\n\n  @Override\n  public DeltaManifests deserialize(int version, byte[] serialized) throws IOException {\n    if (version == VERSION_1) {\n      return deserializeV1(serialized);\n    } else if (version == VERSION_2) {\n      return deserializeV2(serialized);\n    } else {\n      throw new RuntimeException(\"Unknown serialize version: \" + version);\n    }\n  }\n\n  private DeltaManifests deserializeV1(byte[] serialized) throws IOException {\n    return new DeltaManifests(ManifestFiles.decode(serialized), null);\n  }\n\n  private DeltaManifests deserializeV2(byte[] serialized) throws IOException {\n    ManifestFile dataManifest = null;\n    ManifestFile deleteManifest = null;\n\n    ByteArrayInputStream binaryIn = new ByteArrayInputStream(serialized);\n    DataInputStream in = new DataInputStream(binaryIn);\n\n    int dataManifestSize = in.readInt();\n    if (dataManifestSize > 0) {\n      byte[] dataManifestBinary = new byte[dataManifestSize];\n      Preconditions.checkState(in.read(dataManifestBinary) == dataManifestSize);","sourceCodeStart":67,"sourceCodeEnd":103,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/flink/v2.2/flink/src/main/java/org/apache/iceberg/flink/sink/DeltaManifestsSerializer.java#L67-L103","documentation":"DeltaManifestsSerializer.deserialize throws this when the serialized checkpoint state carries a version byte that is neither VERSION_1 (Iceberg 1.12 and earlier) nor VERSION_2 (1.13+, durable storage based). It exists to fail fast on checkpoint state written by a different Iceberg version rather than silently producing a corrupt DeltaManifests.","triggerScenarios":"Restoring a Flink savepoint/checkpoint whose IcebergFilesCommitter state was written by an Iceberg version whose DeltaManifests VERSION constant is greater than the one on the classpath (downgrade), or state bytes that were manually edited/corrupted in the version byte.","commonSituations":"Rolling Iceberg back (e.g. 1.14 -> 1.12) while resuming from a savepoint; switching between Iceberg forks/vendors with divergent serialization; a job migrated across clusters with mismatched iceberg-flink-runtime jars.","solutions":["Align the Iceberg runtime version with the one that wrote the checkpoint state (upgrade the deserializing job, don't downgrade).","Take a new savepoint with the target version and resume from that instead of an old savepoint.","If a downgrade is unavoidable, drain the job to a clean finish (stop-with-savepoint --drain) before changing versions so no in-flight committer state remains."],"exampleFix":"// before (resume with older runtime from v2 state)\n//   ./bin/flink run -c Job iceberg-flink-runtime-1.12.jar ...\n// after\n//   ./bin/flink run -c Job iceberg-flink-runtime-1.14.jar ... -s /savepoints/orig-sp","handlingStrategy":"validation","validationCode":"// check iceberg version compatibility before resuming from a savepoint\nString stateVersion = /* version byte from state meta, if inspectable */;\nint VERSION_1 = 1, VERSION_2 = 2;\nif (stateVersion != VERSION_1 && stateVersion != VERSION_2) {\n  throw new IllegalStateException(\"Savepoint written by incompatible Iceberg version\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Never resume old savepoints after downgrading the Iceberg runtime.","Use stop-with-savepoint --drain before any version change.","Pin the iceberg-flink-runtime version in deployment configs."],"tags":["flink","checkpoint","serialization","version-mismatch"],"backgroundTag":"unsupported-enum-value","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"}