{"record":{"id":"a895fa2ab2dfc9cb","repo":"prestodb/presto","slug":"unknown-block-encoding-s","errorCode":null,"errorMessage":"Unknown block encoding %s","messagePattern":"Unknown block encoding (.+?)","errorType":"error_code","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"presto-common/src/main/java/com/facebook/presto/common/block/BlockEncodingManager.java","lineNumber":71,"sourceCode":"    public void addBlockEncoding(BlockEncoding blockEncoding)\n    {\n        requireNonNull(blockEncoding, \"blockEncoding is null\");\n        BlockEncoding existingEntry = blockEncodings.putIfAbsent(blockEncoding.getName(), blockEncoding);\n        if (existingEntry != null) {\n            throw new IllegalArgumentException(format(\"Encoding %s is already registered\", blockEncoding.getName()));\n        }\n    }\n\n    @Override\n    public Block readBlock(SliceInput input)\n    {\n        // read the encoding name\n        String encodingName = readLengthPrefixedString(input);\n\n        // look up the encoding factory\n        BlockEncoding blockEncoding = blockEncodings.get(encodingName);\n        if (blockEncoding == null) {\n            throw new IllegalArgumentException(format(\"Unknown block encoding %s\", encodingName));\n        }\n\n        // load read the encoding factory from the output stream\n        return blockEncoding.readBlock(this, input);\n    }\n\n    @Override\n    public void writeBlock(SliceOutput output, Block block)\n    {\n        while (true) {\n            // get the encoding name\n            String encodingName = block.getEncodingName();\n\n            // look up the BlockEncoding\n            BlockEncoding blockEncoding = blockEncodings.get(encodingName);\n\n            // see if a replacement block should be written instead\n            Optional<Block> replacementBlock = blockEncoding.replacementBlockForWrite(block);","sourceCodeStart":53,"sourceCodeEnd":89,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-common/src/main/java/com/facebook/presto/common/block/BlockEncodingManager.java#L53-L89","documentation":"Deserialization lookup failure: the encoding name read from the wire is not present in the block-encoding registry, so the incoming block cannot be decoded (typically a version or registration mismatch between peers).","triggerScenarios":"Thrown at presto-common/src/main/java/com/facebook/presto/common/block/BlockEncodingManager.java:71 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure sender and receiver register the same block encodings","Align client/server/worker versions so encoding names match","Register the custom encoding before reading blocks that use it"],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"55bb57d202de3b926896fa966c2c4a44c779634e","analyzedAt":"2026-09-04T12:50:26.162Z","contentChangedAt":"2026-09-04T12:50:26.162Z","schemaVersion":2},"datasetVersion":"2026-09-11T21:17:09.523Z"}