{"record":{"id":"f2ca532f18b29afb","repo":"apache/iceberg","slug":"unknown-version-f2ca53","errorCode":null,"errorMessage":"Unknown version: ","messagePattern":"Unknown version: ","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"flink/v1.20/flink/src/main/java/org/apache/iceberg/flink/source/enumerator/IcebergEnumeratorStateSerializer.java","lineNumber":69,"sourceCode":"  @Override\n  public int getVersion() {\n    return VERSION;\n  }\n\n  @Override\n  public byte[] serialize(IcebergEnumeratorState enumState) throws IOException {\n    return serializeV2(enumState);\n  }\n\n  @Override\n  public IcebergEnumeratorState deserialize(int version, byte[] serialized) throws IOException {\n    switch (version) {\n      case 1:\n        return deserializeV1(serialized);\n      case 2:\n        return deserializeV2(serialized);\n      default:\n        throw new IOException(\"Unknown version: \" + version);\n    }\n  }\n\n  @VisibleForTesting\n  byte[] serializeV1(IcebergEnumeratorState enumState) throws IOException {\n    DataOutputSerializer out = SERIALIZER_CACHE.get();\n    serializeEnumeratorPosition(out, enumState.lastEnumeratedPosition(), positionSerializer);\n    serializePendingSplits(out, enumState.pendingSplits(), splitSerializer);\n    byte[] result = out.getCopyOfBuffer();\n    out.clear();\n    return result;\n  }\n\n  @VisibleForTesting\n  IcebergEnumeratorState deserializeV1(byte[] serialized) throws IOException {\n    DataInputDeserializer in = new DataInputDeserializer(serialized);\n    IcebergEnumeratorPosition enumeratorPosition =\n        deserializeEnumeratorPosition(in, positionSerializer);","sourceCodeStart":51,"sourceCodeEnd":87,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/flink/v1.20/flink/src/main/java/org/apache/iceberg/flink/source/enumerator/IcebergEnumeratorStateSerializer.java#L51-L87","documentation":"IcebergEnumeratorStateSerializer.deserialize supports versions 1 and 2; any other version byte in serialized enumerator state throws IOException. The state was written by an incompatible connector version.","triggerScenarios":"Restoring a Flink checkpoint/savepoint whose enumerator state was serialized with a version other than 1 or 2 (e.g., newer connector's state read by an older connector).","commonSituations":"Downgrading the Iceberg Flink connector; cross-version state restore during job upgrade rollbacks.","solutions":["Restore with the same or newer connector version that produced the checkpoint.","Avoid downgrading across state-format changes; take a new savepoint with the target version while it is still running.","Start the job without state if the old state is unrecoverable, accepting reprocessing."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  state = IcebergEnumeratorStateSerializer.deserialize(version, bytes);\n} catch (IOException e) {\n  LOG.warn(\"Incompatible enumerator state version; restarting without state\", e);\n  state = null;\n}","preventionTips":["Restore state only with the same or newer connector version","Run restore tests as part of connector upgrade procedure","Avoid mixing iceberg-flink jar versions in one deployment"],"tags":["flink","serialization","checkpoint","version-mismatch"],"backgroundTag":"incompatible-source-type","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"}