vvysotskyi commented on a change in pull request #2460:
URL: https://github.com/apache/drill/pull/2460#discussion_r808223918



##########
File path: 
exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/compression/DrillCompressionCodecFactory.java
##########
@@ -86,6 +99,9 @@ public BytesInputCompressor 
getCompressor(CompressionCodecName codecName) {
           codecName,
           c -> new AirliftBytesInputCompressor(codecName, allocator)
       );
+    } else if (codecName == CompressionCodecName.GZIP) {
+      // hack for gzip: construct a new codec factory every time to avoid a 
concurrrency bug c.f. DRILL-8139
+      return CodecFactory.createDirectCodecFactory(config, allocator, 
pageSize).getCompressor(codecName);

Review comment:
       If I recall correctly, the codec factory should manage the full 
lifecycle of compressors / decompressors, release created codecs when calling 
its `CompressionCodecFactory.release()` method, and so on. But with this 
change, it will be impossible to do that.




-- 
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.

To unsubscribe, e-mail: [email protected]

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


Reply via email to