franz1981 commented on a change in pull request #2694: ARTEMIS-2371 Message 
with huge header shuts broker down
URL: https://github.com/apache/activemq-artemis/pull/2694#discussion_r291907824
 
 

 ##########
 File path: 
artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/JournalStorageManager.java
 ##########
 @@ -548,6 +549,17 @@ public LargeServerMessage createLargeMessage(final long 
id, final Message messag
 
          largeMessage.setMessageID(id);
 
+
+         // Check durable large massage size before to allocate resources if 
it can't be stored
+         if (largeMessage.isDurable()) {
+            final long maxRecordSize = getMaxRecordSize();
+            final int messageEncodeSize = largeMessage.getEncodeSize();
 
 Review comment:
   I see that you've put the checks before `validateFile` too, well done! :+1: 
   

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

Reply via email to