geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dschnei...@apache.org
Subject [2/2] incubator-geode git commit: simplified cleanUpOnImcompleteOp
Date Thu, 02 Jun 2016 22:08:49 GMT
simplified cleanUpOnImcompleteOp


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

Branch: refs/heads/feature/GEODE-1464
Commit: 75e44c105f56f9d0d3d66dc356d5a80cc1d5c2c7
Parents: ef82a39
Author: Darrel Schneider <dschneider@pivotal.io>
Authored: Thu Jun 2 14:38:57 2016 -0700
Committer: Darrel Schneider <dschneider@pivotal.io>
Committed: Thu Jun 2 14:38:57 2016 -0700

----------------------------------------------------------------------
 .../internal/cache/AbstractRegionMap.java       |  3 +--
 .../gemfire/internal/cache/BucketRegion.java    | 22 --------------------
 .../gemfire/internal/cache/LocalRegion.java     | 16 +++-----------
 3 files changed, 4 insertions(+), 37 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/75e44c10/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegionMap.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegionMap.java
b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegionMap.java
index 6db941b..671b10b 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegionMap.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegionMap.java
@@ -2765,8 +2765,7 @@ public abstract class AbstractRegionMap implements RegionMap {
                 } finally {
                   OffHeapHelper.release(oldValueForDelta);
                   if (re != null && !onlyExisting && !isOpComplete(re, event))
{
-                    owner.cleanUpOnIncompleteOp(event, re, eventRecorded,
-                        false/* updateStats */, replaceOnClient);
+                    owner.cleanUpOnIncompleteOp(event, re);
                   }
                   else if (re != null && owner.isUsedForPartitionedRegionBucket())
{
                   BucketRegion br = (BucketRegion)owner;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/75e44c10/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/BucketRegion.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/BucketRegion.java
b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/BucketRegion.java
index 94bedc4..16f6596 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/BucketRegion.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/BucketRegion.java
@@ -2014,28 +2014,6 @@ implements Bucket
   public CacheWriter basicGetWriter() {
     return this.partitionedRegion.basicGetWriter();
   }
-   @Override
-  void cleanUpOnIncompleteOp(EntryEventImpl event,   RegionEntry re, 
-      boolean eventRecorded, boolean updateStats, boolean isReplace) {
-     
-    
-    if(!eventRecorded || isReplace) {
-      //No indexes updated so safe to remove.
-      this.entries.removeEntry(event.getKey(), re, updateStats) ;      
-    }/*else {
-      //if event recorded is true, that means as per event tracker entry is in
-      //system. What is not done
-      // is basicPutPart2( distribution etc). So we do nothing as PR's re-attempt
-      // will do the required basicPutPart2. If we remove the entry here, than 
-      //event tracker will not allow re insertion. So either we do nothing or
-      //if we remove ,than we have to undo recording
-      // of event.
-       //TODO:OQL indexes? : Hope they get updated during retry. The issue is that oql indexes
-       // get updated after distribute , so it is entirely possible that oql index are 
-        // not updated. what if retry fails?
-       
-    }*/
-  }
 
   /* (non-Javadoc)
    * @see com.gemstone.gemfire.internal.cache.partitioned.Bucket#getBucketOwners()

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/75e44c10/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/LocalRegion.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/LocalRegion.java
b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/LocalRegion.java
index d7a1199..93c77d4 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/LocalRegion.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/LocalRegion.java
@@ -7868,19 +7868,9 @@ public class LocalRegion extends AbstractRegion
       }
     }
   }
-  void cleanUpOnIncompleteOp(EntryEventImpl event,   RegionEntry re, 
-      boolean eventRecorded, boolean updateStats, boolean isReplace) {
-    if(!eventRecorded || isReplace) {
-      //Ok to remove entry as index has not been modified yet by the operation
-      this.entries.removeEntry(event.getKey(), re, updateStats) ;      
-    }else {
-      //Use the current event to indicate destroy.should be ok
-      Operation oldOp = event.getOperation();
-      event.setOperation(Operation.DESTROY);
-      this.entries.removeEntry(event.getKey(), re, updateStats, event, this);
-      event.setOperation(oldOp);
-    } 
-    
+  void cleanUpOnIncompleteOp(EntryEventImpl event, RegionEntry re) {
+    //Ok to remove entry as index has not been modified yet by the operation
+    this.entries.removeEntry(event.getKey(), re, false) ;      
   }
 
   static void validateRegionName(String name)


Mime
View raw message