You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by cl...@apache.org on 2018/04/17 15:00:50 UTC

[1/2] activemq-artemis git commit: This closes #2016

Repository: activemq-artemis
Updated Branches:
  refs/heads/master 90b9a9809 -> e94e5b003


This closes #2016


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/e94e5b00
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/e94e5b00
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/e94e5b00

Branch: refs/heads/master
Commit: e94e5b003cb292136a10055241011e22af074e7c
Parents: 90b9a98 e310bb6
Author: Clebert Suconic <cl...@apache.org>
Authored: Tue Apr 17 11:00:45 2018 -0400
Committer: Clebert Suconic <cl...@apache.org>
Committed: Tue Apr 17 11:00:45 2018 -0400

----------------------------------------------------------------------
 .../core/persistence/impl/journal/LargeServerMessageImpl.java      | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------



[2/2] activemq-artemis git commit: ARTEMIS-1808 LargeServerMessageImpl leaks direct ByteBuffer

Posted by cl...@apache.org.
ARTEMIS-1808 LargeServerMessageImpl leaks direct ByteBuffer

largeMessagesFactory::newBuffer could create a pooled direct ByteBuffer
that will not be released into the factory pool: using a heap ByteBuffer
will perform more internal copies, but will make it simpler to be garbage
collected.


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/e310bb68
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/e310bb68
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/e310bb68

Branch: refs/heads/master
Commit: e310bb68b10546df8fe88500581d4761a4e14dae
Parents: 90b9a98
Author: Francesco Nigro <ni...@gmail.com>
Authored: Sun Apr 15 17:31:05 2018 +0200
Committer: Clebert Suconic <cl...@apache.org>
Committed: Tue Apr 17 11:00:45 2018 -0400

----------------------------------------------------------------------
 .../core/persistence/impl/journal/LargeServerMessageImpl.java      | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/e310bb68/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/LargeServerMessageImpl.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/LargeServerMessageImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/LargeServerMessageImpl.java
index 940f8b0..d940946 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/LargeServerMessageImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/LargeServerMessageImpl.java
@@ -210,7 +210,7 @@ public final class LargeServerMessageImpl extends CoreMessage implements LargeSe
          validateFile();
          file.open();
          int fileSize = (int) file.size();
-         ByteBuffer buffer = this.storageManager.largeMessagesFactory.newBuffer(fileSize);
+         ByteBuffer buffer = ByteBuffer.allocate(fileSize);
          file.read(buffer);
          return new ChannelBufferWrapper(Unpooled.wrappedBuffer(buffer));
       } catch (Exception e) {