jiajunwang commented on a change in pull request #1072:
URL: https://github.com/apache/helix/pull/1072#discussion_r439680283



##########
File path: 
zookeeper-api/src/main/java/org/apache/helix/zookeeper/zkclient/ZkClient.java
##########
@@ -2216,4 +2236,24 @@ private void validateCurrentThread() {
       throw new IllegalArgumentException("Must not be done in the zookeeper 
event thread.");
     }
   }
+
+  private void validateWriteSizeLimitConfig() {
+    int serializerSize = ZNRecordUtil.getSerializerWriteSizeLimit();
+    int zkClientSize = getWriteSizeLimit();
+    // ZNRecord serializer write size limit should not be set greater than 
size limit in ZkClient
+    if (serializerSize > zkClientSize) {
+      throw new IllegalStateException("ZNRecord serializer write size limit: " 
+ serializerSize

Review comment:
       With compression on, the serializer may always return a much smaller 
package than the input size.
   So do we have to fail it here?
   
   It is debatable.




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



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

Reply via email to