{"record":{"id":"ccaec600851415e5","repo":"apache/flink","slug":"unrecognized-version-ccaec6","errorCode":null,"errorMessage":"Unrecognized version: {}","messagePattern":"Unrecognized version: (.+?)","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"critical","filePath":"flink-core/src/main/java/org/apache/flink/api/common/typeutils/SimpleTypeSerializerSnapshot.java","lineNumber":110,"sourceCode":"    }\n\n    @Override\n    public void readSnapshot(int readVersion, DataInputView in, ClassLoader classLoader)\n            throws IOException {\n        switch (readVersion) {\n            case 3:\n                {\n                    break;\n                }\n            case 2:\n                {\n                    // we don't need the classname any more; read and drop to maintain compatibility\n                    in.readUTF();\n                    break;\n                }\n            default:\n                {\n                    throw new IOException(\"Unrecognized version: \" + readVersion);\n                }\n        }\n    }\n\n    // ------------------------------------------------------------------------\n    //  standard utilities\n    // ------------------------------------------------------------------------\n\n    @Override\n    public final boolean equals(Object obj) {\n        return obj != null && obj.getClass() == getClass();\n    }\n\n    @Override\n    public final int hashCode() {\n        return getClass().hashCode();\n    }\n","sourceCodeStart":92,"sourceCodeEnd":128,"githubUrl":"https://github.com/apache/flink/blob/2f3c205e9266cb30240eb7f4fdab15cad629a70f/flink-core/src/main/java/org/apache/flink/api/common/typeutils/SimpleTypeSerializerSnapshot.java#L92-L128","documentation":"Thrown by SimpleTypeSerializerSnapshot.readSnapshot in its default switch branch. The snapshot format only recognizes readVersion 2 (legacy, with a class-name field that is read and discarded) and readVersion 3 (current, no payload). Any other version indicates the snapshot was written by an incompatible format revision or the data is corrupt.","triggerScenarios":"Restoring a checkpoint that contains a SimpleTypeSerializerSnapshot written with a version other than 2 or 3. Version 1 is reserved for the legacy ParameterlessTypeSerializerConfig and is not handled here. A version above 3 would come from a future or forked Flink. Corrupt data can also produce an arbitrary version integer.","commonSituations":"Restoring a very old savepoint (pre-1.7.x, version 1) on a modern Flink. Restoring a checkpoint from a newer/custom Flink fork that bumped CURRENT_VERSION. Corrupted snapshot bytes where the version field holds garbage.","solutions":["Restore the checkpoint with the Flink version that created it, then take a fresh savepoint and migrate.","Check the Flink release notes for state backward-compatibility guarantees between your source and target versions.","If the data is corrupt rather than version-incompatible, re-create the checkpoint from a known-good state."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Verify the Flink version supports the snapshot version in your checkpoints\n// SimpleTypeSerializerSnapshot supports readVersion 2 and 3 only (version 1 is pre-1.7.x)\n","typeGuard":null,"tryCatchPattern":"try {\n    backend.restore(checkpointPath);\n} catch (IOException e) {\n    if (e.getMessage().contains(\"Unrecognized version\")) {\n        log.error(\"Snapshot version not supported by this Flink version.\");\n    }\n    throw e;\n}","preventionTips":["Restore old savepoints (pre-1.7.x) with the Flink version that created them first.","Do not run custom Flink forks that bump CURRENT_VERSION without handling old reads.","If the version integer is garbage, treat the file as corrupt and re-checkpoint."],"tags":["serialization","checkpoint","savepoint","version-mismatch","state","io"],"backgroundTag":null,"analyzedSha":"2f3c205e9266cb30240eb7f4fdab15cad629a70f","analyzedAt":"2026-08-14T08:48:24.518Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}