[
https://issues.apache.org/jira/browse/ARTEMIS-3067?focusedWorklogId=537503&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-537503
]
ASF GitHub Bot logged work on ARTEMIS-3067:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 18/Jan/21 19:08
Start Date: 18/Jan/21 19:08
Worklog Time Spent: 10m
Work Description: gtully commented on a change in pull request #3407:
URL: https://github.com/apache/activemq-artemis/pull/3407#discussion_r559754464
##########
File path:
artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/AMQPStandardMessage.java
##########
@@ -124,12 +124,24 @@ protected ReadableBuffer getData() {
@Override
public int getMemoryEstimate() {
if (memoryEstimate == -1) {
- memoryEstimate = memoryOffset + (data != null ? data.capacity() : 0);
+ memoryEstimate = memoryOffset + (data != null ? data.capacity() +
unmarshalledApplicationPropertiesMemoryEstimateFromData() : 0);
}
return memoryEstimate;
}
+ private int unmarshalledApplicationPropertiesMemoryEstimateFromData() {
+ if (applicationProperties != null) {
+ // they have been unmarshalled, estimate memory usage based on their
encoded size
+ if (remainingBodyPosition != VALUE_NOT_PRESENT) {
+ return remainingBodyPosition - applicationPropertiesPosition;
Review comment:
the intent is to compensate for any change in the estimate, in the
knowledge that it may happen for filter evaluation or for transformation. But I
must not have all the possibilities covered, and it may be tricky. There is
deliver and directDeliver etc.
The consumerTest is now sorted, but I need to investigate next
org.apache.activemq.artemis.tests.integration.amqp.connect.AMQPReplicaTest#testReplicaCatchupOnQueueCreates
----------------------------------------------------------------
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]
Issue Time Tracking
-------------------
Worklog Id: (was: 537503)
Time Spent: 50m (was: 40m)
> AMQP applicationProperties are not part of the memoryEstimate
> -------------------------------------------------------------
>
> Key: ARTEMIS-3067
> URL: https://issues.apache.org/jira/browse/ARTEMIS-3067
> Project: ActiveMQ Artemis
> Issue Type: Bug
> Components: AMQP
> Affects Versions: 2.16.0
> Reporter: Gary Tully
> Assignee: Gary Tully
> Priority: Major
> Fix For: 2.17.0
>
> Time Spent: 50m
> Remaining Estimate: 0h
>
> With significant data in application properties, the decoded properties can
> consume memory that is not tracked for paging purposes and can lead to
> unexpected OOM.
> Duplicate detection is one cause of decoding. Use of selectors is another.
> Otherwise they are left intact by the broker and just routed in their raw
> format.
> When they are decoded, for whatever reason, we need to account for them is
> some way such that paging can kick in as expected.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)