[
https://issues.apache.org/jira/browse/ARTEMIS-3021?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Francesco Nigro updated ARTEMIS-3021:
-------------------------------------
Comment: was deleted
(was: After an additional investigation, it seems that the wrong core
estimation only happen if the message is being modified by adding routing
information to it (with RemoteQueueBinding::addRouteContextToMessage) ie is
clustered.
The process that cause the wrong estimation is:
# add route information to the message
# get memory estimation for paging without accounting the new route information
# getting persistent size for durable append on journal
# re-encoding due to modified routing info with high chance to get a much
larger buffer)
> OOM due to wrong CORE clustered message memory estimation
> ---------------------------------------------------------
>
> Key: ARTEMIS-3021
> URL: https://issues.apache.org/jira/browse/ARTEMIS-3021
> Project: ActiveMQ Artemis
> Issue Type: Bug
> Reporter: Francesco Nigro
> Assignee: Francesco Nigro
> Priority: Major
> Time Spent: 1h 40m
> Remaining Estimate: 0h
>
>
>
> This is affecting clustered Core messages.
> The process that cause the wrong estimation is:
> # add route information to the message
> # get memory estimation for paging without accounting the new route
> information
> # getting persist size for durable append on journal or to update queue
> statistics trigger a re-encoding
> # re-encoding can enlarge the message buffer to be the next power of 2
> available capacity
> The 2 fixes are:
> * getting a correct memory estimation of the message
> * save the buffer on encoding to grow using the default Netty
> ByteBuf::ensureCapacity grow strategy
--
This message was sent by Atlassian Jira
(v8.3.4#803005)