{"record":{"id":"0292bdc3947019b1","repo":"apache/flink","slug":"unrecognized-version-or-corrupt-state-version-0292bd","errorCode":null,"errorMessage":"Unrecognized version or corrupt state: {version}","messagePattern":"Unrecognized version or corrupt state: (.+?)","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"flink-connectors/flink-file-sink-common/src/main/java/org/apache/flink/streaming/api/functions/sink/filesystem/bucketassigners/SimpleVersionedStringSerializer.java","lineNumber":61,"sourceCode":"    @Override\n    public String deserialize(int version, byte[] serialized) throws IOException {\n        switch (version) {\n            case 1:\n                return deserializeV1(serialized);\n            default:\n                throw new IOException(\"Unrecognized version or corrupt state: \" + version);\n        }\n    }","sourceCodeStart":null,"sourceCodeEnd":null,"githubUrl":"https://github.com/apache/flink/blob/2f3c205e9266cb30240eb7f4fdab15cad629a70f/flink-file-sink-common/src/main/java/org/apache/flink/streaming/api/functions/sink/filesystem/bucketassigners/SimpleVersionedStringSerializer.java#L61","documentation":"Thrown by SimpleVersionedStringSerializer.deserialize when the version number is not 1. This serializer is used by bucket assigners (e.g. FlinkPartitionBucketAssigner) to serialize/deserialize bucket IDs; version 1 is the only supported format. Any other version indicates corruption or a version incompatibility.","triggerScenarios":"Restoring a checkpoint where the bucket ID string state was serialized with a version other than 1 by a different or newer serializer.","commonSituations":"Restoring a File Sink savepoint that was produced by a different bucket assigner or a modified SimpleVersionedStringSerializer; checkpoint corruption affecting the version byte.","solutions":["Ensure the bucket assigner and its serializer are the same between the job that wrote the checkpoint and the job restoring it.","If the checkpoint is corrupt, restart from a previous known-good checkpoint.","Do not replace SimpleVersionedStringSerializer with a custom version-aware serializer without a migration path."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n    SimpleVersionedStringSerializer.INSTANCE.deserialize(version, bytes);\n} catch (IOException e) {\n    if (e.getMessage().startsWith(\"Unrecognized version or corrupt state\")) {\n        LOG.error(\"Bucket ID serializer received unexpected version {}\", version);\n    }\n    throw e;\n}","preventionTips":["Keep the same bucket assigner and serializer between checkpoint write and restore.","Do not replace SimpleVersionedStringSerializer with a custom versioned serializer without a migration plan.","Verify checkpoint integrity if corruption is suspected."],"tags":["file-sink","serialization","bucket-assigner","checkpoint"],"backgroundTag":null,"analyzedSha":"2f3c205e9266cb30240eb7f4fdab15cad629a70f","analyzedAt":"2026-08-14T08:48:24.518Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}