brusdev 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_r291807859
##########
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 your point and I understand how to check the header and properties
encoded size without costs from your example. In that point large message
contains only header and properties of the source message and in addition it is
precisely the record that is added to the journal. I think the last point is
important because it let the check to work even if in the future other elements
will be added to the large message.
----------------------------------------------------------------
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