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/01/05 17:20:02 UTC

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

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



##########
File path: artemis-core-client/src/main/java/org/apache/activemq/artemis/core/message/impl/CoreMessage.java
##########
@@ -622,6 +619,12 @@ private RuntimeException onCheckPropertiesError(Throwable e) {
    @Override
    public int getMemoryEstimate() {
       if (memoryEstimate == -1) {
+         // durable messages can enlarge buffer::capacity while persisted:
+         // better to encode it to properly account its max capacity
+         if (isDurable()) {
+            checkEncode();

Review comment:
       That means that a durable message would get encoded some time before then expected: @clebertsuconic it's something we can tolerate? 
   if not the ideal thing would be to estimate it based on its state, but I'm not sure is feasable.




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