You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@activemq.apache.org by GitBox <gi...@apache.org> on 2021/02/18 22:22:05 UTC

[GitHub] [activemq-artemis] michaelandrepearce commented on a change in pull request #3370: ARTEMIS-3021 OOM due to wrong CORE message memory estimation

michaelandrepearce commented on a change in pull request #3370:
URL: https://github.com/apache/activemq-artemis/pull/3370#discussion_r578785892



##########
File path: artemis-core-client/src/main/java/org/apache/activemq/artemis/core/message/impl/CoreMessage.java
##########
@@ -426,7 +426,6 @@ protected CoreMessage(CoreMessage other, TypedProperties copyProperties) {
       // with getEncodedBuffer(), otherwise can introduce race condition when delivering concurrently to
       // many subscriptions and bridging to other nodes in a cluster
       synchronized (other) {
-         this.body = other.body;

Review comment:
       I might be a plank, but surely this avoids using up memory as the body object is copied by reference here, rather than later needing to deserialise again and creating a new object in memory.




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