geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dschnei...@apache.org
Subject incubator-geode git commit: fix the off-heap leak in netWrite
Date Thu, 07 Apr 2016 23:20:56 GMT
Repository: incubator-geode
Updated Branches:
  refs/heads/feature/GEODE-1199 [created] b5836abba


fix the off-heap leak in netWrite


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/b5836abb
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/b5836abb
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/b5836abb

Branch: refs/heads/feature/GEODE-1199
Commit: b5836abbac7aa0775e921f4412363119c89173b9
Parents: a11f608
Author: Darrel Schneider <dschneider@pivotal.io>
Authored: Thu Apr 7 16:20:18 2016 -0700
Committer: Darrel Schneider <dschneider@pivotal.io>
Committed: Thu Apr 7 16:20:18 2016 -0700

----------------------------------------------------------------------
 .../internal/cache/SearchLoadAndWriteProcessor.java      | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b5836abb/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/SearchLoadAndWriteProcessor.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/SearchLoadAndWriteProcessor.java
b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/SearchLoadAndWriteProcessor.java
index 8224fc2..f197dc6 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/SearchLoadAndWriteProcessor.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/SearchLoadAndWriteProcessor.java
@@ -221,13 +221,20 @@ public class SearchLoadAndWriteProcessor implements MembershipListener
{
       return false;
     }
     CacheEvent listenerEvent = getEventForListener(event);
+    try {
     if (action == BEFOREUPDATE && listenerEvent.getOperation().isCreate()) {
       action = BEFORECREATE;
     }
-    boolean cacheWrote = netWrite(getEventForListener(event), action, netWriteRecipients);
+    boolean cacheWrote = netWrite(listenerEvent, action, netWriteRecipients);
     this.requestInProgress = false;
     return cacheWrote;
-
+    } finally {
+      if (event != listenerEvent) {
+        if (listenerEvent instanceof EntryEventImpl) {
+          ((EntryEventImpl) listenerEvent).release();
+        }
+      }
+    }
   }
 
   public void memberJoined(InternalDistributedMember id) {


Mime
View raw message