{"record":{"id":"4b7e655a168a2007","repo":"apache/iceberg","slug":"unknown-serialize-version","errorCode":null,"errorMessage":"Unknown serialize version: ","messagePattern":"Unknown serialize version: ","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"flink/v2.1/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.1/flink/src/main/java/org/apache/iceberg/flink/sink/DeltaManifestsSerializer.java#L67-L103","documentation":"DeltaManifestsSerializer persists DeltaManifests (pending manifest files for a committable) into Flink checkpoint state. deserialize() accepts only the known VERSION_1 and VERSION_2 formats; any other version byte means the state was written by an incompatible (newer or corrupt) serializer, so it throws RuntimeException.","triggerScenarios":"Restoring a Flink job whose checkpoint/savepoint was written by a newer Iceberg version with an unimplemented serializer version, or checkpoint state bytes corrupted so the version int reads garbage.","commonSituations":"Downgrading the Iceberg Flink runtime after a checkpoint was taken with a newer version; restoring checkpoints across major version boundaries; truncated or corrupted checkpoint storage (e.g. HDFS/S3 issues).","solutions":["Restore the job with the same (or newer) Iceberg version that wrote the checkpoint, then let it complete before downgrading.","Re-run the affected checkpoint interval without restore so fresh DeltaManifests are serialized with a known version.","Verify checkpoint storage integrity (object store/truncation issues) if corruption is suspected.","If downgrade is unavoidable, drain the pending commits via a successful checkpoint before switching versions."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { restoreState(state); } catch (RuntimeException e) {\n  if (e.getMessage() != null && e.getMessage().startsWith(\"Unknown serialize version\")) {\n    LOG.error(\"Checkpoint written by incompatible Iceberg version; restart without this state or with matching version\", e);\n  }\n}","preventionTips":["Never downgrade the Iceberg Flink runtime while checkpoints with pending committables exist.","Drain pending commits (successful checkpoint with no in-flight data) before a version change.","Test restore from a savepoint in a staging job before production upgrades/downgrades."],"tags":["flink","checkpoint","serialization","version-skew","state-restore"],"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-14T11:17:12.474Z"}