jiajunwang 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_r384746201
##########
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:
This logic could go to the ZNRecord class. isAutoCompression()
----------------------------------------------------------------
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]