pulsar-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mme...@apache.org
Subject [incubator-pulsar] branch master updated: Fixed mem leak when receiving unrecoverable fencing errors in managed ledger (#2138)
Date Thu, 12 Jul 2018 17:35:48 GMT
This is an automated email from the ASF dual-hosted git repository.

mmerli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-pulsar.git


The following commit(s) were added to refs/heads/master by this push:
     new 4843154  Fixed mem leak when receiving unrecoverable fencing errors in managed ledger
(#2138)
4843154 is described below

commit 48431543729fc4f382637c968976d0d164d5427b
Author: Matteo Merli <mmerli@apache.org>
AuthorDate: Thu Jul 12 10:35:45 2018 -0700

    Fixed mem leak when receiving unrecoverable fencing errors in managed ledger (#2138)
---
 .../main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerImpl.java  | 1 -
 .../src/main/java/org/apache/bookkeeper/mledger/impl/OpAddEntry.java     | 1 +
 2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerImpl.java
b/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerImpl.java
index 4978044..fc25ef3 100644
--- a/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerImpl.java
+++ b/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerImpl.java
@@ -1327,7 +1327,6 @@ public class ManagedLedgerImpl implements ManagedLedger, CreateCallback
{
     void clearPendingAddEntries(ManagedLedgerException e) {
         while (!pendingAddEntries.isEmpty()) {
             OpAddEntry op = pendingAddEntries.poll();
-            op.data.release();
             op.failed(e);
         }
     }
diff --git a/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/OpAddEntry.java
b/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/OpAddEntry.java
index f4daec5..5d9d57c 100644
--- a/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/OpAddEntry.java
+++ b/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/OpAddEntry.java
@@ -96,6 +96,7 @@ class OpAddEntry extends SafeRunnable implements AddCallback, CloseCallback
{
 
     public void failed(ManagedLedgerException e) {
         AddEntryCallback cb = callbackUpdater.getAndSet(this, null);
+        data.release();
         if (cb != null) {
             cb.addFailed(e, ctx);
             ml.mbean.recordAddEntryError();


Mime
View raw message