{"record":{"id":"a607b37107fe7415","repo":"apache/flink","slug":"unrecognized-version-or-corrupt-state-a607b3","errorCode":null,"errorMessage":"Unrecognized version or corrupt state: {}","messagePattern":"Unrecognized version or corrupt state: (.+?)","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"flink-filesystems/flink-s3-fs-base/src/main/java/org/apache/flink/fs/s3/common/writer/S3RecoverableSerializer.java","lineNumber":122,"sourceCode":"        if (lastPartBytes == null) {\n            bb.putInt(0);\n        } else {\n            bb.putInt(lastPartBytes.length);\n            bb.put(lastPartBytes);\n        }\n\n        bb.putLong(obj.incompleteObjectLength());\n\n        return targetBytes;\n    }\n\n    @Override\n    public S3Recoverable 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    }\n\n    private static S3Recoverable deserializeV1(byte[] serialized) throws IOException {\n        final ByteBuffer bb = ByteBuffer.wrap(serialized).order(ByteOrder.LITTLE_ENDIAN);\n\n        if (bb.getInt() != MAGIC_NUMBER) {\n            throw new IOException(\"Corrupt data: Unexpected magic number.\");\n        }\n\n        final byte[] keyBytes = new byte[bb.getInt()];\n        bb.get(keyBytes);\n\n        final byte[] uploadIdBytes = new byte[bb.getInt()];\n        bb.get(uploadIdBytes);\n\n        final int numParts = bb.getInt();\n        final ArrayList<PartETag> parts = new ArrayList<>(numParts);","sourceCodeStart":104,"sourceCodeEnd":140,"githubUrl":"https://github.com/apache/flink/blob/2f3c205e9266cb30240eb7f4fdab15cad629a70f/flink-filesystems/flink-s3-fs-base/src/main/java/org/apache/flink/fs/s3/common/writer/S3RecoverableSerializer.java#L104-L140","documentation":"Error \"Unrecognized version or corrupt state: {}\" thrown in apache/flink.","triggerScenarios":"Triggered at runtime when the operation fails because: Unrecognized version or corrupt state: the reported value.","commonSituations":"Commonly caused by misconfiguration, missing dependencies or files, unsupported types or operations, or invalid user input leading to: Unrecognized version or corrupt state: the reported value.","solutions":["Address the cause reported by the error message: Unrecognized version or corrupt state: the reported value","Verify the inputs, configuration values, and classpath/dependency setup related to this operation, then retry."],"exampleFix":"Correct the condition described (\"Unrecognized version or corrupt state: the reported value\") and rerun the job or command.","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2f3c205e9266cb30240eb7f4fdab15cad629a70f","analyzedAt":"2026-08-14T08:48:24.518Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}