diff --git a/logproxy-client/src/main/java/com/oceanbase/clogproxy/client/connection/ClientHandler.java b/logproxy-client/src/main/java/com/oceanbase/clogproxy/client/connection/ClientHandler.java index 2972d1d3e9f58ecb7c668897c0910e450ed6b873..be10307b76268f2297406cf700835e6d928b664e 100644 --- a/logproxy-client/src/main/java/com/oceanbase/clogproxy/client/connection/ClientHandler.java +++ b/logproxy-client/src/main/java/com/oceanbase/clogproxy/client/connection/ClientHandler.java @@ -275,9 +275,9 @@ public class ClientHandler extends ChannelInboundHandlerAdapter { int rawLen = recordData.getRawLen(); byte[] rawData = recordData.getRecords().toByteArray(); if (compressType == CompressType.LZ4.code()) { - byte[] bytes = new byte[compressedLen]; - int decompress = fastDecompressor.decompress(rawData, 0, bytes, 0, compressedLen); - if (decompress != rawLen) { + byte[] bytes = new byte[rawLen]; + int decompress = fastDecompressor.decompress(rawData, 0, bytes, 0, rawLen); + if (decompress != compressedLen) { throw new LogProxyClientException( ErrorCode.E_LEN, "decompressed length ["