fanhualta opened a new issue #2313:
URL: https://github.com/apache/iotdb/issues/2313


   **Describe the bug**
   In my TPC test, it has occurred `ArrayIndexOutOfBoundsException` in this 
[line](https://github.com/apache/iotdb/blob/5fb992fcfe8d1416f9788ae22e7a0cba81b618f2/service-rpc/src/main/java/org/apache/iotdb/rpc/TCompressedElasticFramedTransport.java#L92)
 due to `compressedLength > writeCompressBuffer.length`. After investigation, I 
found that snappy returned an abnormal length when compressing.
   
   **To Reproduce**
   A simple way to reproduce the behavior:
   ```
   int len = 64 * 1024 * 1024;
   int expetedLen = 3147700;
   byte[] origin = new byte[len];
   byte[] target = new byte[expetedLen];
   System.out.println(new TSnappyElasticFramedTransport(null, 0, 
0).compress(origin, 0, len, target, 0));
   ```
   
   **Expected behavior**
   The return length is smaller than `expetedLen`.
   
   **Screenshots**
   The return length is larger than `expetedLen`. I got `3147780`.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to