geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kl...@apache.org
Subject [85/90] [abbrv] incubator-geode git commit: GEODE-1464: remove sqlf code
Date Wed, 08 Jun 2016 00:06:02 GMT
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/880f8648/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/CacheDistributionAdvisor.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/CacheDistributionAdvisor.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/CacheDistributionAdvisor.java
index c4a8e27..fff9bab 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/CacheDistributionAdvisor.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/CacheDistributionAdvisor.java
@@ -87,7 +87,7 @@ public class CacheDistributionAdvisor extends DistributionAdvisor  {
   protected static final int REQUIRES_NOTIFICATION_MASK = 0x8000;
   private static final int HAS_CACHE_SERVER_MASK = 0x10000;
   private static final int REQUIRES_OLD_VALUE_MASK = 0x20000;
-  private static final int MEMBER_UNINITIALIZED_MASK = 0x40000;
+  // unused 0x40000;
   private static final int PERSISTENCE_INITIALIZED_MASK = 0x80000;
   //Important below mentioned bit masks are not available 
   /**
@@ -229,8 +229,7 @@ public class CacheDistributionAdvisor extends DistributionAdvisor  {
         CacheProfile prof = (CacheProfile)profile;
 
         // if region in cache is not yet initialized, exclude
-        if (!prof.regionInitialized          // fix for bug 41102
-            || prof.memberUnInitialized) {
+        if (!prof.regionInitialized) { // fix for bug 41102
           return false;
         }
 
@@ -269,10 +268,6 @@ public class CacheDistributionAdvisor extends DistributionAdvisor  {
           if (!cp.regionInitialized) {
             return false;
           }
-          // if member is not yet initialized, exclude
-          if (cp.memberUnInitialized) {
-            return false;
-          }
           if (!cp.cachedOrAllEventsWithListener()) {
             return false;
           }
@@ -327,8 +322,7 @@ public class CacheDistributionAdvisor extends DistributionAdvisor  {
       public boolean include(Profile profile) {
         assert profile instanceof CacheProfile;
         CacheProfile cp = (CacheProfile)profile;
-        if (cp.dataPolicy.withReplication() && cp.regionInitialized
-            && !cp.memberUnInitialized) {
+        if (cp.dataPolicy.withReplication() && cp.regionInitialized) {
           return true;
         }
         return false;
@@ -350,10 +344,6 @@ public class CacheDistributionAdvisor extends DistributionAdvisor  {
         if (!cp.regionInitialized) {
           return false;
         }
-        // if member is not yet initialized, exclude
-        if (cp.memberUnInitialized) {
-          return false;
-        }
         DataPolicy dp = cp.dataPolicy;
         return dp.withStorage();
       }
@@ -544,14 +534,6 @@ public class CacheDistributionAdvisor extends DistributionAdvisor  {
      */
     public boolean regionInitialized;
 
-    /**
-     * True when member is still not ready to receive cache operations. Note
-     * that {@link #regionInitialized} may be still true so other members can
-     * proceed with GII etc. Currently used by SQLFabric to indicate that DDL
-     * replay is in progress and so cache operations/functions should not be
-     * routed to that node.
-     */
-    public boolean memberUnInitialized = false;
     
     /**
      * True when a members persistent store is initialized. Note that
@@ -615,7 +597,6 @@ public class CacheDistributionAdvisor extends DistributionAdvisor  {
       if (this.isGatewayEnabled) s |= IS_GATEWAY_ENABLED_MASK;
       if (this.isPersistent) s |= PERSISTENT_MASK;
       if (this.regionInitialized) s|= REGION_INITIALIZED_MASK;
-      if (this.memberUnInitialized) s |= MEMBER_UNINITIALIZED_MASK;
       if (this.persistentID != null) s|= PERSISTENT_ID_MASK;
       if (this.hasCacheServer) s|= HAS_CACHE_SERVER_MASK;
       if (this.requiresOldValueInEvents) s|= REQUIRES_OLD_VALUE_MASK;
@@ -693,7 +674,6 @@ public class CacheDistributionAdvisor extends DistributionAdvisor  {
       this.isGatewayEnabled = (s & IS_GATEWAY_ENABLED_MASK) != 0;
       this.isPersistent = (s & PERSISTENT_MASK) != 0;
       this.regionInitialized = ( (s & REGION_INITIALIZED_MASK) != 0 );
-      this.memberUnInitialized = (s & MEMBER_UNINITIALIZED_MASK) != 0;
       this.hasCacheServer = ( (s & HAS_CACHE_SERVER_MASK) != 0 );
       this.requiresOldValueInEvents = ((s & REQUIRES_OLD_VALUE_MASK) != 0);
       this.persistenceInitialized = (s & PERSISTENCE_INITIALIZED_MASK) != 0;
@@ -890,8 +870,6 @@ public class CacheDistributionAdvisor extends DistributionAdvisor  {
       sb.append("; scope=" + this.scope);
       sb.append("; regionInitialized=").append(
           String.valueOf(this.regionInitialized));
-      sb.append("; memberUnInitialized=").append(
-          String.valueOf(this.memberUnInitialized));
       sb.append("; inRecovery=" + this.inRecovery);
       sb.append("; subcription=" + this.subscriptionAttributes);
       sb.append("; isPartitioned=" + this.isPartitioned);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/880f8648/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/CacheServerLauncher.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/CacheServerLauncher.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/CacheServerLauncher.java
index bb595d1..e982e32 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/CacheServerLauncher.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/CacheServerLauncher.java
@@ -362,7 +362,7 @@ public class CacheServerLauncher  {
     }
 
     // -J-Djava.awt.headless=true has been added for Mac platform where it
-    // causes an icon to appear for sqlf launched procs
+    // causes an icon to appear for launched procs
     // TODO: check which library/GemFire code causes awt to be touched
     vmArgs.add("-Djava.awt.headless=true");
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/880f8648/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/CachedDeserializableFactory.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/CachedDeserializableFactory.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/CachedDeserializableFactory.java
index 83b0a58..ae60056 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/CachedDeserializableFactory.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/CachedDeserializableFactory.java
@@ -39,13 +39,6 @@ public class CachedDeserializableFactory {
   public static boolean STORE_ALL_VALUE_FORMS = Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "STORE_ALL_VALUE_FORMS");
 
   /**
-   * Currently GFE always wants a CachedDeserializable wrapper.
-   */
-  public static final boolean preferObject() {
-    return false;
-  }
-  
-  /**
    * Creates and returns an instance of CachedDeserializable that contains the
    * specified byte array.
    */

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/880f8648/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/ColocationHelper.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/ColocationHelper.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/ColocationHelper.java
index b53ed31..012a77f 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/ColocationHelper.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/ColocationHelper.java
@@ -47,61 +47,7 @@ public class ColocationHelper {
 
   /** Logging mechanism for debugging */
   private static final Logger logger = LogService.getLogger();
-   /**
-    * An utility method to retrieve colocated region name of a given partitioned
-    * region without waiting on initialize
-    *
-    * @param partitionedRegion
-    * @return colocated PartitionedRegion
-    * @since GemFire cheetah
-    */
-  public static PartitionedRegion getColocatedRegionName(
-      final PartitionedRegion partitionedRegion) {
-    Assert.assertTrue(partitionedRegion != null); // precondition1
-    String colocatedWith = partitionedRegion.getPartitionAttributes().getColocatedWith();
-    if (colocatedWith == null) {
-      // the region is not colocated with any region
-      return null;
-    }
-    PartitionedRegion colocatedPR = partitionedRegion.getColocatedWithRegion();
-    if (colocatedPR != null && !colocatedPR.isLocallyDestroyed
-        && !colocatedPR.isDestroyed()) {
-      return colocatedPR;
-    }
-    Region prRoot = PartitionedRegionHelper.getPRRoot(partitionedRegion
-        .getCache());
-    PartitionRegionConfig prConf = (PartitionRegionConfig)prRoot
-        .get(getRegionIdentifier(colocatedWith));
-    int prID = -1; 
-    try {
-      if (prConf == null) {
-        colocatedPR = getColocatedPR(partitionedRegion, colocatedWith);
-      }
-      else {
-        prID = prConf.getPRId();
-        colocatedPR = PartitionedRegion.getPRFromId(prID);
-        if (colocatedPR == null && prID > 0) {
-          // colocatedPR might have not called registerPartitionedRegion() yet, but since prID is valid,
-          // we are able to get colocatedPR and do colocatedPR.waitOnBucketMetadataInitialization()
-          colocatedPR = getColocatedPR(partitionedRegion, colocatedWith);
-        }
-      }
-    }
-    catch (PRLocallyDestroyedException e) {
-      if (logger.isDebugEnabled()) {
-        logger.debug("PRLocallyDestroyedException : Region with prId=" + prID
-            + " is locally destroyed on this node", e);
-      } 
-    } 
-    return colocatedPR;
-  }
-    private static PartitionedRegion getColocatedPR(
-      final PartitionedRegion partitionedRegion, final String colocatedWith) {
-    PartitionedRegion colocatedPR = (PartitionedRegion) partitionedRegion
-        .getCache().getPartitionedRegion(colocatedWith, false);
-    assert colocatedPR != null;
-    return colocatedPR;
-  }
+
   /** Whether to ignore missing parallel queues on restart
    * if they are not attached to the region. See bug 50120. Mutable
    * for tests.
@@ -517,17 +463,6 @@ public class ColocationHelper {
     
     return prRegion;
   }
-  
-  // Gemfirexd will skip initialization for PR, so just get region name without waitOnInitialize
-  public static PartitionedRegion getLeaderRegionName(PartitionedRegion prRegion) {
-    PartitionedRegion parentRegion;
-    
-    while((parentRegion = getColocatedRegionName(prRegion)) != null) {
-      prRegion = parentRegion;
-    } 
-      
-    return prRegion;
-  }
 
   private static String getRegionIdentifier(String regionName) {
     if (regionName.startsWith("/")) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/880f8648/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DestroyOperation.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DestroyOperation.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DestroyOperation.java
index e267190..5bfb3cc 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DestroyOperation.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DestroyOperation.java
@@ -129,9 +129,6 @@ public class DestroyOperation extends DistributedCacheOperation
     @Retained
     protected final InternalCacheEvent createEvent(DistributedRegion rgn)
         throws EntryNotFoundException {
-      if (rgn.keyRequiresRegionContext()) {
-        ((KeyWithRegionContext)this.key).setRegionContext(rgn);
-      }
       EntryEventImpl ev = createEntryEvent(rgn);
       boolean evReturned = false;
       try {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/880f8648/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DiskEntry.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DiskEntry.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DiskEntry.java
index e015460..5da0d9a 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DiskEntry.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DiskEntry.java
@@ -85,13 +85,6 @@ public interface DiskEntry extends RegionEntry {
    * @param context
    */
   public void handleValueOverflow(RegionEntryContext context);
-  
-  /**
-   * In some cases we need to do something just after we unset the value
-   * from a DiskEntry that has been moved (i.e. overflowed) to disk.
-   * @param context
-   */
-  public void afterValueOverflow(RegionEntryContext context);
 
   /**
    * Returns true if the DiskEntry value is equal to {@link Token#DESTROYED}, {@link Token#REMOVED_PHASE1}, or {@link Token#REMOVED_PHASE2}.
@@ -247,27 +240,6 @@ public interface DiskEntry extends RegionEntry {
         }
       }
     }
-      
-    /**
-     * Returns false if the entry is INVALID (or LOCAL_INVALID). Determines this
-     * without faulting in the value from disk.
-     * 
-     * @since GemFire 3.2.1
-     */
-    /* TODO prpersist - Do we need this method? It was added by the sqlf merge
-    static boolean isValid(DiskEntry entry, DiskRegion dr) {
-      synchronized (entry) {
-        if (entry.isRecovered()) {
-          // We have a recovered entry whose value is still on disk.
-          // So take a peek at it without faulting it in.
-          //long id = entry.getDiskId().getKeyId();
-          //entry.getDiskId().setKeyId(-id);
-          byte bits = dr.getBits(entry.getDiskId());
-          //TODO Asif:Check if resetting is needed
-          return !EntryBits.isInvalid(bits) && !EntryBits.isLocalInvalid(bits);
-        }
-      }
-    }*/
 
     static boolean isOverflowedToDisk(DiskEntry de, DiskRegion dr, DistributedRegion.DiskPosition dp,RegionEntryContext context) {
       Object v = null;
@@ -372,10 +344,6 @@ public interface DiskEntry extends RegionEntry {
           dr.releaseReadLock();
         }
       }
-      final boolean isEagerDeserialize = entry.isEagerDeserialize();
-      if (isEagerDeserialize) {
-        entry.clearEagerDeserialize();
-      }
       if (Token.isRemovedFromDisk(v)) {
         // fix for bug 31757
         return false;
@@ -386,30 +354,15 @@ public interface DiskEntry extends RegionEntry {
             entry.setSerialized(false);
             entry.value = cd.getDeserializedForReading();
             
-            //For SQLFire we prefer eager deserialized
-//            if(v instanceof ByteSource) {
-//              entry.setEagerDeserialize();
-//            }
           } else {
             // don't serialize here if it is not already serialized
             
             Object tmp = cd.getValue();
-          //For SQLFire we prefer eager deserialized
-//            if(v instanceof ByteSource) {
-//              entry.setEagerDeserialize();
-//            }
             if (tmp instanceof byte[]) {
               byte[] bb = (byte[])tmp;
               entry.value = bb;
               entry.setSerialized(true);
             }
-            else if (isEagerDeserialize && tmp instanceof byte[][]) {
-              // optimize for byte[][] since it will need to be eagerly deserialized
-              // for SQLFabric
-              entry.value = tmp;
-              entry.setEagerDeserialize();
-              entry.setSerialized(true);
-            }
             else {
               try {
                 HeapDataOutputStream hdos = new HeapDataOutputStream(Version.CURRENT);
@@ -437,12 +390,6 @@ public interface DiskEntry extends RegionEntry {
         entry.value = v;
         entry.setSerialized(false);
       }
-      else if (isEagerDeserialize && v instanceof byte[][]) {
-        // optimize for byte[][] since it will need to be eagerly deserialized
-        // for SQLFabric
-        entry.value = v;
-        entry.setEagerDeserialize();
-      }
       else if (v == Token.INVALID) {
         entry.setInvalid();
       }
@@ -460,11 +407,7 @@ public interface DiskEntry extends RegionEntry {
             return false;
           }
         }
-      if (CachedDeserializableFactory.preferObject()) {
-        entry.value = preparedValue;
-        entry.setEagerDeserialize();
-      }
-      else {
+      {
         try {
           HeapDataOutputStream hdos = new HeapDataOutputStream(Version.CURRENT);
           BlobHelper.serializeTo(preparedValue, hdos);
@@ -833,9 +776,7 @@ public interface DiskEntry extends RegionEntry {
         // to the file using the off-heap memory with no extra copying.
         // So we give preference to getRawNewValue over getCachedSerializedNewValue
         Object rawValue = null;
-        if (!event.hasDelta()) {
-          // We don't do this for the delta case because getRawNewValue returns delta
-          // and we want to write the entire new value to disk.
+        {
           rawValue = event.getRawNewValue();
           if (wrapOffHeapReference(rawValue)) {
             return new OffHeapValueWrapper((StoredObject) rawValue);
@@ -969,13 +910,8 @@ public interface DiskEntry extends RegionEntry {
           // Second, do the stats done for the current recovered value
           if (re.getRecoveredKeyId() < 0) {
             if (!entry.isValueNull()) {
-              try {
-                entry.handleValueOverflow(region);
-                entry.setValueWithContext(region, null); // fixes bug 41119
-              }finally {
-                entry.afterValueOverflow(region);
-              }
-              
+              entry.handleValueOverflow(region);
+              entry.setValueWithContext(region, null); // fixes bug 41119
             }
             dr.incNumOverflowOnDisk(1L);
             dr.incNumOverflowBytesOnDisk(did.getValueLength());
@@ -989,11 +925,7 @@ public interface DiskEntry extends RegionEntry {
         }
         else {
           //The new value in the entry needs to be set after the disk writing 
-          // has succeeded. If not , for GemFireXD , it is possible that other thread
-          // may pick this transient value from region entry ( which for 
-          //offheap will eventually be released ) as index key, 
-          //given that this operation is bound to fail in case of
-          //disk access exception.
+          // has succeeded.
           
           //entry.setValueWithContext(region, newValue); // OFFHEAP newValue already prepared
           
@@ -1008,10 +940,7 @@ public interface DiskEntry extends RegionEntry {
           if (dr.isBackup()) {
             dr.testIsRecoveredAndClear(did); // fixes bug 41409
             if (dr.isSync()) {
-              //In case of compression the value is being set first 
-              // because atleast for now , GemFireXD does not support compression
-              // if and when it does support, this needs to be taken care of else
-              // we risk Bug 48965
+              //In case of compression the value is being set first
               if (AbstractRegionEntry.isCompressible(dr, newValue)) {
                 entry.setValueWithContext(region, newValue); // OFFHEAP newValue already prepared
                 
@@ -1134,12 +1063,8 @@ public interface DiskEntry extends RegionEntry {
               false));
         } else {
           if (!oldValueWasNull) {
-            try {
-              entry.handleValueOverflow(context);
-              entry.setValueWithContext(context,null); // fixes bug 41119
-            }finally {
-              entry.afterValueOverflow(context);
-            }
+            entry.handleValueOverflow(context);
+            entry.setValueWithContext(context,null); // fixes bug 41119
           }
         }
         if (entry instanceof LRUEntry) {
@@ -1218,11 +1143,6 @@ public interface DiskEntry extends RegionEntry {
       boolean lruFaultedIn = false;
       boolean done = false;
       try {
-      //Asif: If the entry is instance of LRU then DidkRegion cannot be null.
-      //Since SqlFabric is accessing this method direcly & it passes the owning region,
-      //if the region happens to be persistent PR type, the owning region passed is PR,
-      // but it will have DiskRegion as null. SqlFabric takes care of passing owning region
-      // as BucketRegion in case of Overflow type entry. This is fix for Bug # 41804
       if ( entry instanceof LRUEntry && !dr.isSync() ) {
         synchronized (entry) {
           DiskId did = entry.getDiskId();
@@ -1391,10 +1311,8 @@ public interface DiskEntry extends RegionEntry {
      * Sets the value in the entry.
      * This is only called by the faultIn code once it has determined that
      * the value is no longer in memory.
-     * return the result will only be off-heap if the value is a sqlf ByteSource. Otherwise result will be on-heap.
      * Caller must have "entry" synced.
      */
-    @Retained
     private static Object readValueFromDisk(DiskEntry entry, DiskRecoveryStore region) {
 
       DiskRegionView dr = region.getDiskRegionView();
@@ -1407,16 +1325,8 @@ public interface DiskEntry extends RegionEntry {
       synchronized (did) {
         Object value = getValueFromDisk(dr, did, null);
         if (value == null) return null;
-        @Unretained Object preparedValue = setValueOnFaultIn(value, did, entry, dr, region);
-        // For Sqlfire we want to return the offheap representation.
-        // So we need to retain it for the caller to release.
-        /*if (preparedValue instanceof ByteSource) {
-          // This is the only case in which we return a retained off-heap ref.
-          ((ByteSource)preparedValue).retain();
-          return preparedValue;
-        } else */{
-          return value;
-        }
+        setValueOnFaultIn(value, did, entry, dr, region);
+        return value;
       }
       } finally {
         dr.releaseReadLock();
@@ -1464,16 +1374,7 @@ public interface DiskEntry extends RegionEntry {
 
     static Object readRawValue(byte[] valueBytes, Version version,
         ByteArrayDataInput in) {
-      /*
-      final StaticSystemCallbacks sysCb;
-      if (version != null && (sysCb = GemFireCacheImpl.FactoryStatics
-          .systemCallbacks) != null) {
-        // may need to change serialized shape for SQLFire
-        return sysCb.fromVersion(valueBytes, false, version, in);
-      }
-      else */ {
-        return valueBytes;
-      }
+      return valueBytes;
     }
 
     public static void incrementBucketStats(Object owner,
@@ -1521,12 +1422,6 @@ public interface DiskEntry extends RegionEntry {
         did = entry.getDiskId();
       }
       
-      // Notify the SQLFire IndexManager if present
-     /* final IndexUpdater indexUpdater = region.getIndexUpdater();
-      if(indexUpdater != null && dr.isSync()) {
-        indexUpdater.onOverflowToDisk(entry);
-      }*/
-      
       int change = 0;
       boolean scheduledAsyncHere = false;
       dr.acquireReadLock();
@@ -1561,13 +1456,8 @@ public interface DiskEntry extends RegionEntry {
           // do the stats when it is actually written to disk
         } else {
           region.updateSizeOnEvict(entry.getKey(), oldSize);
-          //did.setValueSerializedSize(byteSizeOnDisk);
-          try {
-            entry.handleValueOverflow(region);
-            entry.setValueWithContext(region,null);
-          }finally {
-            entry.afterValueOverflow(region);
-          }
+          entry.handleValueOverflow(region);
+          entry.setValueWithContext(region,null);
           movedValueToDisk = true;
           change = ((LRUClockNode)entry).updateEntrySize(ccHelper);
         }
@@ -1648,12 +1538,8 @@ public interface DiskEntry extends RegionEntry {
                 dr.incNumOverflowBytesOnDisk(did.getValueLength());
                 incrementBucketStats(region, 0/*InVM*/, 0/*OnDisk*/,
                                      did.getValueLength());
-                try {
-                  entry.handleValueOverflow(region);
-                  entry.setValueWithContext(region,null);
-                }finally {
-                  entry.afterValueOverflow(region);
-                }
+                entry.handleValueOverflow(region);
+                entry.setValueWithContext(region,null);
               }
               
               //See if we the entry we wrote to disk has the same tag
@@ -1769,12 +1655,8 @@ public interface DiskEntry extends RegionEntry {
                 dr.incNumOverflowBytesOnDisk(did.getValueLength());
                 incrementBucketStats(region, 0/*InVM*/, 0/*OnDisk*/,
                                      did.getValueLength());
-                try {
-                 entry.handleValueOverflow(region);
-                 entry.setValueWithContext(region,null);
-                }finally {
-                  entry.afterValueOverflow(region);
-                }
+                entry.handleValueOverflow(region);
+                entry.setValueWithContext(region,null);
               }
             } catch (RegionClearedException ignore) {
               // no need to do the op since it was clobbered by a region clear

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/880f8648/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DiskInitFile.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DiskInitFile.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DiskInitFile.java
index 018a065..c6533a5 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DiskInitFile.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DiskInitFile.java
@@ -2435,8 +2435,6 @@ public class DiskInitFile implements DiskInitFileInterpreter {
 
   /**
    * Additional flags for a disk region that are persisted in its meta-data.
-   * Currently only few for GemFireXD added here but all other boolean flags also
-   * be better moved here.
    * 
    * @since GemFire 7.0
    */

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/880f8648/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DiskRegion.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DiskRegion.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DiskRegion.java
index a2092fd..3f511f0 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DiskRegion.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DiskRegion.java
@@ -791,8 +791,6 @@ public class DiskRegion extends AbstractDiskRegion {
           DiskId id = de.getDiskId();
           if (id != null) {
             synchronized (id) {
-              // SQLFabric: give a chance to copy key from value bytes when key
-              // is just a pointer to value row
               re.setValueToNull(); // TODO why call _setValue twice in a row?
               re.removePhase2();
               id.unmarkForWriting();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/880f8648/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DiskWriteAttributesImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DiskWriteAttributesImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DiskWriteAttributesImpl.java
index 9bb148b..3e005cb 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DiskWriteAttributesImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DiskWriteAttributesImpl.java
@@ -83,18 +83,6 @@ public final class DiskWriteAttributesImpl implements DiskWriteAttributes
   public static final String SYNCHRONOUS_PROPERTY = "synchronous";
 
   /**
-   * The property used to specify the base directory for Sql Fabric persistence
-   * of Gateway Queues, Tables, Data Dictionary etc.
-   */
-  public static final String SYS_PERSISTENT_DIR = "sys-disk-dir";
-
-  /**
-   * The system property for {@link #SYS_PERSISTENT_DIR}.
-   */
-  public static final String SYS_PERSISTENT_DIR_PROP = "sqlfabric."
-      + SYS_PERSISTENT_DIR;
-
-  /**
    * Default disk directory size in megabytes
    * 
    * @since GemFire 5.1
@@ -477,83 +465,4 @@ public final class DiskWriteAttributesImpl implements DiskWriteAttributes
   {
     return DEFAULT_SYNC_DWA;
   }
-
-
-  // Asif: Sql Fabric related helper methods.
-  // These static functions need to be moved to a better place.
-  // preferably in sql Fabric source tree but since GatewayImpl is also
-  // utilizing it, we have no option but to keep it here.
-  public static String generateOverFlowDirName(String dirName) {
-    dirName = generatePersistentDirName(dirName);
-    final GemFireCacheImpl cache = GemFireCacheImpl.getInstance();
-    if (cache == null) {
-      throw new CacheClosedException(
-          "DiskWriteAttributesImpl::generateOverFlowDirName: no cache found.");
-    }
-    /* [sumedh] no need of below since sys-disk-dir is VM specific anyways
-    char fileSeparator = System.getProperty("file.separator").charAt(0);
-    DistributedMember member = cache.getDistributedSystem()
-        .getDistributedMember();
-    String host = member.getHost();
-    int pid = member.getProcessId();
-    final StringBuilder temp = new StringBuilder(dirName);
-    temp.append(fileSeparator);
-    temp.append(host);
-    temp.append('-');
-    temp.append(pid);
-    return temp.toString();
-    */
-    return dirName;
-  }
-
-  public static String generatePersistentDirName(String dirPath) {
-    String baseDir = System.getProperty(SYS_PERSISTENT_DIR_PROP);
-    if (baseDir == null) {
-    //Kishor : TODO : Removing old wan related code
-      //baseDir = GatewayQueueAttributes.DEFAULT_OVERFLOW_DIRECTORY;
-      baseDir = ".";
-    }
-    if (dirPath != null) {
-      File dirProvided = new File(dirPath);
-      // Is the directory path absolute?
-      // For Windows this will check for drive letter. However, we want
-      // to allow for no drive letter so prepend the drive.
-      boolean isAbsolute = dirProvided.isAbsolute();
-      if (!isAbsolute) {
-        String driveName;
-        // get the current drive for Windows and prepend
-        if ((dirPath.charAt(0) == '/' || dirPath.charAt(0) == '\\')
-            && (driveName = getCurrentDriveName()) != null) {
-          isAbsolute = true;
-          dirPath = driveName + dirPath;
-        }
-      }
-      if (!isAbsolute) {
-        // relative path so resolve it relative to parent dir
-        dirPath = new File(baseDir, dirPath).getAbsolutePath();
-      }
-    }
-    else {
-      dirPath = baseDir;
-    }
-    return dirPath;
-  }
-
-  /**
-   * Get the drive name of current working directory for windows else return
-   * null for non-Windows platform (somewhat of a hack -- see if something
-   * cleaner can be done for this).
-   */
-  public static String getCurrentDriveName() {
-    if (System.getProperty("os.name").startsWith("Windows")) {
-      try {
-        // get the current drive
-        return new File(".").getCanonicalPath().substring(0, 2);
-      } catch (IOException ex) {
-        throw new IllegalArgumentException(
-            "Failed in setting the overflow directory", ex);
-      }
-    }
-    return null;
-  }
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/880f8648/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DistTXState.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DistTXState.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DistTXState.java
index cafdb80..ed59108 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DistTXState.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DistTXState.java
@@ -447,7 +447,7 @@ public class DistTXState extends TXState {
         postPutAll(dtop.getPutAllOperation(), versions, dtop.region);
       } else {
         result = putEntryOnRemote(dtop, false/* ifNew */,
-          dtop.hasDelta()/* ifOld */, null/* expectedOldValue */,
+          false/* ifOld */, null/* expectedOldValue */,
           false/* requireOldValue */, 0L/* lastModified */, true/*
                                                                  * overwriteDestroyed
                                                                  * *not*
@@ -572,7 +572,7 @@ public class DistTXState extends TXState {
           @Released EntryEventImpl ev = PutAllPRMessage.getEventFromEntry(theRegion,
               myId, myId, i, putallOp.putAllData, false, putallOp
                   .getBaseEvent().getContext(), false, !putallOp.getBaseEvent()
-                  .isGenerateCallbacks(), false);
+                  .isGenerateCallbacks());
           try {
 //            ev.setPutAllOperation(putallOp);
             

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/880f8648/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DistTXStateOnCoordinator.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DistTXStateOnCoordinator.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DistTXStateOnCoordinator.java
index 33bec1c..436c637 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DistTXStateOnCoordinator.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DistTXStateOnCoordinator.java
@@ -359,7 +359,7 @@ public final class DistTXStateOnCoordinator extends DistTXState implements
         postPutAll(dtop.getPutAllOperation(), versions, dtop.region);
       } else {
         result = putEntry(dtop, false/* ifNew */,
-          dtop.hasDelta()/* ifOld */, null/* expectedOldValue */,
+          false/* ifOld */, null/* expectedOldValue */,
           false/* requireOldValue */, 0L/* lastModified */, true/*
                                                                  * overwriteDestroyed
                                                                  * *not*

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/880f8648/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DistributedCacheOperation.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DistributedCacheOperation.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DistributedCacheOperation.java
index 6b1073b..83d4c5a 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DistributedCacheOperation.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DistributedCacheOperation.java
@@ -101,13 +101,6 @@ public abstract class DistributedCacheOperation {
   public static final byte DESERIALIZATION_POLICY_NONE = (byte)0;
 
   /**
-   * Deserialization policy: deserialize eagerly (for Deltas)
-   * 
-   * @since GemFire 5.7
-   */
-  public static final byte DESERIALIZATION_POLICY_EAGER = (byte)1;
-
-  /**
    * Deserialization policy: deserialize lazily (for all other objects)
    * 
    * @since GemFire 5.7
@@ -115,14 +108,11 @@ public abstract class DistributedCacheOperation {
   public static final byte DESERIALIZATION_POLICY_LAZY = (byte)2;
   
   /**
-   * @param deserializationPolicy must be one of the following: DESERIALIZATION_POLICY_NONE, DESERIALIZATION_POLICY_EAGER, DESERIALIZATION_POLICY_LAZY.
+   * @param deserializationPolicy must be one of the following: DESERIALIZATION_POLICY_NONE, DESERIALIZATION_POLICY_LAZY.
    */
   public static void writeValue(final byte deserializationPolicy, final Object vObj, final byte[] vBytes, final DataOutput out) throws IOException {
     if (vObj != null) {
-      if (deserializationPolicy == DESERIALIZATION_POLICY_EAGER) {
-        // for DESERIALIZATION_POLICY_EAGER avoid extra byte array serialization
-        DataSerializer.writeObject(vObj, out);
-      } else if (deserializationPolicy == DESERIALIZATION_POLICY_NONE) {
+      if (deserializationPolicy == DESERIALIZATION_POLICY_NONE) {
         // We only have NONE with a vObj when vObj is off-heap and not serialized.
         StoredObject so = (StoredObject) vObj;
         assert !so.isSerialized();
@@ -131,14 +121,7 @@ public abstract class DistributedCacheOperation {
         DataSerializer.writeObjectAsByteArray(vObj, out);
       }
     } else {
-      if (deserializationPolicy == DESERIALIZATION_POLICY_EAGER) {
-        // object is already in serialized form in the byte array.
-        // So just write the bytes to the stream.
-        // fromData will call readObject which will deserialize to object form.
-        out.write(vBytes);
-      } else {
-        DataSerializer.writeByteArray(vBytes, out);
-      }
+      DataSerializer.writeByteArray(vBytes, out);
     }    
   }
   // static values for oldValueIsObject
@@ -151,7 +134,6 @@ public abstract class DistributedCacheOperation {
    */
   public static byte valueIsToDeserializationPolicy(boolean oldValueIsSerialized) {
     if (!oldValueIsSerialized) return DESERIALIZATION_POLICY_NONE;
-    if (CachedDeserializableFactory.preferObject()) return DESERIALIZATION_POLICY_EAGER;
     return DESERIALIZATION_POLICY_LAZY;
   }
 
@@ -180,8 +162,6 @@ public abstract class DistributedCacheOperation {
     switch (policy) {
     case DESERIALIZATION_POLICY_NONE:
       return "NONE";
-    case DESERIALIZATION_POLICY_EAGER:
-      return "EAGER";
     case DESERIALIZATION_POLICY_LAZY:
       return "LAZY";
     default:
@@ -863,8 +843,6 @@ public abstract class DistributedCacheOperation {
 
     private final static int INHIBIT_NOTIFICATIONS_MASK = 0x400;
 
-    protected final static short IS_PUT_DML = 0x100;
-
     public boolean needsRouting;
 
     protected String regionPath;
@@ -1364,9 +1342,6 @@ public abstract class DistributedCacheOperation {
       }
       if ((extBits & INHIBIT_NOTIFICATIONS_MASK) != 0) {
         this.inhibitAllNotifications = true;
-	  if (this instanceof PutAllMessage) {
-        ((PutAllMessage) this).setPutDML((extBits & IS_PUT_DML) != 0);
-      }
       }
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/880f8648/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DistributedPutAllOperation.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DistributedPutAllOperation.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DistributedPutAllOperation.java
index 5d71ef2..e73ca35 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DistributedPutAllOperation.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DistributedPutAllOperation.java
@@ -51,7 +51,6 @@ import com.gemstone.gemfire.internal.DataSerializableFixedID;
 import com.gemstone.gemfire.internal.InternalDataSerializer;
 import com.gemstone.gemfire.internal.Version;
 import com.gemstone.gemfire.internal.cache.FilterRoutingInfo.FilterInfo;
-import com.gemstone.gemfire.internal.cache.delta.Delta;
 import com.gemstone.gemfire.internal.cache.ha.ThreadIdentifier;
 import com.gemstone.gemfire.internal.cache.partitioned.PutAllPRMessage;
 import com.gemstone.gemfire.internal.cache.tier.sockets.ClientProxyMembershipID;
@@ -416,8 +415,7 @@ public class DistributedPutAllOperation extends AbstractUpdateOperation
      * {@link PutAllPRMessage#toData(DataOutput)} <br>
      * {@link RemotePutAllMessage#toData(DataOutput)} <br>
      */
-    public final void toData(final DataOutput out, 
-        final boolean requiresRegionContext) throws IOException {
+    public final void toData(final DataOutput out) throws IOException {
       Object key = this.key;
       final Object v = this.value;
       DataSerializer.writeObject(key, out);
@@ -856,7 +854,6 @@ public class DistributedPutAllOperation extends AbstractUpdateOperation
     PutAllMessage msg = new PutAllMessage();
     msg.eventId = event.getEventId();
     msg.context = event.getContext();
-    msg.setPutDML(event.isPutDML());
     return msg;
   }
 
@@ -870,7 +867,7 @@ public class DistributedPutAllOperation extends AbstractUpdateOperation
   public PutAllPRMessage createPRMessagesNotifyOnly(int bucketId) {
     final EntryEventImpl event = getBaseEvent();
     PutAllPRMessage prMsg = new PutAllPRMessage(bucketId, putAllDataSize, true,
-        event.isPossibleDuplicate(), !event.isGenerateCallbacks(), event.getCallbackArgument(), false /*isPutDML*/);
+        event.isPossibleDuplicate(), !event.isGenerateCallbacks(), event.getCallbackArgument());
     if (event.getContext() != null) {
       prMsg.setBridgeContext(event.getContext());
     }
@@ -899,7 +896,7 @@ public class DistributedPutAllOperation extends AbstractUpdateOperation
       PutAllPRMessage prMsg = (PutAllPRMessage)prMsgMap.get(bucketId);
       if (prMsg == null) {
         prMsg = new PutAllPRMessage(bucketId.intValue(), putAllDataSize, false,
-            event.isPossibleDuplicate(), !event.isGenerateCallbacks(), event.getCallbackArgument(), event.isPutDML());
+            event.isPossibleDuplicate(), !event.isGenerateCallbacks(), event.getCallbackArgument());
         prMsg.setTransactionDistributed(event.getRegion().getCache().getTxManager().isDistributed());
 
         // set dpao's context(original sender) into each PutAllMsg
@@ -1076,8 +1073,6 @@ public class DistributedPutAllOperation extends AbstractUpdateOperation
 
     protected EventID eventId = null;
     
-    private transient boolean isPutDML = false;
-
     protected static final short HAS_BRIDGE_CONTEXT = UNRESERVED_FLAGS_START;
     protected static final short SKIP_CALLBACKS =
       (short)(HAS_BRIDGE_CONTEXT << 1);
@@ -1132,13 +1127,10 @@ public class DistributedPutAllOperation extends AbstractUpdateOperation
      * @param rgn
      *          the region the entry is put in
      */
-    public void doEntryPut(PutAllEntryData entry, DistributedRegion rgn,
-        boolean requiresRegionContext, boolean isPutDML) {
+    public void doEntryPut(PutAllEntryData entry, DistributedRegion rgn) {
       @Released EntryEventImpl ev = PutAllMessage.createEntryEvent(entry, getSender(), 
-          this.context, rgn,
-          requiresRegionContext, this.possibleDuplicate,
+          this.context, rgn, this.possibleDuplicate,
           this.needsRouting, this.callbackArg, true, skipCallbacks);
-      ev.setPutDML(isPutDML);
       // we don't need to set old value here, because the msg is from remote. local old value will get from next step
       try {
         super.basicOperateOnRegion(ev, rgn);
@@ -1158,7 +1150,6 @@ public class DistributedPutAllOperation extends AbstractUpdateOperation
      * @param sender
      * @param context
      * @param rgn
-     * @param requiresRegionContext
      * @param possibleDuplicate
      * @param needsRouting
      * @param callbackArg
@@ -1167,13 +1158,10 @@ public class DistributedPutAllOperation extends AbstractUpdateOperation
     @Retained
     public static EntryEventImpl createEntryEvent(PutAllEntryData entry,
         InternalDistributedMember sender, ClientProxyMembershipID context,
-        DistributedRegion rgn, boolean requiresRegionContext, 
+        DistributedRegion rgn,
         boolean possibleDuplicate, boolean needsRouting, Object callbackArg,
         boolean originRemote, boolean skipCallbacks) {
       final Object key = entry.getKey();
-      if (requiresRegionContext) {
-        ((KeyWithRegionContext)key).setRegionContext(rgn);
-      }
       EventID evId = entry.getEventID();
       @Retained EntryEventImpl ev = EntryEventImpl.create(rgn, entry.getOp(),
           key, null/* value */, callbackArg,
@@ -1225,14 +1213,13 @@ public class DistributedPutAllOperation extends AbstractUpdateOperation
       
       rgn.syncBulkOp(new Runnable() {
         public void run() {
-          final boolean requiresRegionContext = rgn.keyRequiresRegionContext();
           final boolean isDebugEnabled = logger.isDebugEnabled();
           for (int i = 0; i < putAllDataSize; ++i) {
             if (isDebugEnabled) {
               logger.debug("putAll processing {} with {} sender={}", putAllData[i], putAllData[i].versionTag, sender);
             }
             putAllData[i].setSender(sender);
-            doEntryPut(putAllData[i], rgn, requiresRegionContext,  isPutDML);
+            doEntryPut(putAllData[i], rgn);
           }
         }
       }, ev.getEventId());
@@ -1283,10 +1270,6 @@ public class DistributedPutAllOperation extends AbstractUpdateOperation
         EntryVersionsList versionTags = new EntryVersionsList(putAllDataSize);
 
         boolean hasTags = false;
-        // get the "keyRequiresRegionContext" flag from first element assuming
-        // all key objects to be uniform
-        final boolean requiresRegionContext =
-          (this.putAllData[0].key instanceof KeyWithRegionContext);
         for (int i = 0; i < this.putAllDataSize; i++) {
           if (!hasTags && putAllData[i].versionTag != null) {
             hasTags = true;
@@ -1294,7 +1277,7 @@ public class DistributedPutAllOperation extends AbstractUpdateOperation
           VersionTag<?> tag = putAllData[i].versionTag;
           versionTags.add(tag);
           putAllData[i].versionTag = null;
-          this.putAllData[i].toData(out, requiresRegionContext);
+          this.putAllData[i].toData(out);
           this.putAllData[i].versionTag = tag;
         }
 
@@ -1342,11 +1325,7 @@ public class DistributedPutAllOperation extends AbstractUpdateOperation
         Object valueObj = null;
         Object v = entry.getValue();
         byte deserializationPolicy;
-        if (v instanceof Delta) {
-          deserializationPolicy = DESERIALIZATION_POLICY_EAGER;
-          valueObj = v;
-        }
-        else if (v instanceof CachedDeserializable) {
+        if (v instanceof CachedDeserializable) {
           deserializationPolicy = DESERIALIZATION_POLICY_LAZY;
           valueBytes = ((CachedDeserializable)v).getSerializedValue();
         }
@@ -1360,18 +1339,5 @@ public class DistributedPutAllOperation extends AbstractUpdateOperation
       }
       return Arrays.asList(ops);
     }
-    
-    public void setPutDML(boolean val) {
-      this.isPutDML = val;
-    }
-    
-    @Override
-    protected short computeCompressedExtBits(short bits) {
-      bits = super.computeCompressedExtBits(bits);
-      if (isPutDML) {
-        bits |= IS_PUT_DML;
-      }
-      return bits;
-    }
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/880f8648/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DistributedRegion.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DistributedRegion.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DistributedRegion.java
index eed5268..b42a617 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DistributedRegion.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DistributedRegion.java
@@ -28,7 +28,6 @@ import com.gemstone.gemfire.cache.execute.FunctionException;
 import com.gemstone.gemfire.cache.execute.ResultCollector;
 import com.gemstone.gemfire.cache.execute.ResultSender;
 import com.gemstone.gemfire.cache.persistence.PersistentReplicatesOfflineException;
-import com.gemstone.gemfire.cache.query.internal.IndexUpdater;
 import com.gemstone.gemfire.cache.wan.GatewaySender;
 import com.gemstone.gemfire.distributed.DistributedLockService;
 import com.gemstone.gemfire.distributed.DistributedMember;
@@ -1136,21 +1135,8 @@ public class DistributedRegion extends LocalRegion implements
       getLockService(); // create lock service eagerly now
     }
 
-    final IndexUpdater indexUpdater = getIndexUpdater();
-    boolean sqlfGIILockTaken = false;
-    // this try block is to release the SQLF GII lock in finally
-    // which should be done after bucket status will be set
-    // properly in LocalRegion#initialize()
-    try {
      try {
       try {
-        // take the GII lock to avoid missing entries while updating the
-        // index list for SQLFabric (#41330 and others)
-        if (indexUpdater != null) {
-          indexUpdater.lockForGII();
-          sqlfGIILockTaken = true;
-        }
-        
         PersistentMemberID persistentId = null;
         boolean recoverFromDisk = isRecoveryNeeded();
         DiskRegion dskRgn = getDiskRegion();
@@ -1194,11 +1180,6 @@ public class DistributedRegion extends LocalRegion implements
         this.eventTracker.setInitialized();
       }
      }
-    } finally {
-      if (sqlfGIILockTaken) {
-        indexUpdater.unlockForGII();
-      }
-    }
   }
 
   @Override
@@ -2273,13 +2254,6 @@ public class DistributedRegion extends LocalRegion implements
     }
     profile.serialNumber = getSerialNumber();
     profile.regionInitialized = this.isInitialized();
-    if (!this.isUsedForPartitionedRegionBucket()) {
-      profile.memberUnInitialized = getCache().isUnInitializedMember(
-          profile.getDistributedMember());
-    }
-    else {
-      profile.memberUnInitialized = false;
-    }
     profile.persistentID = getPersistentID();
     if(getPersistenceAdvisor() != null) {
       profile.persistenceInitialized = getPersistenceAdvisor().isOnline();
@@ -2485,11 +2459,7 @@ public class DistributedRegion extends LocalRegion implements
     }
     
     if (preferCD) {
-      if (event.hasDelta()) {
-        result = event.getNewValue();
-      } else {
         result = event.getRawNewValueAsHeapObject();
-      }    
     } else {
       result = event.getNewValue();     
     }
@@ -3909,12 +3879,10 @@ public class DistributedRegion extends LocalRegion implements
   /**
    * Used to bootstrap txState.
    * @param key
-   * @return  distributedRegions,
-   * member with parimary bucket for partitionedRegions
+   * @return member with primary bucket for partitionedRegions
    */
   @Override
   public DistributedMember getOwnerForKey(KeyInfo key) {
-    //Asif: fix for  sqlfabric bug 42266
     assert !this.isInternalRegion() || this.isMetaRegionWithTransactions();
     if (!this.getAttributes().getDataPolicy().withStorage()
         || (this.concurrencyChecksEnabled && this.getAttributes()
@@ -4032,8 +4000,7 @@ public class DistributedRegion extends LocalRegion implements
       if (this.randIndex < 0) {
         this.randIndex = PartitionedRegion.rand.nextInt(numProfiles);
       }
-      if (cp.dataPolicy.withReplication() && cp.regionInitialized
-          && !cp.memberUnInitialized) {
+      if (cp.dataPolicy.withReplication() && cp.regionInitialized) {
         if (onlyPersistent && !cp.dataPolicy.withPersistence()) {
           return true;
         }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/880f8648/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DistributedRegionFunctionStreamingMessage.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DistributedRegionFunctionStreamingMessage.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DistributedRegionFunctionStreamingMessage.java
index e51bedd..af54945 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DistributedRegionFunctionStreamingMessage.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DistributedRegionFunctionStreamingMessage.java
@@ -231,8 +231,6 @@ public class DistributedRegionFunctionStreamingMessage extends DistributionMessa
           }
         }
         // Send the reply if the operateOnPartitionedRegion returned true
-        // Fix for hang in dunits on sqlfabric after merge.
-        //ReplyMessage.send(getSender(), this.processorId, rex, dm);
         sendReply(getSender(), this.processorId, dm, rex, null, 0, true, false);
       }
     }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/880f8648/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DistributedRemoveAllOperation.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DistributedRemoveAllOperation.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DistributedRemoveAllOperation.java
index eabefdf..0390b29 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DistributedRemoveAllOperation.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DistributedRemoveAllOperation.java
@@ -380,8 +380,7 @@ public class DistributedRemoveAllOperation extends AbstractUpdateOperation // TO
      * {@link PutAllPRMessage#toData(DataOutput)} <br>
      * {@link RemotePutAllMessage#toData(DataOutput)} <br>
      */
-    public final void toData(final DataOutput out, 
-        final boolean requiresRegionContext) throws IOException {
+    public final void toData(final DataOutput out) throws IOException {
       Object key = this.key;
       DataSerializer.writeObject(key, out);
 
@@ -886,11 +885,9 @@ public class DistributedRemoveAllOperation extends AbstractUpdateOperation // TO
      * @param rgn
      *          the region the entry is removed from
      */
-    public void doEntryRemove(RemoveAllEntryData entry, DistributedRegion rgn,
-        boolean requiresRegionContext) {
+    public void doEntryRemove(RemoveAllEntryData entry, DistributedRegion rgn) {
       @Released EntryEventImpl ev = RemoveAllMessage.createEntryEvent(entry, getSender(), 
-          this.context, rgn,
-          requiresRegionContext, this.possibleDuplicate,
+          this.context, rgn, this.possibleDuplicate,
           this.needsRouting, this.callbackArg, true, skipCallbacks);
 //      rgn.getLogWriterI18n().info(LocalizedStrings.DEBUG, "RemoveAllMessage.doEntryRemove sender=" + getSender() +
 //          " event="+ev);
@@ -922,7 +919,6 @@ public class DistributedRemoveAllOperation extends AbstractUpdateOperation // TO
      * @param sender
      * @param context
      * @param rgn
-     * @param requiresRegionContext
      * @param possibleDuplicate
      * @param needsRouting
      * @param callbackArg
@@ -931,13 +927,10 @@ public class DistributedRemoveAllOperation extends AbstractUpdateOperation // TO
     @Retained
     public static EntryEventImpl createEntryEvent(RemoveAllEntryData entry,
         InternalDistributedMember sender, ClientProxyMembershipID context,
-        DistributedRegion rgn, boolean requiresRegionContext, 
+        DistributedRegion rgn,
         boolean possibleDuplicate, boolean needsRouting, Object callbackArg,
         boolean originRemote, boolean skipCallbacks) {
       final Object key = entry.getKey();
-      if (requiresRegionContext) {
-        ((KeyWithRegionContext)key).setRegionContext(rgn);
-      }
       EventID evId = entry.getEventID();
       @Retained EntryEventImpl ev = EntryEventImpl.create(rgn, entry.getOp(),
           key, null/* value */, callbackArg,
@@ -985,13 +978,12 @@ public class DistributedRemoveAllOperation extends AbstractUpdateOperation // TO
       
       rgn.syncBulkOp(new Runnable() {
         public void run() {
-          final boolean requiresRegionContext = rgn.keyRequiresRegionContext();
           for (int i = 0; i < removeAllDataSize; ++i) {
             if (logger.isTraceEnabled()) {
               logger.trace("removeAll processing {} with {}", removeAllData[i], removeAllData[i].versionTag);
             }
             removeAllData[i].setSender(sender);
-            doEntryRemove(removeAllData[i], rgn, requiresRegionContext);
+            doEntryRemove(removeAllData[i], rgn);
           }
         }
       }, ev.getEventId());
@@ -1043,10 +1035,6 @@ public class DistributedRemoveAllOperation extends AbstractUpdateOperation // TO
         EntryVersionsList versionTags = new EntryVersionsList(removeAllDataSize);
 
         boolean hasTags = false;
-        // get the "keyRequiresRegionContext" flag from first element assuming
-        // all key objects to be uniform
-        final boolean requiresRegionContext =
-          (this.removeAllData[0].key instanceof KeyWithRegionContext);
         for (int i = 0; i < this.removeAllDataSize; i++) {
           if (!hasTags && removeAllData[i].versionTag != null) {
             hasTags = true;
@@ -1054,7 +1042,7 @@ public class DistributedRemoveAllOperation extends AbstractUpdateOperation // TO
           VersionTag<?> tag = removeAllData[i].versionTag;
           versionTags.add(tag);
           removeAllData[i].versionTag = null;
-          this.removeAllData[i].toData(out, requiresRegionContext);
+          this.removeAllData[i].toData(out);
           this.removeAllData[i].versionTag = tag;
         }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/880f8648/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/EntryBits.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/EntryBits.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/EntryBits.java
index f95af60..a67a335 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/EntryBits.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/EntryBits.java
@@ -30,16 +30,6 @@ public abstract class EntryBits {
   private static final byte TOMBSTONE = 0x40;
   private static final byte WITH_VERSIONS = (byte)0x80; // oplog entry contains versions 
 
-  /**
-   * Currently for SQLFabric to deserialize byte[][] eagerly in
-   * InitialImageOperation. Can be made a general flag later for all kinds of
-   * objects in CachedDeserializable whose serialization is not expensive but
-   * that are pretty heavy so creating an intermediate byte[] is expensive.
-   * 
-   * This is a transient bit that clashes with on-disk persisted bits.
-   */
-  private static final byte EAGER_DESERIALIZE = 0x20;
-
   public static boolean isSerialized(byte b) {
     return (b & SERIALIZED) != 0;
   }
@@ -79,10 +69,6 @@ public abstract class EntryBits {
     return (b & (INVALID|LOCAL_INVALID|TOMBSTONE)) == 0;
   }
 
-  public static boolean isEagerDeserialize(byte b) {
-    return (b & EntryBits.EAGER_DESERIALIZE) != 0;
-  }
-
   public static byte setSerialized(byte b, boolean isSerialized) {
     return isSerialized ? (byte)(b | SERIALIZED) : (byte)(b & ~SERIALIZED);
   }
@@ -116,12 +102,4 @@ public abstract class EntryBits {
   public static byte getPersistentBits(byte b) {
     return (byte)(b & (SERIALIZED|INVALID|LOCAL_INVALID|TOMBSTONE|WITH_VERSIONS));
   }
-
-  public static byte setEagerDeserialize(byte b) {
-    return (byte)(b | EntryBits.EAGER_DESERIALIZE);
-  }
-
-  public static byte clearEagerDeserialize(byte b) {
-    return (byte)(b & ~EntryBits.EAGER_DESERIALIZE);
-  }
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/880f8648/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 65b2c04..c4849be 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
@@ -21,7 +21,6 @@ import com.gemstone.gemfire.*;
 import com.gemstone.gemfire.cache.*;
 import com.gemstone.gemfire.cache.query.IndexMaintenanceException;
 import com.gemstone.gemfire.cache.query.QueryException;
-import com.gemstone.gemfire.cache.query.internal.IndexUpdater;
 import com.gemstone.gemfire.cache.query.internal.index.IndexManager;
 import com.gemstone.gemfire.cache.query.internal.index.IndexProtocol;
 import com.gemstone.gemfire.cache.query.internal.index.IndexUtils;
@@ -33,7 +32,6 @@ import com.gemstone.gemfire.distributed.internal.DistributionMessage;
 import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
 import com.gemstone.gemfire.internal.*;
 import com.gemstone.gemfire.internal.cache.FilterRoutingInfo.FilterInfo;
-import com.gemstone.gemfire.internal.cache.delta.Delta;
 import com.gemstone.gemfire.internal.cache.lru.Sizeable;
 import com.gemstone.gemfire.internal.cache.partitioned.PartitionMessage;
 import com.gemstone.gemfire.internal.cache.partitioned.PutMessage;
@@ -92,7 +90,6 @@ public class EntryEventImpl
   private byte[] cachedSerializedNewValue = null;
   @Retained(ENTRY_EVENT_OLD_VALUE)
   private Object oldValue = null;
-  protected Delta delta = null;
  
   protected short eventFlags = 0x0000;
 
@@ -141,13 +138,6 @@ public class EntryEventImpl
   protected ClientProxyMembershipID context = null;
   
   /**
-   * A custom context object that can be used for any other contextual
-   * information. Currently used by SQL Fabric to pass around evaluated rows
-   * from raw byte arrays and routing object.
-   */
-  private transient Object contextObj = null;
-
-  /**
    * this holds the bytes representing the change in value effected by this
    * event.  It is used when the value implements the Delta interface.
    */
@@ -165,8 +155,6 @@ public class EntryEventImpl
   /** version tag for concurrency checks */
   protected VersionTag versionTag;
 
-  private transient boolean isPutDML = false;
-
   /** boolean to indicate that the RegionEntry for this event has been evicted*/
   private transient boolean isEvicted = false;
   
@@ -191,7 +179,7 @@ public class EntryEventImpl
     this.txId = (TXId)DataSerializer.readObject(in);
 
     if (in.readBoolean()) {     // isDelta
-      this.delta = (Delta)DataSerializer.readObject(in);
+      assert false : "isDelta should never be true";
     }
     else {
       // OFFHEAP Currently values are never deserialized to off heap memory. If that changes then this code needs to change.
@@ -247,10 +235,7 @@ public class EntryEventImpl
     this.op = op;
     this.keyInfo = this.region.getKeyInfo(key, newVal, callbackArgument);
 
-    if (newVal instanceof Delta) {
-      this.delta = (Delta)newVal;
-    }
-    else if (!Token.isInvalid(newVal)) {
+    if (!Token.isInvalid(newVal)) {
       basicSetNewValue(newVal);
     }
 
@@ -299,7 +284,6 @@ public class EntryEventImpl
     this.newValueBytes = other.newValueBytes;
     this.cachedSerializedNewValue = other.cachedSerializedNewValue;
     this.re = other.re;
-    this.delta = other.delta;
     if (setOldValue) {
       retainAndSetOldValue(other.basicGetOldValue());
       this.oldValueBytes = other.oldValueBytes;
@@ -781,25 +765,19 @@ public class EntryEventImpl
 
   /**
    * Like getRawNewValue except that if the result is an off-heap reference then copy it to the heap.
-   * ALERT: If there is a Delta, returns that, not the (applied) new value.
    * Note: to prevent the heap copy use getRawNewValue instead
    */
   public final Object getRawNewValueAsHeapObject() {
-    if (this.delta != null) {
-      return this.delta;
-    }
     return OffHeapHelper.getHeapForm(OffHeapHelper.copyIfNeeded(basicGetNewValue()));
   }
   
   /**
-   * If new value is a Delta return it.
-   * Else if new value is off-heap return the StoredObject form (unretained OFF_HEAP_REFERENCE). 
+   * If new value is off-heap return the StoredObject form (unretained OFF_HEAP_REFERENCE). 
    * Its refcount is not inced by this call and the returned object can only be safely used for the lifetime of the EntryEventImpl instance that returned the value.
    * Else return the raw form.
    */
   @Unretained(ENTRY_EVENT_NEW_VALUE)
   public final Object getRawNewValue() {
-    if (this.delta != null) return this.delta;
     return basicGetNewValue();
   }
 
@@ -808,39 +786,6 @@ public class EntryEventImpl
     return basicGetNewValue();
   }
   
-  /**
-   * Returns the delta that represents the new value; null if no delta.
-   * @return the delta that represents the new value; null if no delta.
-   */
-  public final Delta getDeltaNewValue() {
-    return this.delta;
-  }
-
-  /**
-   *  Applies the delta 
-   */
-  private Object applyDeltaWithCopyOnRead(boolean doCopyOnRead) {
-    //try {
-      if (applyDelta(true)) {
-        Object applied = basicGetNewValue();
-        // if applyDelta returns true then newValue should not be off-heap
-        assert !(applied instanceof StoredObject);
-        if (applied == this.oldValue && doCopyOnRead) {
-          applied = CopyHelper.copy(applied);
-        }
-        return applied;
-      }
-    //} catch (EntryNotFoundException ex) {
-      // only (broken) product code has the opportunity to call this before
-      // this.oldValue is set. If oldValue is not set yet, then
-      // we most likely haven't synchronized on the region entry yet.
-      // (If we have, then make sure oldValue is set before
-      // calling this method).
-      //throw new AssertionError("too early to call getNewValue");
-    //}
-    return null;
-  }
-
   @Released(ENTRY_EVENT_NEW_VALUE)
   protected void basicSetNewValue(@Retained(ENTRY_EVENT_NEW_VALUE) Object v) {
     if (v == this.newValue) return;
@@ -1003,23 +948,6 @@ public class EntryEventImpl
   public final Object getNewValue() {
     
     boolean doCopyOnRead = getRegion().isCopyOnRead();
-    try {
-      if (applyDelta(true)) {
-        @Unretained(ENTRY_EVENT_NEW_VALUE)
-        Object applied = basicGetNewValue();
-        if (applied == this.oldValue && doCopyOnRead) {
-          applied = CopyHelper.copy(applied);
-        }
-        return applied;
-      }
-    } catch (EntryNotFoundException ex) {
-      // only (broken) product code has the opportunity to call this before
-      // this.oldValue is set. If oldValue is not set yet, then
-      // we most likely haven't synchronized on the region entry yet.
-      // (If we have, then make sure oldValue is set before
-      // calling this method).
-      throw new AssertionError("too early to call getNewValue");
-    }
     Object nv = basicGetNewValue();
     if (nv != null) {
       if (nv == Token.NOT_AVAILABLE) {
@@ -1055,44 +983,9 @@ public class EntryEventImpl
     return StringUtils.forceToString(basicGetOldValue());
   }
   
-  protected boolean applyDelta(boolean throwOnNullOldValue)
-      throws EntryNotFoundException {
-    if (this.newValue != null || this.delta == null) {
-      return false;
-    }
-    if (this.oldValue == null) {
-      if (throwOnNullOldValue) {
-        // !!!:ezoerner:20080611 It would be nice if the client got this
-        // exception
-        throw new EntryNotFoundException(
-            "Cannot apply a delta without an existing value");
-      }
-      return false;
-    }
-    // swizzle BucketRegion in event for Delta.
-    // !!!:ezoerner:20090602 this is way ugly; this whole class severely
-    // needs refactoring
-    LocalRegion originalRegion = this.region;
-    try {
-      if (originalRegion instanceof BucketRegion) {
-        this.region = ((BucketRegion)this.region).getPartitionedRegion();
-      }
-      basicSetNewValue(this.delta.apply(this));
-    } finally {
-      this.region = originalRegion;
-    }
-    return true;
-  }
-
   /** Set a deserialized value */
   public final void setNewValue(@Retained(ENTRY_EVENT_NEW_VALUE) Object obj) {
-    if (obj instanceof Delta) {
-      this.delta = (Delta)obj;
-      basicSetNewValue(null);
-    }
-    else {
-      basicSetNewValue(obj);
-    }
+    basicSetNewValue(obj);
   }
 
   public TransactionId getTransactionId()
@@ -1384,34 +1277,11 @@ public class EntryEventImpl
   }
 
   /**
-   * If applyDelta is true then first attempt to apply a delta (if we have one) and return the value.
-   * Else if new value is a Delta return it.
-   * Else if new value is off-heap return the StoredObject form (unretained OFF_HEAP_REFERENCE). 
-   * Its refcount is not inced by this call and the returned object can only be safely used for the lifetime of the EntryEventImpl instance that returned the value.
-   * Else return the raw form.
-   */
-  @Unretained(ENTRY_EVENT_NEW_VALUE)
-  public final Object getRawNewValue(boolean applyDelta) {
-    if (applyDelta) {
-      boolean doCopyOnRead = getRegion().isCopyOnRead();
-      Object newValueWithDelta = applyDeltaWithCopyOnRead(doCopyOnRead);
-      if (newValueWithDelta != null) {
-        return newValueWithDelta;
-      }
-      // if applyDelta is true and we have already applied the delta then
-      // just return the applied value instead of the delta object.
-      @Unretained(ENTRY_EVENT_NEW_VALUE)
-      Object newValue = basicGetNewValue();
-      if (newValue != null) return newValue;
-    }
-    return getRawNewValue();
-  }
-  /**
    * Just like getRawNewValue(true) except if the raw new value is off-heap deserialize it.
    */
   @Unretained(ENTRY_EVENT_NEW_VALUE)
   public final Object getNewValueAsOffHeapDeserializedOrRaw() {
-    Object result = getRawNewValue(true);
+    Object result = getRawNewValue();
     if (result instanceof StoredObject) {
       result = ((StoredObject) result).getDeserializedForReading();
     }
@@ -1448,7 +1318,6 @@ public class EntryEventImpl
   }
   
   public final Object getDeserializedValue() {
-    if (this.delta == null) {
       final Object val = basicGetNewValue();
       if (val instanceof CachedDeserializable) {
         return ((CachedDeserializable)val).getDeserializedForReading();
@@ -1456,16 +1325,11 @@ public class EntryEventImpl
       else {
         return val;
       }
-    }
-    else {
-      return this.delta;
-    }
   }
 
   public final byte[] getSerializedValue() {
     if (this.newValueBytes == null) {
       final Object val;
-      if (this.delta == null) {
         val = basicGetNewValue();
         if (val instanceof byte[]) {
           return (byte[])val;
@@ -1473,10 +1337,6 @@ public class EntryEventImpl
         else if (val instanceof CachedDeserializable) {
           return ((CachedDeserializable)val).getSerializedValue();
         }
-      }
-      else {
-        val = this.delta;
-      }
       try {
         return CacheServerHelper.serialize(val);
       } catch (IOException ioe) {
@@ -1508,11 +1368,6 @@ public class EntryEventImpl
     if (isSynced) {
       this.setSerializationDeferred(false);
     }
-    else if (obj == null && this.delta != null) {
-      // defer serialization until setNewValueInRegion
-      this.setSerializationDeferred(true);
-      return;
-    }
     basicSetNewValue(getCachedDeserializable(obj, this));
   }
 
@@ -1527,12 +1382,11 @@ public class EntryEventImpl
                             || obj == Token.NOT_AVAILABLE
                             || Token.isInvalidOrRemoved(obj)
                             // don't serialize delta object already serialized
-                            || obj instanceof com.gemstone.gemfire.Delta
-                            || obj instanceof Delta) { // internal delta
+                            || obj instanceof com.gemstone.gemfire.Delta) { // internal delta
       return obj;
     }
     final CachedDeserializable cd;
-    // avoid unneeded serialization of byte[][] used by SQLFabric that
+    // avoid unneeded serialization of byte[][] that
     // will end up being deserialized in any case (serialization is cheap
     //   for byte[][] anyways)
     if (obj instanceof byte[][]) {
@@ -1567,18 +1421,7 @@ public class EntryEventImpl
   public final void setSerializedNewValue(byte[] serializedValue) {
     Object newVal = null;
     if (serializedValue != null) {
-      if (CachedDeserializableFactory.preferObject()) {
-        newVal = deserialize(serializedValue);
-      } else {
-        newVal = CachedDeserializableFactory.create(serializedValue);
-      }
-      if (newVal instanceof Delta) {
-        this.delta = (Delta)newVal;
-        newVal = null;
-        // We need the newValueBytes field and the newValue field to be in sync.
-        // In the case of non-null delta set both fields to null.
-        serializedValue = null;
-      }
+      newVal = CachedDeserializableFactory.create(serializedValue);
     }
     this.newValueBytes = serializedValue;
     basicSetNewValue(newVal);
@@ -1588,10 +1431,7 @@ public class EntryEventImpl
   public void setSerializedOldValue(byte[] serializedOldValue){
     this.oldValueBytes = serializedOldValue;
     final Object ov;
-    if (CachedDeserializableFactory.preferObject()) {
-      ov = deserialize(serializedOldValue);
-    }
-    else if (serializedOldValue != null) {
+    if (serializedOldValue != null) {
       ov = CachedDeserializableFactory.create(serializedOldValue);
     }
     else {
@@ -1705,12 +1545,6 @@ public class EntryEventImpl
     
     // put in newValue
 
-    if (applyDelta(this.op.isCreate())) {
-      if (this.isSerializationDeferred()) {
-        makeSerializedNewValue(true);
-      }
-    }
-
     // If event contains new value, then it may mean that the delta bytes should
     // not be applied. This is possible if the event originated locally.
     if (this.deltaBytes != null && this.newValue == null) {
@@ -1749,7 +1583,7 @@ public class EntryEventImpl
       basicSetNewValue(v);
     }
 
-    Object preparedV = reentry.prepareValueForCache(this.region, v, this, this.hasDelta());
+    Object preparedV = reentry.prepareValueForCache(this.region, v, this, false);
     if (preparedV != v) {
       v = preparedV;
       if (v instanceof StoredObject) {
@@ -1790,29 +1624,9 @@ public class EntryEventImpl
         }
       }
     }
-    final IndexUpdater indexUpdater = this.region.getIndexUpdater();
-    if (indexUpdater != null) {
-      final LocalRegion indexRegion;
-      if (owner != null) {
-        indexRegion = owner;
-      }
-      else {
-        indexRegion = this.region;
-      }
-      try {
-        indexUpdater.onEvent(indexRegion, this, reentry);
-        calledSetValue = true;
-        reentry.setValueWithTombstoneCheck(v, this); // already called prepareValueForCache
-        success = true;
-      } finally {
-        indexUpdater.postEvent(indexRegion, this, reentry, success);
-      }
-    }
-    else {
-      calledSetValue = true;
-      reentry.setValueWithTombstoneCheck(v, this); // already called prepareValueForCache
-      success = true;
-    }
+    calledSetValue = true;
+    reentry.setValueWithTombstoneCheck(v, this); // already called prepareValueForCache
+    success = true;
     } finally {
       if (!success && reentry instanceof OffHeapRegionEntry && v instanceof StoredObject) {
         OffHeapRegionEntryHelper.releaseEntry((OffHeapRegionEntry)reentry, (StoredObject)v);
@@ -1950,8 +1764,6 @@ public class EntryEventImpl
         // there must be a nearSidePendingValue
         processDeltaBytes(tx.getNearSidePendingValue());
         v = basicGetNewValue();
-      } else if (this.delta != null) {
-        v = this.delta;
       } else {
         v = isLocalInvalid() ? Token.LOCAL_INVALID : Token.INVALID;
       }
@@ -2053,12 +1865,6 @@ public class EntryEventImpl
   /** Return true if new value available */
   public boolean hasNewValue() {
     Object tmp = this.newValue;
-    if (tmp == null && hasDelta()) {
-      // ???:ezoerner:20080611 what if applying the delta would produce
-      // null or (strangely) NOT_AVAILABLE.. do we need to apply it here to
-      // find out?
-      return true;
-    }
     return  tmp != null && tmp != Token.NOT_AVAILABLE;
   }
 
@@ -2069,16 +1875,6 @@ public class EntryEventImpl
     return this.oldValue instanceof Token;
   }
 
-  /**
-   * This should only be used in case of internal delta and <B>not for Delta of
-   * Delta Propagation feature</B>.
-   * 
-   * @return boolean
-   */
-  public boolean hasDelta() {
-    return (this.delta != null);
-  }
-
   public boolean isOldValueAvailable() {
     if (isOriginRemote() && this.region.isProxy()) {
       return false;
@@ -2297,12 +2093,8 @@ public class EntryEventImpl
     DataSerializer.writeObject(this.txId, out);
 
     {
-      boolean isDelta = this.delta != null;
-      out.writeBoolean(isDelta);
-      if (isDelta) {
-        DataSerializer.writeObject(this.delta, out);
-      }
-      else {
+      out.writeBoolean(false);
+      {
         Object nv = basicGetNewValue();
         boolean newValueSerialized = nv instanceof CachedDeserializable;
         if (newValueSerialized) {
@@ -2422,7 +2214,6 @@ public class EntryEventImpl
   public int getNewValSizeForPR()
   {
     int newSize = 0;
-    applyDelta(false);
     Object v = basicGetNewValue();
     if (v != null) {
       try {
@@ -2664,14 +2455,6 @@ public class EntryEventImpl
     return this;
   }
 
-  public final void setContextObject(Object ctx) {
-    this.contextObj = ctx;
-  }
-
-  public final Object getContextObject() {
-    return this.contextObj;
-  }
-
   /**
    * @return the keyInfo
    */
@@ -2994,12 +2777,4 @@ public class EntryEventImpl
   public boolean isOldValueOffHeap() {
     return isOffHeapReference(this.oldValue);
   }
-
-  public final boolean isPutDML() {
-    return this.isPutDML;
-  }
-
-  public final void setPutDML(boolean val) {
-    this.isPutDML = val;
-  }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/880f8648/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/EntryOperationImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/EntryOperationImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/EntryOperationImpl.java
index 16215ac..4b757fb 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/EntryOperationImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/EntryOperationImpl.java
@@ -38,7 +38,7 @@ public class EntryOperationImpl implements EntryOperation {
 
   private final Object key;
 
-  private Object callbackArgument = Token.NOT_AVAILABLE;
+  private final Object callbackArgument;
 
   public EntryOperationImpl(Region region, Operation operation, Object key,
       Object value, Object callbackArgument) {
@@ -102,17 +102,4 @@ public class EntryOperationImpl implements EntryOperation {
   public Object getRawNewValue() {
     return this.value;
   }
-
-  /**
-   * Method for internal use. (Used by SQLFabric)
-   */
-  public void setCallbackArgument(Object newCallbackArgument) {
-    if (this.callbackArgument instanceof WrappedCallbackArgument) {
-      ((WrappedCallbackArgument)this.callbackArgument)
-          .setOriginalCallbackArgument(newCallbackArgument);
-    }
-    else {
-      this.callbackArgument = newCallbackArgument;
-    }
-  }
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/880f8648/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/GemFireCacheImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/GemFireCacheImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/GemFireCacheImpl.java
index 5355a2b..186ebbc 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/GemFireCacheImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/GemFireCacheImpl.java
@@ -17,7 +17,69 @@
 
 package com.gemstone.gemfire.internal.cache;
 
-import com.gemstone.gemfire.*;
+import java.io.BufferedReader;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.OutputStream;
+import java.io.OutputStreamWriter;
+import java.io.PrintStream;
+import java.io.Reader;
+import java.io.StringBufferInputStream;
+import java.io.StringWriter;
+import java.io.Writer;
+import java.net.InetSocketAddress;
+import java.net.URL;
+import java.net.UnknownHostException;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Properties;
+import java.util.ServiceLoader;
+import java.util.Set;
+import java.util.TreeMap;
+import java.util.concurrent.ArrayBlockingQueue;
+import java.util.concurrent.CancellationException;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentMap;
+import java.util.concurrent.CopyOnWriteArrayList;
+import java.util.concurrent.CopyOnWriteArraySet;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.Executor;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.Future;
+import java.util.concurrent.LinkedBlockingQueue;
+import java.util.concurrent.RejectedExecutionException;
+import java.util.concurrent.ThreadFactory;
+import java.util.concurrent.ThreadPoolExecutor;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.atomic.AtomicInteger;
+import java.util.concurrent.atomic.AtomicReference;
+
+import javax.naming.Context;
+
+import org.apache.logging.log4j.Logger;
+
+import com.gemstone.gemfire.CancelCriterion;
+import com.gemstone.gemfire.CancelException;
+import com.gemstone.gemfire.ForcedDisconnectException;
+import com.gemstone.gemfire.GemFireCacheException;
+import com.gemstone.gemfire.InternalGemFireError;
+import com.gemstone.gemfire.LogWriter;
+import com.gemstone.gemfire.SystemFailure;
 import com.gemstone.gemfire.admin.internal.SystemMemberCacheEventProcessor;
 import com.gemstone.gemfire.cache.*;
 import com.gemstone.gemfire.cache.TimeoutException;
@@ -107,19 +169,6 @@ import com.gemstone.gemfire.pdx.internal.TypeRegistry;
 import com.gemstone.gemfire.redis.GemFireRedisServer;
 import com.sun.jna.Native;
 import com.sun.jna.Platform;
-import org.apache.logging.log4j.Logger;
-
-import javax.naming.Context;
-import java.io.*;
-import java.net.InetSocketAddress;
-import java.net.URL;
-import java.net.UnknownHostException;
-import java.util.*;
-import java.util.Map.Entry;
-import java.util.concurrent.*;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicInteger;
-import java.util.concurrent.atomic.AtomicReference;
 
 // @todo somebody Come up with more reasonable values for {@link #DEFAULT_LOCK_TIMEOUT}, etc.
 /**
@@ -414,18 +463,6 @@ public class GemFireCacheImpl implements InternalCache, ClientCache, HasCachePer
 
   private volatile boolean isShutDownAll = false;
 
-  /**
-   * Set of members that are not yet ready. Currently used by SQLFabric during initial DDL replay to indicate that the
-   * member should not be chosen for primary buckets.
-   */
-  private final HashSet<InternalDistributedMember> unInitializedMembers = new HashSet<InternalDistributedMember>();
-
-  /**
-   * Set of {@link BucketAdvisor}s for this node that are pending for volunteer for primary due to uninitialized node
-   * (SQLFabric DDL replay in progress).
-   */
-  private final LinkedHashSet<BucketAdvisor> deferredVolunteerForPrimary = new LinkedHashSet<BucketAdvisor>();
-
   private final ResourceAdvisor resourceAdvisor;
   private final JmxManagerAdvisor jmxAdvisor;
 
@@ -4911,76 +4948,6 @@ public class GemFireCacheImpl implements InternalCache, ClientCache, HasCachePer
     return this.regionsInDestroy.get(path);
   }
 
-  /**
-   * Mark a node as initialized or not initialized. Used by SQLFabric to avoid creation of buckets or routing of
-   * operations/functions on a node that is still in the DDL replay phase.
-   */
-  public boolean updateNodeStatus(InternalDistributedMember member, boolean initialized) {
-    HashSet<BucketAdvisor> advisors = null;
-    synchronized (this.unInitializedMembers) {
-      if (initialized) {
-        if (this.unInitializedMembers.remove(member)) {
-          if (member.equals(getMyId())) {
-            // don't invoke volunteerForPrimary() inside the lock since
-            // BucketAdvisor will also require the lock after locking itself
-            advisors = new HashSet<BucketAdvisor>(this.deferredVolunteerForPrimary);
-            this.deferredVolunteerForPrimary.clear();
-          }
-        } else {
-          return false;
-        }
-      } else {
-        return this.unInitializedMembers.add(member);
-      }
-    }
-    if (advisors != null) {
-      for (BucketAdvisor advisor : advisors) {
-        if (logger.isDebugEnabled()) {
-          logger.debug("Invoking volunteer for primary for deferred bucket " + "post SQLFabric DDL replay for BucketAdvisor: {}",  advisor);
-        }
-        advisor.volunteerForPrimary();
-      }
-    }
-    return true;
-  }
-
-  /**
-   * Return true if this node is still not initialized else false.
-   */
-  public boolean isUnInitializedMember(InternalDistributedMember member) {
-    synchronized (this.unInitializedMembers) {
-      return this.unInitializedMembers.contains(member);
-    }
-  }
-
-  /**
-   * Return false for volunteer primary if this node is not currently initialized. Also adds the {@link BucketAdvisor}
-   * to a list that will be replayed once this node is initialized.
-   */
-  public boolean doVolunteerForPrimary(BucketAdvisor advisor) {
-    synchronized (this.unInitializedMembers) {
-      if (!this.unInitializedMembers.contains(getMyId())) {
-        return true;
-      }
-      if (logger.isDebugEnabled()) {
-        logger.debug("Deferring volunteer for primary due to uninitialized " + "node (SQLFabric DDL replay) for BucketAdvisor: {}", advisor);
-      }
-      this.deferredVolunteerForPrimary.add(advisor);
-      return false;
-    }
-  }
-
-  /**
-   * Remove all the uninitialized members from the given collection.
-   */
-  public final void removeUnInitializedMembers(Collection<InternalDistributedMember> members) {
-    synchronized (this.unInitializedMembers) {
-      for (final InternalDistributedMember m : this.unInitializedMembers) {
-        members.remove(m);
-      }
-    }
-  }
-
   public TombstoneService getTombstoneService() {
     return this.tombstoneService;
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/880f8648/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/GridAdvisor.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/GridAdvisor.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/GridAdvisor.java
index ec5fc4e..ff7dea1 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/GridAdvisor.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/GridAdvisor.java
@@ -249,7 +249,7 @@ public abstract class GridAdvisor extends DistributionAdvisor {
     private String host;
 
     /**
-     * SQLFabric uses a negative port value when creating a fake profile meant
+     * a negative port value is used when creating a fake profile meant
      * to only gather information about all available locators.
      */
     private int port;
@@ -308,7 +308,7 @@ public abstract class GridAdvisor extends DistributionAdvisor {
         if(advisee != null && advisee.getProfile().equals(this)) {
           continue;
         }
-        // negative value for port used by SQLFabric to indicate fake profile
+        // negative value for port indicates fake profile
         // meant to only gather remote profiles during profile exchange
         if (this.port > 0) {
           handleDistributionAdvisee(advisee, removeProfile, exchangeProfiles,
@@ -337,7 +337,7 @@ public abstract class GridAdvisor extends DistributionAdvisor {
             if(bsi.getProfile().equals(this)) {
               continue;
             }
-            // negative value for port used by SQLFabric to indicate fake
+            // negative value for port indicates fake
             // profile meant to only gather remote profiles during profile
             // exchange
             if (this.port > 0) {



Mime
View raw message