narendly commented on a change in pull request #809: Add system property 
options to config auto compression
URL: https://github.com/apache/helix/pull/809#discussion_r384682822
 
 

 ##########
 File path: 
zookeeper-api/src/main/java/org/apache/helix/zookeeper/datamodel/serializer/ZNRecordSerializer.java
 ##########
 @@ -86,7 +98,8 @@ private static int getListFieldBound(ZNRecord record) {
       mapper.writeValue(baos, data);
       serializedBytes = baos.toByteArray();
       // apply compression if needed
-      if (record.getBooleanField("enableCompression", false) || 
serializedBytes.length > ZNRecord.SIZE_LIMIT) {
+      if (record.getBooleanField("enableCompression", false) || 
(autoCompressionEnabled
+          && serializedBytes.length > autoCompressionThreshold)) {
 
 Review comment:
   ZnRecordStreamingSerializer also has this logic. It would be great if you 
could refactor this piece of logic out so that we support this in all of our 
ZNRecord serializers :)

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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to