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: GEODE-1401: handle NOT_AVAILABLE in callers of getRawOldValue
Date Tue, 17 May 2016 16:58:32 GMT
Repository: incubator-geode
Updated Branches:
  refs/heads/develop 11da98d4a -> ab417e32d


GEODE-1401: handle NOT_AVAILABLE in callers of getRawOldValue


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

Branch: refs/heads/develop
Commit: ab417e32deccb4e398d21e182bb738af9ef65e24
Parents: 11da98d
Author: Darrel Schneider <dschneider@pivotal.io>
Authored: Mon May 16 16:57:56 2016 -0700
Committer: Darrel Schneider <dschneider@pivotal.io>
Committed: Tue May 17 09:58:09 2016 -0700

----------------------------------------------------------------------
 .../gemfire/internal/cache/BucketRegionQueue.java         | 10 ++--------
 .../gemstone/gemfire/internal/cache/EntryEventImpl.java   |  2 +-
 .../gemfire/internal/cache/RemoteDestroyMessage.java      |  2 +-
 3 files changed, 4 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ab417e32/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/BucketRegionQueue.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/BucketRegionQueue.java
b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/BucketRegionQueue.java
index 0243cde..a3d9d97 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/BucketRegionQueue.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/BucketRegionQueue.java
@@ -269,10 +269,7 @@ public class BucketRegionQueue extends AbstractBucketRegionQueue {
         requireOldValue, lastModified, overwriteDestroyed);
 
     if (success) {
-      Object ov = event.getRawOldValue();
-      if (ov instanceof GatewaySenderEventImpl) {
-        ((GatewaySenderEventImpl) ov).release();
-      }
+      GatewaySenderEventImpl.release(event.getRawOldValue());
 
       if (getPartitionedRegion().getColocatedWith() == null) {
         return success;
@@ -370,10 +367,7 @@ public class BucketRegionQueue extends AbstractBucketRegionQueue {
     }
     super.basicDestroy(event, cacheWrite, expectedOldValue);
 
-    Object rov = event.getRawOldValue();
-    if (rov instanceof GatewaySenderEventImpl) {
-      ((GatewaySenderEventImpl) rov).release();
-    }
+    GatewaySenderEventImpl.release(event.getRawOldValue());
     // Primary buckets should already remove the key while peeking
     if (!this.getBucketAdvisor().isPrimary()) {
       if (logger.isDebugEnabled()) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ab417e32/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/EntryEventImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/EntryEventImpl.java
b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/EntryEventImpl.java
index e241622..b833ecb 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/EntryEventImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/EntryEventImpl.java
@@ -1407,7 +1407,7 @@ public class EntryEventImpl
         importer.importOldObject(cdV, true);
       }
     } else {
-      importer.importOldObject(ov, true);
+      importer.importOldObject(AbstractRegion.handleNotAvailable(ov), true);
     }
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ab417e32/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/RemoteDestroyMessage.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/RemoteDestroyMessage.java
b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/RemoteDestroyMessage.java
index bb97d9c..f7109bb 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/RemoteDestroyMessage.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/RemoteDestroyMessage.java
@@ -232,7 +232,7 @@ public class RemoteDestroyMessage extends RemoteOperationMessageWithDirectReply
           setOldValBytes((byte[]) old);
         } else {
           this.oldValueIsSerialized = true;
-          setOldValObj(old);
+          setOldValObj(AbstractRegion.handleNotAvailable(old));
         }
       }
     }


Mime
View raw message