You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2019/05/09 17:27:36 UTC

[GitHub] [pulsar] merlimat commented on a change in pull request #4247: [WIP] PIP-36: Support set message size in broker.conf

merlimat commented on a change in pull request #4247: [WIP] PIP-36: Support set message size in broker.conf
URL: https://github.com/apache/pulsar/pull/4247#discussion_r282576689
 
 

 ##########
 File path: pulsar-broker/src/main/java/org/apache/pulsar/PulsarBrokerStarter.java
 ##########
 @@ -139,6 +140,15 @@ private static boolean argsContains(String[] args, String arg) {
                 brokerConfig = loadConfig(starterArguments.brokerConfigFile);
             }
 
+            int maxFrameSize = brokerConfig.getMaxMessageSize() + (10 * 1024);
+            if (maxFrameSize < 0) {
+                throw new IllegalArgumentException("Max message size need smaller than 5233640 bytes");
+            }
+            if (maxFrameSize > DirectMemoryUtils.maxDirectMemory()) {
 
 Review comment:
   This check is not going to be very useful. Even if we have 1 single message of a size comparable to maxDirectMem, we'd be already in trouble 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services