geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kl...@apache.org
Subject [10/17] incubator-geode git commit: GEODE-1464: remove sqlf code
Date Tue, 07 Jun 2016 21:53:09 GMT
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/880f8648/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/RemoteRemoveAllMessage.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/RemoteRemoveAllMessage.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/RemoteRemoveAllMessage.java
index 2d5989b..da60a98 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/RemoteRemoveAllMessage.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/RemoteRemoveAllMessage.java
@@ -267,10 +267,6 @@ public final class RemoteRemoveAllMessage extends RemoteOperationMessageWithDire
       EntryVersionsList versionTags = new EntryVersionsList(removeAllDataCount);
 
       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.removeAllDataCount; i++) {
         if (!hasTags && removeAllData[i].versionTag != null) {
           hasTags = true;
@@ -278,7 +274,7 @@ public final class RemoteRemoveAllMessage extends RemoteOperationMessageWithDire
         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/SearchLoadAndWriteProcessor.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/SearchLoadAndWriteProcessor.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/SearchLoadAndWriteProcessor.java
index bd19104..4f49ccf 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/SearchLoadAndWriteProcessor.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/SearchLoadAndWriteProcessor.java
@@ -1898,9 +1898,6 @@ public class SearchLoadAndWriteProcessor implements MembershipListener {
           setClearCountReference(region);		
 	  try {
 	    boolean initialized = region.isInitialized();
-	    if(region.keyRequiresRegionContext()) {
-	      ((KeyWithRegionContext)this.key).setRegionContext(region);
-	    }
             RegionEntry entry = region.basicGetEntry(this.key);
             if (entry != null) {
               synchronized (entry) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/880f8648/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/TXEntry.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/TXEntry.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/TXEntry.java
index 2cc6681..317f4e6 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/TXEntry.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/TXEntry.java
@@ -56,17 +56,6 @@ public class TXEntry implements Region.Entry
     this.keyInfo = key;
     this.myTX = tx;
     this.rememberReads = rememberReads;
-    
-    //Assert that these contructors are invoked only 
-    // via factory path. I am not able to make them private
-    // because SqlfabricTxEntry needs extending TxEntry
-    /*if(logger.isDebugEnabled()) {
-      StackTraceElement[] traces =Thread.currentThread().getStackTrace();
-      //The third element should be the factory one
-      StackTraceElement trace = traces[2];
-      Assert.assertTrue(TxEntryFactory.class.isAssignableFrom(trace.getClass()));
-      Assert.assertTrue(trace.getMethodName().equals("createEntry"));
-    }*/
   }
 
   public boolean isLocal() {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/880f8648/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/TXEntryState.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/TXEntryState.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/TXEntryState.java
index f392f04..c6caefa 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/TXEntryState.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/TXEntryState.java
@@ -24,7 +24,6 @@ import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedM
 import com.gemstone.gemfire.internal.Assert;
 import com.gemstone.gemfire.internal.DataSerializableFixedID;
 import com.gemstone.gemfire.internal.Version;
-import com.gemstone.gemfire.internal.cache.delta.Delta;
 import com.gemstone.gemfire.internal.cache.versions.VersionTag;
 import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
 import com.gemstone.gemfire.internal.lang.StringUtils;
@@ -82,10 +81,6 @@ public class TXEntryState implements Releasable
    */
   private int nearSideEventOffset = -1;
 
-  //Asif: In case of Sqlfabric, the pending value may be a SerializableDelta object 
-  //which may be containing base value ( in case of Tx create) along with bunch 
-  //of incremental deltas, so for correct behaviour this field should be accessed only 
-  //by its getter. Do not use it directly  
   private Object pendingValue;
   
   /**
@@ -290,24 +285,12 @@ public class TXEntryState implements Releasable
   }
 
   public Object getOriginalValue() {
-    Object value = this.originalValue;
-    
-    if(value instanceof Delta) {
-      value = ((Delta) value).getResultantValue();
-    }
-    
-    return value;
+    return this.originalValue;
   }
 
   public Object getPendingValue()
   {
-    Object value = this.pendingValue;
-    
-    if(value instanceof Delta) {
-      value = ((Delta) value).getResultantValue();
-    }
-    
-    return value;
+    return this.pendingValue;
   }
   
   public Object getCallbackArgument()
@@ -335,12 +318,7 @@ public class TXEntryState implements Releasable
 
   void setPendingValue(Object pv)
   {
-    if(pv instanceof Delta) {
-      Object toMerge = this.pendingValue;      
-      this.pendingValue = ((Delta)pv).merge(toMerge, this.op == OP_CREATE);
-    }else {
-      this.pendingValue = pv;
-    }
+    this.pendingValue = pv;
   }
   
   void setCallbackArgument(Object callbackArgument)
@@ -2001,9 +1979,6 @@ public class TXEntryState implements Releasable
         valueBytes = (byte[])v;
       }
       else {
-        // this value shouldn't be a Delta
-        Assert.assertTrue(!(v instanceof Delta));
-    
         deserializationPolicy = DistributedCacheOperation.DESERIALIZATION_POLICY_LAZY;
         valueBytes = EntryEventImpl.serialize(v);
       }
@@ -2076,7 +2051,6 @@ public class TXEntryState implements Releasable
   }
   
 
-  // Asif:Add for sql fabric as it has to plug in its own TXEntry object
   private final static TXEntryStateFactory factory = new TXEntryStateFactory() {
 
     public TXEntryState createEntry()

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/880f8648/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/TXRegionLockRequestImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/TXRegionLockRequestImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/TXRegionLockRequestImpl.java
index 6d997c7..6327ed7 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/TXRegionLockRequestImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/TXRegionLockRequestImpl.java
@@ -104,24 +104,17 @@ public class TXRegionLockRequestImpl
     final GemFireCacheImpl cache = getCache(false);
     try {
       final int size = InternalDataSerializer.readArrayLength(in);
-      boolean read = false;
       if (cache != null && size > 0) {
         this.r = (LocalRegion)cache.getRegion(this.regionPath);
-        if( this.r != null ) {
-          this.entryKeys = readEntryKeySet(this.r.keyRequiresRegionContext(), size, in);
-          read = true;
-        }
-      }
-      if ( !read && size > 0 ) {
-        this.entryKeys = readEntryKeySet(false, size, in);
       }
+      this.entryKeys = readEntryKeySet(size, in);
     } catch (CacheClosedException cce) {
       // don't throw in deserialization
       this.entryKeys = null;
     }
   }
   
-  private final Set<Object> readEntryKeySet(final boolean keyRequiresRegionContext,
+  private final Set<Object> readEntryKeySet(
       final int size, final DataInput in) throws IOException,
       ClassNotFoundException {
 
@@ -133,9 +126,6 @@ public class TXRegionLockRequestImpl
     Object key;
     for (int i = 0; i < size; i++) {
       key = DataSerializer.readObject(in);
-      if (keyRequiresRegionContext) {
-        ((KeyWithRegionContext)key).setRegionContext(this.r);
-      }
       set.add(key);
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/880f8648/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/TXRegionState.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/TXRegionState.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/TXRegionState.java
index 19cbe33..479beb2 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/TXRegionState.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/TXRegionState.java
@@ -524,12 +524,7 @@ public class TXRegionState {
     return changes;
   }
   
-  public Map<Object,TXEntryState> getEntriesInTxForSqlFabric() {
-    return Collections.unmodifiableMap(this.entryMods);
-  }
-
   public TXState getTXState() {
-    // TODO Auto-generated method stub
     return txState;
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/880f8648/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/TXState.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/TXState.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/TXState.java
index 0ce049d..c42f63c 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/TXState.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/TXState.java
@@ -1325,13 +1325,10 @@ public class TXState implements TXStateInterface {
    * @param rememberRead true if the value read from committed state
    *   needs to be remembered in tx state for repeatable read.
    * @param createIfAbsent should a transactional entry be created if not present. 
-   *        Used by sql fabric system
    * @return a txEntryState or null if the entry doesn't exist in the transaction and/or committed state. 
    */
   public TXEntryState txReadEntry(KeyInfo keyInfo, LocalRegion localRegion,
       boolean rememberRead, boolean createIfAbsent) {
-    // EntryNotFoundException can be expected in case of sqlfabric and should
-    // not be caught.
     localRegion.cache.getCancelCriterion().checkCancelInProgress(null);
     return txReadEntry(keyInfo, localRegion, rememberRead, null, createIfAbsent);
   }
@@ -1764,7 +1761,7 @@ public class TXState implements TXStateInterface {
 //	        final boolean requiresRegionContext = theRegion.keyRequiresRegionContext();
 	        InternalDistributedMember myId = theRegion.getDistributionManager().getDistributionManagerId();
 	        for (int i = 0; i < putallOp.putAllDataSize; ++i) {
-	          @Released EntryEventImpl ev = PutAllPRMessage.getEventFromEntry(theRegion, myId,myId, i, putallOp.putAllData, false, putallOp.getBaseEvent().getContext(), false, !putallOp.getBaseEvent().isGenerateCallbacks(), false);
+	          @Released EntryEventImpl ev = PutAllPRMessage.getEventFromEntry(theRegion, myId,myId, i, putallOp.putAllData, false, putallOp.getBaseEvent().getContext(), false, !putallOp.getBaseEvent().isGenerateCallbacks());
 	          try {
 	          ev.setPutAllOperation(putallOp);
 	          if (theRegion.basicPut(ev, false, false, null, false)) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/880f8648/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/TXStateInterface.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/TXStateInterface.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/TXStateInterface.java
index ffcae4b..865ebd5 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/TXStateInterface.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/TXStateInterface.java
@@ -146,7 +146,6 @@ public interface TXStateInterface extends Synchronization, InternalDataView {
    * @param rememberRead true if the value read from committed state
    *   needs to be remembered in tx state for repeatable read.
    * @param  createTxEntryIfAbsent should a transactional entry be created if not present. 
-   *        Used by sqlfabric system
    * @return a txEntryState or null if the entry doesn't exist in the transaction and/or committed state. 
    */
   public TXEntryState txReadEntry(KeyInfo entryKey, LocalRegion localRegion, boolean rememberRead

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/880f8648/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/UpdateAttributesProcessor.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/UpdateAttributesProcessor.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/UpdateAttributesProcessor.java
index ceb98f0..9754ab9 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/UpdateAttributesProcessor.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/UpdateAttributesProcessor.java
@@ -369,14 +369,7 @@ public class UpdateAttributesProcessor {
       // set the processor ID to be able to send reply to sender in case of any
       // unexpected exception during deserialization etc.
       ReplyProcessor21.setMessageRPId(this.processorId);
-      try {
-        this.profile = DataSerializer.readObject(in);
-      } catch (DSFIDFactory.SqlfSerializationException ex) {
-        // Ignore SQLFabric serialization errors and reply with nothing.
-        // This can happen even during normal startup of all SQLFabric VMs
-        // when DS connect is complete but SQLFabric boot is still in progress.
-        this.profile = null;
-      }
+      this.profile = DataSerializer.readObject(in);
       this.exchangeProfiles = in.readBoolean();
       this.removeProfile = in.readBoolean();
     }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/880f8648/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/UpdateEntryVersionOperation.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/UpdateEntryVersionOperation.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/UpdateEntryVersionOperation.java
index fce4dee..23fb300 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/UpdateEntryVersionOperation.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/UpdateEntryVersionOperation.java
@@ -94,11 +94,6 @@ public class UpdateEntryVersionOperation extends DistributedCacheOperation {
     @Retained
     protected InternalCacheEvent createEvent(DistributedRegion rgn)
         throws EntryNotFoundException {
-      
-      if (rgn.keyRequiresRegionContext()) {
-        ((KeyWithRegionContext)this.key).setRegionContext(rgn);
-      }
-      
       @Retained EntryEventImpl ev = EntryEventImpl.create(rgn, getOperation(), this.key,
          null /* newValue */, this.callbackArg /*callbackArg*/, true /* originRemote*/ , getSender(), false /*generateCallbacks*/);
       ev.setEventId(this.eventId);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/880f8648/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/UpdateOperation.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/UpdateOperation.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/UpdateOperation.java
index 730d6d7..e60cda3 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/UpdateOperation.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/UpdateOperation.java
@@ -100,11 +100,7 @@ public class UpdateOperation extends AbstractUpdateOperation
     m.event = ev;
     m.eventId = ev.getEventId();
     m.key = ev.getKey();
-    if (CachedDeserializableFactory.preferObject() || ev.hasDelta()) {
-      m.deserializationPolicy = DESERIALIZATION_POLICY_EAGER;
-    } else {
-      m.deserializationPolicy = DESERIALIZATION_POLICY_LAZY;
-    }
+    m.deserializationPolicy = DESERIALIZATION_POLICY_LAZY;
     ev.exportNewValue(m);
   }
 
@@ -297,8 +293,7 @@ public class UpdateOperation extends AbstractUpdateOperation
      */
     static void setNewValueInEvent(byte[] newValue, Object newValueObj,
         EntryEventImpl event, byte deserializationPolicy) {
-      if (newValue == null
-          && deserializationPolicy != DESERIALIZATION_POLICY_EAGER) {
+      if (newValue == null) {
         // in an UpdateMessage this results from a create(key, null) call,
         // set local invalid flag in event if this is a normal region. Otherwise
         // it should be a distributed invalid.
@@ -317,9 +312,6 @@ public class UpdateOperation extends AbstractUpdateOperation
         case DESERIALIZATION_POLICY_NONE:
           event.setNewValue(newValue);
           break;
-        case DESERIALIZATION_POLICY_EAGER:
-          event.setNewValue(newValueObj);
-          break;
         default:
           throw new InternalGemFireError(LocalizedStrings
               .UpdateOperation_UNKNOWN_DESERIALIZATION_POLICY_0
@@ -332,10 +324,6 @@ public class UpdateOperation extends AbstractUpdateOperation
     {
       Object argNewValue = null;
       final boolean originRemote = true, generateCallbacks = true;
-
-      if (rgn.keyRequiresRegionContext()) {
-        ((KeyWithRegionContext)this.key).setRegionContext(rgn);
-      }
       @Retained EntryEventImpl result = EntryEventImpl.create(rgn, getOperation(), this.key,
           argNewValue, // oldValue,
           this.callbackArg, originRemote, getSender(), generateCallbacks);
@@ -413,13 +401,7 @@ public class UpdateOperation extends AbstractUpdateOperation
         this.deltaBytes = DataSerializer.readByteArray(in);
       }
       else {
-        if (this.deserializationPolicy
-            == DistributedCacheOperation.DESERIALIZATION_POLICY_EAGER) {
-          this.newValueObj = DataSerializer.readObject(in);
-        }
-        else {
-          this.newValue = DataSerializer.readByteArray(in);
-        }
+        this.newValue = DataSerializer.readByteArray(in);
         if ((extraFlags & HAS_DELTA_WITH_FULL_VALUE) != 0) {
           this.deltaBytes = DataSerializer.readByteArray(in);
         }
@@ -500,13 +482,7 @@ public class UpdateOperation extends AbstractUpdateOperation
       byte[] valueBytes = null;
       Object valueObj = null;
       if (this.newValueObj != null) {
-        if (this.deserializationPolicy ==
-          DistributedCacheOperation.DESERIALIZATION_POLICY_EAGER) {
-          valueObj = this.newValueObj;
-        }
-        else {
-          valueBytes = EntryEventImpl.serialize(this.newValueObj);
-        }
+        valueBytes = EntryEventImpl.serialize(this.newValueObj);
       }
       else {
         valueBytes = this.newValue;
@@ -576,10 +552,6 @@ public class UpdateOperation extends AbstractUpdateOperation
       // boolean localLoad = false, netLoad = false, netSearch = false,
       // distributed = true;
       final boolean originRemote = true, generateCallbacks = true;
-
-      if (rgn.keyRequiresRegionContext()) {
-        ((KeyWithRegionContext)this.key).setRegionContext(rgn);
-      }
       @Retained EntryEventImpl ev = EntryEventImpl.create(rgn, getOperation(), this.key,
           argNewValue, this.callbackArg, originRemote, getSender(),
           generateCallbacks);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/880f8648/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/ValidatingDiskRegion.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/ValidatingDiskRegion.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/ValidatingDiskRegion.java
index 32abd68..edf3316 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/ValidatingDiskRegion.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/ValidatingDiskRegion.java
@@ -173,9 +173,6 @@ public class ValidatingDiskRegion extends DiskRegion implements DiskRecoveryStor
     public void handleValueOverflow(RegionEntryContext context) {throw new IllegalStateException("should never be called");}
     
     @Override
-    public void afterValueOverflow(RegionEntryContext context) {throw new IllegalStateException();}
-    
-    @Override
     public Object prepareValueForCache(RegionEntryContext r, Object val, boolean isEntryUpdate) {
       throw new IllegalStateException("Should never be called");
     }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/880f8648/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/WrappedCallbackArgument.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/WrappedCallbackArgument.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/WrappedCallbackArgument.java
index 7d5b255..93fc533 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/WrappedCallbackArgument.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/WrappedCallbackArgument.java
@@ -40,12 +40,6 @@ public abstract class WrappedCallbackArgument {
    */
   private Object _originalCallbackArg;
   
-  /** If the GatewayEvent is in a Sql Fabric started Hub, in which case
-   * the original callback argument is not serialized
-   * 
-   */
-   private boolean serializeCallbackArg = true; 
-
   /**
    * No arg constructor for DataSerializable.
    */
@@ -57,20 +51,6 @@ public abstract class WrappedCallbackArgument {
    *
    * @param originalCallbackArg The original callback argument set by the
    * caller or null if there was not callback arg
-   * @param serializeCBArg  boolean indicating if the event is created by a 
-   * sql fabric system
-   */
-  public WrappedCallbackArgument(Object originalCallbackArg, boolean serializeCBArg) {
-    this._originalCallbackArg = originalCallbackArg;
-    this.serializeCallbackArg = serializeCBArg;
-  }
- 
-  
-  /**
-   * Constructor.
-   *
-   * @param originalCallbackArg The original callback argument set by the
-   * caller or null if there was not callback arg
    */
   public WrappedCallbackArgument(Object originalCallbackArg) {
     this._originalCallbackArg = originalCallbackArg;    
@@ -86,11 +66,7 @@ public abstract class WrappedCallbackArgument {
   }
 
   public void toData(DataOutput out) throws IOException {
-    if(this.serializeCallbackArg) {
-      DataSerializer.writeObject(this._originalCallbackArg, out);
-    }else {
-      DataSerializer.writeObject(null, out);      
-    }
+    DataSerializer.writeObject(this._originalCallbackArg, out);
   }
 
   public void fromData(DataInput in) throws IOException, ClassNotFoundException {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/880f8648/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/delta/Delta.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/delta/Delta.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/delta/Delta.java
deleted file mode 100644
index 27d02c4..0000000
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/delta/Delta.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.gemstone.gemfire.internal.cache.delta;
-
-import com.gemstone.gemfire.cache.EntryEvent;
-
-/**
- * Represents changes to apply to a region entry instead of a new value.
- * A Delta is passed as the new value in a put operation on a Region
- * and knows how to apply itself to an old value.
- *
- * Internal Note: When an update message carries a Delta as a payload,
- * it makes sure it gets deserialized before being put into the region.
- *
- * @since GemFire 5.5
- * @see com.gemstone.gemfire.internal.cache.UpdateOperation
- */
-public interface Delta {
-
-  /**
-   * Apply delta to the old value from the provided EntryEvent.
-   * If the delta cannot be applied for any reason then an (unchecked)
-   * exception should be thrown. If the put is being applied in a
-   * distributed-ack scope, then the exception will be propagated back
-   * to the originating put call, but will not necessarily cause puts
-   * in other servers to fail.
-   *
-   * @param putEvent the EntryEvent for the put operation, from which
-   * the old value can be obtained (as well as other information such
-   * as the key and region being operated on)
-   *
-   * @return the new value to be put into the region
-   */
-  Object apply(EntryEvent<?, ?> putEvent);
-
-  Object merge(Object toMerge, boolean isCreate);
-
-  Object merge(Object toMerge);
-
-  Object getResultantValue();
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/880f8648/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/execute/AbstractExecution.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/execute/AbstractExecution.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/execute/AbstractExecution.java
index 7b7c34d..fefc1c1 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/execute/AbstractExecution.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/execute/AbstractExecution.java
@@ -159,7 +159,6 @@ public abstract class AbstractExecution implements InternalExecution {
   }
   
   protected AbstractExecution() {
-    this.hasRoutingObjects = false;
   }
 
   protected AbstractExecution(AbstractExecution ae) {
@@ -173,7 +172,6 @@ public abstract class AbstractExecution implements InternalExecution {
       this.memberMappedArg = ae.memberMappedArg;
     }
     this.isMemberMappedArgument = ae.isMemberMappedArgument;
-    this.hasRoutingObjects = ae.hasRoutingObjects;
     this.isClientServerMode = ae.isClientServerMode;
     if (ae.proxyCache != null) {
       this.proxyCache = ae.proxyCache;
@@ -211,26 +209,10 @@ public abstract class AbstractExecution implements InternalExecution {
     return this.rc;
   }
 
-  public AbstractExecution withRoutingObjects(Set<Object> routingObjects) {
-    if (routingObjects == null) {
-      throw new FunctionException(
-          LocalizedStrings.FunctionService_ROUTING_OBJECTS_SET_IS_NULL
-              .toLocalizedString());
-    }
-    this.filter.clear();
-    this.filter.addAll(routingObjects);
-    this.hasRoutingObjects = true;
-    return this;
-  }
-
   public Set getFilter() {
     return this.filter;
   }
 
-  public boolean hasRoutingObjects() {
-    return this.hasRoutingObjects;
-  }
-
   public AbstractExecution setIsReExecute() {
     this.isReExecute = true;
     if (this.executionNodesListener != null) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/880f8648/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/execute/FunctionStreamingResultCollector.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/execute/FunctionStreamingResultCollector.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/execute/FunctionStreamingResultCollector.java
index 3874ad9..7ed908e 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/execute/FunctionStreamingResultCollector.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/execute/FunctionStreamingResultCollector.java
@@ -96,8 +96,7 @@ public class FunctionStreamingResultCollector extends ReplyProcessor21 implement
     this.execution = execution;
     this.fites = Collections.synchronizedList(new ArrayList<FunctionInvocationTargetException>());
     // add a reference to self inside the ResultCollector, if required, to avoid
-    // this ReplyProcessor21 from being GCed; currently is of use for SQLFabric
-    // result collectors to properly implement streaming
+    // this ReplyProcessor21 from being GCed
     if (rc instanceof LocalResultCollector<?, ?>) {
       ((LocalResultCollector<?, ?>)rc).setProcessor(this);
     }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/880f8648/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/execute/InternalExecution.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/execute/InternalExecution.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/execute/InternalExecution.java
index 5ffd72d..81944ef 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/execute/InternalExecution.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/execute/InternalExecution.java
@@ -25,7 +25,7 @@ import com.gemstone.gemfire.cache.execute.FunctionService;
 import com.gemstone.gemfire.cache.execute.ResultCollector;
 
 /**
- * Internal interface for SQLFabric. It has internal methods specific for SQLFabric
+ * Internal interface that adds some internal methods to the Execution interface.
  * 
  * @since GemFire 5.8LA
  * 
@@ -36,31 +36,6 @@ public interface InternalExecution extends Execution {
       MemberMappedArgument argument); 
 
   /**
-   * Specifies a data filter of routing objects for selecting the GemFire
-   * members to execute the function that are not GemFire keys rather routing
-   * objects as determined by resolver. Currently used by SQL fabric for passing
-   * routing objects obtained from the custom resolvers.
-   * <p>
-   * If the set is empty the function is executed on all members that have the
-   * {@linkplain FunctionService#onRegion(com.gemstone.gemfire.cache.Region)
-   * region defined}.
-   * </p>
-   * 
-   * @param routingObjects
-   *          Set defining the routing objects to be used for executing the
-   *          function.
-   * 
-   * @return an Execution with the routing objects
-   * 
-   * @throws IllegalArgumentException
-   *           if the set of routing objects passed is null.
-   * @throws UnsupportedOperationException
-   *           if not called after
-   *           {@link FunctionService#onRegion(com.gemstone.gemfire.cache.Region)}
-   */
-  public InternalExecution withRoutingObjects(Set<Object> routingObjects);
-  
-  /**
    * Specifies a  filter of bucketIDs for selecting the GemFire
    * members to execute the function on.
    * <p>

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/880f8648/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/execute/InternalFunctionService.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/execute/InternalFunctionService.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/execute/InternalFunctionService.java
index 54e03c7..f0ed757 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/execute/InternalFunctionService.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/execute/InternalFunctionService.java
@@ -31,7 +31,7 @@ import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
 
 /**
  * 
- * Provides internal methods for sqlFabric product
+ * Provides internal methods for tests
  * 
  * 
  * @since GemFire 6.1

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/880f8648/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/execute/InternalRegionFunctionContext.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/execute/InternalRegionFunctionContext.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/execute/InternalRegionFunctionContext.java
index 2234925..90ad79c 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/execute/InternalRegionFunctionContext.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/execute/InternalRegionFunctionContext.java
@@ -30,11 +30,6 @@ import com.gemstone.gemfire.internal.cache.LocalDataSet;
 /**
  * Internal interface used to provide for some essential functionality for
  * {@link RegionFunctionContext} invoked by {@link PartitionRegionHelper}.
- * SQLFabric provides its own implementation when using function messages
- * instead of {@link Function}s so {@link PartitionRegionHelper} should not
- * depend on casting to {@link RegionFunctionContextImpl} directly rather should
- * use this interface.
- * 
  */
 public interface InternalRegionFunctionContext extends RegionFunctionContext {
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/880f8648/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/execute/MemberFunctionExecutor.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/execute/MemberFunctionExecutor.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/execute/MemberFunctionExecutor.java
index ac628a0..3912245 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/execute/MemberFunctionExecutor.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/execute/MemberFunctionExecutor.java
@@ -239,13 +239,6 @@ public class MemberFunctionExecutor extends AbstractExecution {
             .toLocalizedString("bucket as filter"));
   }
 
-  @Override
-  public AbstractExecution withRoutingObjects(Set<Object> routingObjects) {
-    throw new FunctionException(
-        LocalizedStrings.ExecuteFunction_CANNOT_SPECIFY_0_FOR_DATA_INDEPENDENT_FUNCTIONS
-            .toLocalizedString("routing objects"));
-  }
-
   public InternalExecution withMemberMappedArgument(
       MemberMappedArgument argument) {
     if(argument == null){

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/880f8648/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/execute/MultiRegionFunctionExecutor.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/execute/MultiRegionFunctionExecutor.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/execute/MultiRegionFunctionExecutor.java
index 1929169..a9f933a 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/execute/MultiRegionFunctionExecutor.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/execute/MultiRegionFunctionExecutor.java
@@ -182,13 +182,6 @@ public class MultiRegionFunctionExecutor extends AbstractExecution {
   }
 
   @Override
-  public AbstractExecution withRoutingObjects(Set<Object> routingObjects) {
-    throw new FunctionException(
-        LocalizedStrings.ExecuteFunction_CANNOT_SPECIFY_0_FOR_ONREGIONS_FUNCTION
-            .toLocalizedString("routing objects"));
-  }
-
-  @Override
   protected ResultCollector executeFunction(Function function) {
     if (function.hasResult()) {
       ResultCollector rc = this.rc;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/880f8648/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/execute/RegionFunctionContextImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/execute/RegionFunctionContextImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/execute/RegionFunctionContextImpl.java
index 15d39c9..302b24e 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/execute/RegionFunctionContextImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/execute/RegionFunctionContextImpl.java
@@ -26,9 +26,7 @@ import com.gemstone.gemfire.cache.Region;
 import com.gemstone.gemfire.cache.execute.Execution;
 import com.gemstone.gemfire.cache.execute.FunctionService;
 import com.gemstone.gemfire.cache.execute.ResultSender;
-import com.gemstone.gemfire.internal.cache.KeyWithRegionContext;
 import com.gemstone.gemfire.internal.cache.LocalDataSet;
-import com.gemstone.gemfire.internal.cache.LocalRegion;
 
 /**
  * Context available to data dependent functions. When function is executed
@@ -67,17 +65,6 @@ public class RegionFunctionContextImpl extends FunctionContextImpl implements
     this.localBucketSet = localBucketSet;
     this.isPossibleDuplicate = isPossibleDuplicate;
     setFunctionContexts();
-    // set the region context for keys if required
-    if (routingObjects != null) {
-      final LocalRegion r = (LocalRegion)this.dataSet;
-      if (r.keyRequiresRegionContext()) {
-        for (Object key : routingObjects) {
-          if (key instanceof KeyWithRegionContext) {
-            ((KeyWithRegionContext)key).setRegionContext(r);
-          }
-        }
-      }
-    }
   }
 
   private void setFunctionContexts() {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/880f8648/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/execute/ServerFunctionExecutor.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/execute/ServerFunctionExecutor.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/execute/ServerFunctionExecutor.java
index 9c06bf6..d821b32 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/execute/ServerFunctionExecutor.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/execute/ServerFunctionExecutor.java
@@ -266,13 +266,6 @@ public class ServerFunctionExecutor extends AbstractExecution {
             .toLocalizedString("buckets as filter"));
   }
 
-  @Override
-  public AbstractExecution withRoutingObjects(Set<Object> routingObjects) {
-    throw new FunctionException(
-        LocalizedStrings.ExecuteFunction_CANNOT_SPECIFY_0_FOR_DATA_INDEPENDENT_FUNCTIONS
-            .toLocalizedString("routing objects"));
-  }
-
   public Execution withArgs(Object args) {
     if (args == null) {
       throw new FunctionException(

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/880f8648/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/ContainsKeyValueMessage.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/ContainsKeyValueMessage.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/ContainsKeyValueMessage.java
index f3f534a..ffdfde0 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/ContainsKeyValueMessage.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/ContainsKeyValueMessage.java
@@ -38,7 +38,6 @@ import com.gemstone.gemfire.distributed.internal.ReplySender;
 import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
 import com.gemstone.gemfire.internal.Assert;
 import com.gemstone.gemfire.internal.cache.ForceReattemptException;
-import com.gemstone.gemfire.internal.cache.KeyWithRegionContext;
 import com.gemstone.gemfire.internal.cache.PartitionedRegion;
 import com.gemstone.gemfire.internal.cache.PartitionedRegionDataStore;
 import com.gemstone.gemfire.internal.cache.PrimaryBucketException;
@@ -125,9 +124,6 @@ public final class ContainsKeyValueMessage extends PartitionMessageWithDirectRep
     final boolean replyVal;
     if (ds != null) {
       try {
-        if (r.keyRequiresRegionContext()) {
-          ((KeyWithRegionContext)this.key).setRegionContext(r);
-        }
         if (this.valueCheck) {
           replyVal = ds.containsValueForKeyLocally(this.bucketId, this.key);
         } else {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/880f8648/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/DestroyMessage.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/DestroyMessage.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/DestroyMessage.java
index 2700c61..3bd32cc 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/DestroyMessage.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/DestroyMessage.java
@@ -48,7 +48,6 @@ import com.gemstone.gemfire.internal.cache.EnumListenerEvent;
 import com.gemstone.gemfire.internal.cache.EventID;
 import com.gemstone.gemfire.internal.cache.FilterRoutingInfo;
 import com.gemstone.gemfire.internal.cache.ForceReattemptException;
-import com.gemstone.gemfire.internal.cache.KeyWithRegionContext;
 import com.gemstone.gemfire.internal.cache.PartitionedRegion;
 import com.gemstone.gemfire.internal.cache.PartitionedRegionDataStore;
 import com.gemstone.gemfire.internal.cache.PartitionedRegionHelper;
@@ -253,9 +252,6 @@ public class DestroyMessage extends PartitionMessageWithDirectReply {
     }
     @Released EntryEventImpl event = null;
     try {
-    if (r.keyRequiresRegionContext()) {
-      ((KeyWithRegionContext)this.key).setRegionContext(r);
-    }
     if (this.bridgeContext != null) {
       event = EntryEventImpl.create(r, getOperation(), this.key, null/*newValue*/,
           getCallbackArg(), false/*originRemote*/, eventSender, 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/880f8648/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/FetchBulkEntriesMessage.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/FetchBulkEntriesMessage.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/FetchBulkEntriesMessage.java
index 8a6563b..efd0bea 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/FetchBulkEntriesMessage.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/FetchBulkEntriesMessage.java
@@ -52,7 +52,6 @@ import com.gemstone.gemfire.internal.cache.BucketRegion;
 import com.gemstone.gemfire.internal.cache.EntryEventImpl;
 import com.gemstone.gemfire.internal.cache.ForceReattemptException;
 import com.gemstone.gemfire.internal.cache.InitialImageOperation;
-import com.gemstone.gemfire.internal.cache.KeyWithRegionContext;
 import com.gemstone.gemfire.internal.cache.PartitionedRegion;
 import com.gemstone.gemfire.internal.cache.PartitionedRegionDataStore;
 import com.gemstone.gemfire.internal.cache.VersionTagHolder;
@@ -523,8 +522,6 @@ public final class FetchBulkEntriesMessage extends PartitionMessage
         try {
           ByteArrayInputStream byteStream = new ByteArrayInputStream(msg.chunk);
           DataInputStream in = new DataInputStream(byteStream);
-          final boolean requiresRegionContext = this.pr
-              .keyRequiresRegionContext();
           Object key;
           int currentId;
 
@@ -538,9 +535,6 @@ public final class FetchBulkEntriesMessage extends PartitionMessage
               deserializingKey = true;
               key = DataSerializer.readObject(in);
               if (key != null) {
-                if (requiresRegionContext) {
-                  ((KeyWithRegionContext) key).setRegionContext(this.pr);
-                }
                 deserializingKey = false;
                 Object value = DataSerializer.readObject(in);
                 VersionTag versionTag = DataSerializer.readObject(in);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/880f8648/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/FetchEntriesMessage.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/FetchEntriesMessage.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/FetchEntriesMessage.java
index d7a3a5f..a18837a 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/FetchEntriesMessage.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/FetchEntriesMessage.java
@@ -51,7 +51,6 @@ import com.gemstone.gemfire.internal.cache.BucketRegion;
 import com.gemstone.gemfire.internal.cache.CachedDeserializable;
 import com.gemstone.gemfire.internal.cache.ForceReattemptException;
 import com.gemstone.gemfire.internal.cache.InitialImageOperation;
-import com.gemstone.gemfire.internal.cache.KeyWithRegionContext;
 import com.gemstone.gemfire.internal.cache.LocalRegion;
 import com.gemstone.gemfire.internal.cache.PartitionedRegion;
 import com.gemstone.gemfire.internal.cache.PartitionedRegionDataStore;
@@ -542,17 +541,12 @@ public final class FetchEntriesMessage extends PartitionMessage
         try {
           ByteArrayInputStream byteStream = new ByteArrayInputStream(msg.chunk);
           DataInputStream in = new DataInputStream(byteStream);
-          final boolean requiresRegionContext = this.pr
-              .keyRequiresRegionContext();
           Object key;
           
           while (in.available() > 0) {
             deserializingKey = true;
             key = DataSerializer.readObject(in);
             if (key != null) {
-              if (requiresRegionContext) {
-                ((KeyWithRegionContext)key).setRegionContext(this.pr);
-              }
               deserializingKey = false;
               Object value = DataSerializer.readObject(in);
               VersionTag versionTag = DataSerializer.readObject(in);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/880f8648/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/FetchEntryMessage.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/FetchEntryMessage.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/FetchEntryMessage.java
index fafb546..82f9efb 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/FetchEntryMessage.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/FetchEntryMessage.java
@@ -46,7 +46,6 @@ import com.gemstone.gemfire.internal.cache.DataLocationException;
 import com.gemstone.gemfire.internal.cache.EntrySnapshot;
 import com.gemstone.gemfire.internal.cache.ForceReattemptException;
 import com.gemstone.gemfire.internal.cache.KeyInfo;
-import com.gemstone.gemfire.internal.cache.KeyWithRegionContext;
 import com.gemstone.gemfire.internal.cache.PartitionedRegion;
 import com.gemstone.gemfire.internal.cache.PartitionedRegionDataStore;
 import com.gemstone.gemfire.internal.cache.PrimaryBucketException;
@@ -146,9 +145,6 @@ public final class FetchEntryMessage extends PartitionMessage
     EntrySnapshot val;
     if (ds != null) {
       try {
-        if (r.keyRequiresRegionContext()) {
-          ((KeyWithRegionContext)this.key).setRegionContext(r);
-        }
         KeyInfo keyInfo = r.getKeyInfo(key);
         val = (EntrySnapshot)r.getDataView().getEntryOnRemote(keyInfo, r, true);
         r.getPrStats().endPartitionMessagesProcessing(startTime); 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/880f8648/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/FetchKeysMessage.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/FetchKeysMessage.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/FetchKeysMessage.java
index 3faf1da..6714271 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/FetchKeysMessage.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/FetchKeysMessage.java
@@ -44,7 +44,6 @@ import com.gemstone.gemfire.internal.HeapDataOutputStream;
 import com.gemstone.gemfire.internal.Version;
 import com.gemstone.gemfire.internal.cache.ForceReattemptException;
 import com.gemstone.gemfire.internal.cache.InitialImageOperation;
-import com.gemstone.gemfire.internal.cache.KeyWithRegionContext;
 import com.gemstone.gemfire.internal.cache.PartitionedRegion;
 import com.gemstone.gemfire.internal.cache.PartitionedRegionDataStore;
 import com.gemstone.gemfire.internal.cache.tier.InterestType;
@@ -495,14 +494,9 @@ public final class FetchKeysMessage extends PartitionMessage
         try {
           ByteArrayInputStream byteStream = new ByteArrayInputStream(msg.chunk);
           DataInputStream in = new DataInputStream(byteStream);
-          final boolean requiresRegionContext = this.pr
-              .keyRequiresRegionContext();
           while (in.available() > 0) {
             Object key = DataSerializer.readObject(in);
             if (key != null) {
-              if (requiresRegionContext) {
-                ((KeyWithRegionContext)key).setRegionContext(this.pr);
-              }
               synchronized(returnValue) {
                 returnValue.add(key);
               }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/880f8648/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/GetMessage.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/GetMessage.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/GetMessage.java
index e903def..a0d4f63 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/GetMessage.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/GetMessage.java
@@ -29,6 +29,18 @@ import com.gemstone.gemfire.internal.InternalDataSerializer;
 import com.gemstone.gemfire.internal.Version;
 import com.gemstone.gemfire.internal.cache.*;
 import com.gemstone.gemfire.internal.cache.BucketRegion.RawValue;
+import com.gemstone.gemfire.internal.cache.CachedDeserializableFactory;
+import com.gemstone.gemfire.internal.cache.DataLocationException;
+import com.gemstone.gemfire.internal.cache.EntryEventImpl;
+import com.gemstone.gemfire.internal.cache.ForceReattemptException;
+import com.gemstone.gemfire.internal.cache.KeyInfo;
+import com.gemstone.gemfire.internal.cache.PartitionedRegion;
+import com.gemstone.gemfire.internal.cache.PartitionedRegionDataStore;
+import com.gemstone.gemfire.internal.cache.PrimaryBucketException;
+import com.gemstone.gemfire.internal.cache.TXManagerImpl;
+import com.gemstone.gemfire.internal.cache.TXStateProxy;
+import com.gemstone.gemfire.internal.cache.Token;
+import com.gemstone.gemfire.internal.cache.VersionTagHolder;
 import com.gemstone.gemfire.internal.cache.tier.sockets.ClientProxyMembershipID;
 import com.gemstone.gemfire.internal.cache.versions.VersionTag;
 import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
@@ -159,9 +171,6 @@ public final class GetMessage extends PartitionMessageWithDirectReply
     if (ds != null) {
       VersionTagHolder event = new VersionTagHolder();
       try {
-        if (r.keyRequiresRegionContext()) {
-          ((KeyWithRegionContext)this.key).setRegionContext(r);
-        }
         KeyInfo keyInfo = r.getKeyInfo(key, cbArg);
         boolean lockEntry = forceUseOfPRExecutor || isDirectAck();
         
@@ -325,7 +334,6 @@ public final class GetMessage extends PartitionMessageWithDirectReply
     // static values for valueType
     static final byte VALUE_IS_SERIALIZED_OBJECT = 0;
     static final byte VALUE_IS_BYTES = 1;
-    /** came from partial SQLF merge and reconciling with it but not used yet */
     //static final byte VALUE_IS_OBJECT = 2;
     static final byte VALUE_IS_INVALID = 3;
     static final byte VALUE_IS_TOMBSTONE = 4;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/880f8648/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/InvalidateMessage.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/InvalidateMessage.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/InvalidateMessage.java
index 6f86acd..bbb9753 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/InvalidateMessage.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/InvalidateMessage.java
@@ -45,7 +45,6 @@ import com.gemstone.gemfire.internal.cache.EntryEventImpl;
 import com.gemstone.gemfire.internal.cache.EnumListenerEvent;
 import com.gemstone.gemfire.internal.cache.FilterRoutingInfo;
 import com.gemstone.gemfire.internal.cache.ForceReattemptException;
-import com.gemstone.gemfire.internal.cache.KeyWithRegionContext;
 import com.gemstone.gemfire.internal.cache.PartitionedRegion;
 import com.gemstone.gemfire.internal.cache.PartitionedRegionDataStore;
 import com.gemstone.gemfire.internal.cache.PartitionedRegionHelper;
@@ -177,9 +176,6 @@ public final class InvalidateMessage extends DestroyMessage {
        eventSender = getSender();
     }
     final Object key = getKey();
-    if (r.keyRequiresRegionContext()) {
-      ((KeyWithRegionContext)key).setRegionContext(r);
-    }
     @Released final EntryEventImpl event = EntryEventImpl.create(
         r,
         getOperation(),

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/880f8648/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/PREntriesIterator.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/PREntriesIterator.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/PREntriesIterator.java
index ec2a8db..94a3670 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/PREntriesIterator.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/PREntriesIterator.java
@@ -22,11 +22,9 @@ import com.gemstone.gemfire.internal.cache.PartitionedRegion;
 
 
 /**
- * This interface is implemented by the iterators
- * GemFireContainer.PRLocalEntriesIterator,
- * PartitionedRegion.PRLocalBucketSetEntriesIterator and
- * PartitionedRegion.KeysSetIterator used by SqlFabric to obtain information of
- * the bucket ID from which the current local entry is being fetched from.
+ * This interface provides the
+ * bucket ID from which the current local entry is being fetched from
+ * and the PartitionedRegion being iterated.
  * 
  */
 public interface PREntriesIterator<T> extends Iterator<T>{

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/880f8648/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/PRUpdateEntryVersionMessage.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/PRUpdateEntryVersionMessage.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/PRUpdateEntryVersionMessage.java
index e1766dc..726246b 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/PRUpdateEntryVersionMessage.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/PRUpdateEntryVersionMessage.java
@@ -42,7 +42,6 @@ import com.gemstone.gemfire.internal.cache.DataLocationException;
 import com.gemstone.gemfire.internal.cache.EntryEventImpl;
 import com.gemstone.gemfire.internal.cache.EventID;
 import com.gemstone.gemfire.internal.cache.ForceReattemptException;
-import com.gemstone.gemfire.internal.cache.KeyWithRegionContext;
 import com.gemstone.gemfire.internal.cache.PartitionedRegion;
 import com.gemstone.gemfire.internal.cache.PartitionedRegionDataStore;
 import com.gemstone.gemfire.internal.cache.PartitionedRegionHelper;
@@ -126,10 +125,6 @@ public class PRUpdateEntryVersionMessage extends
   protected boolean operateOnPartitionedRegion(DistributionManager dm,
       PartitionedRegion pr, long startTime) throws CacheException,
       QueryException, DataLocationException, InterruptedException, IOException {
-    if (pr.keyRequiresRegionContext()) {
-      ((KeyWithRegionContext) key).setRegionContext(pr);
-    }
-
     // release not needed because disallowOffHeapValues called
     final EntryEventImpl event = EntryEventImpl.create(pr, getOperation(),
         getKey(), null, /* newValue */

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/880f8648/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/PartitionMessage.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/PartitionMessage.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/PartitionMessage.java
index c2ab27e..1b83ee3 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/PartitionMessage.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/PartitionMessage.java
@@ -468,10 +468,6 @@ public abstract class PartitionMessage extends DistributionMessage implements
     this.processorId = processor == null? 0 : processor.getProcessorId();
     this.notificationOnly = true;
         
-    //Set sqlfAsyncListenerRecepients = r.getRegionAdvisor().adviseSqlfAsyncEventListenerHub();
-    //sqlfAsyncListenerRecepients.retainAll(adjunctRecipients);
-    //Now remove those adjunct recepients which are present in SqlfAsyncListenerRecepients
-    //adjunctRecipients.removeAll(sqlfAsyncListenerRecepients);
     this.setFilterInfo(filterRoutingInfo);
     Set failures1= null;
     if(!adjunctRecipients.isEmpty()) {
@@ -482,20 +478,6 @@ public abstract class PartitionMessage extends DistributionMessage implements
       setRecipients(adjunctRecipients);
       failures1 = r.getDistributionManager().putOutgoing(this);
     }
-    /*
-    //Now distribute message with old value to Sqlf Hub nodes
-    if(!sqlfAsyncListenerRecepients.isEmpty()) {
-      //System.out.println("Asif1: sqlf hub  recepients ="+sqlfHubRecepients);
-      resetRecipients();
-      setRecipients(sqlfAsyncListenerRecepients);
-      event.applyDelta(true);
-      Set failures2 = r.getDistributionManager().putOutgoing(this);
-      if(failures1 == null) {
-        failures1 = failures2;
-      }else if(failures2 != null) {
-        failures1.addAll(failures2);
-      }
-    }*/
     
     return failures1;
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/880f8648/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/PutAllPRMessage.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/PutAllPRMessage.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/PutAllPRMessage.java
index 7bbe5ce..f7c63f9 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/PutAllPRMessage.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/PutAllPRMessage.java
@@ -59,7 +59,6 @@ import com.gemstone.gemfire.internal.cache.EntryEventImpl;
 import com.gemstone.gemfire.internal.cache.EnumListenerEvent;
 import com.gemstone.gemfire.internal.cache.EventID;
 import com.gemstone.gemfire.internal.cache.ForceReattemptException;
-import com.gemstone.gemfire.internal.cache.KeyWithRegionContext;
 import com.gemstone.gemfire.internal.cache.LocalRegion;
 import com.gemstone.gemfire.internal.cache.PartitionedRegion;
 import com.gemstone.gemfire.internal.cache.PartitionedRegionDataStore;
@@ -101,8 +100,6 @@ public final class PutAllPRMessage extends PartitionMessageWithDirectReply
 
   protected static final short HAS_BRIDGE_CONTEXT = UNRESERVED_FLAGS_START;
   protected static final short SKIP_CALLBACKS = (HAS_BRIDGE_CONTEXT << 1);
-  //using the left most bit for IS_PUT_DML, the last available bit
-  protected static final short IS_PUT_DML = (short) (SKIP_CALLBACKS << 1);
 
   private transient InternalDistributedSystem internalDs;
 
@@ -117,7 +114,6 @@ public final class PutAllPRMessage extends PartitionMessageWithDirectReply
   
   transient VersionedObjectList versions = null;
 
-  private boolean isPutDML;
   /**
    * Empty constructor to satisfy {@link DataSerializer}requirements
    */
@@ -125,7 +121,7 @@ public final class PutAllPRMessage extends PartitionMessageWithDirectReply
   }
 
   public PutAllPRMessage(int bucketId, int size, boolean notificationOnly,
-      boolean posDup, boolean skipCallbacks, Object callbackArg, boolean isPutDML) {
+      boolean posDup, boolean skipCallbacks, Object callbackArg) {
     this.bucketId = Integer.valueOf(bucketId);
     putAllPRData = new PutAllEntryData[size];
     this.notificationOnly = notificationOnly;
@@ -133,7 +129,6 @@ public final class PutAllPRMessage extends PartitionMessageWithDirectReply
     this.skipCallbacks = skipCallbacks;
     this.callbackArg = callbackArg;
     initTxMemberId();
-    this.isPutDML = isPutDML;
   }
 
   public void addEntry(PutAllEntryData entry) {
@@ -270,10 +265,6 @@ public final class PutAllPRMessage extends PartitionMessageWithDirectReply
       EntryVersionsList versionTags = new EntryVersionsList(putAllPRDataSize);
 
       boolean hasTags = false;
-      // get the "keyRequiresRegionContext" flag from first element assuming
-      // all key objects to be uniform
-      final boolean requiresRegionContext =
-        (this.putAllPRData[0].getKey() instanceof KeyWithRegionContext);
       for (int i = 0; i < this.putAllPRDataSize; i++) {
         // If sender's version is >= 7.0.1 then we can send versions list.
         if (!hasTags && putAllPRData[i].versionTag != null) {
@@ -283,7 +274,7 @@ public final class PutAllPRMessage extends PartitionMessageWithDirectReply
         VersionTag<?> tag = putAllPRData[i].versionTag;
         versionTags.add(tag);
         putAllPRData[i].versionTag = null;
-        putAllPRData[i].toData(out, requiresRegionContext);
+        putAllPRData[i].toData(out);
         putAllPRData[i].versionTag = tag;
         // PutAllEntryData's toData did not serialize eventID to save
         // performance for DR, but in PR,
@@ -302,7 +293,6 @@ public final class PutAllPRMessage extends PartitionMessageWithDirectReply
     s = super.computeCompressedShort(s);
     if (this.bridgeContext != null) s |= HAS_BRIDGE_CONTEXT;
     if (this.skipCallbacks) s |= SKIP_CALLBACKS;
-    if (this.isPutDML) s |= IS_PUT_DML;
     return s;
   }
 
@@ -311,7 +301,6 @@ public final class PutAllPRMessage extends PartitionMessageWithDirectReply
       ClassNotFoundException {
     super.setBooleans(s, in);
     this.skipCallbacks = ((s & SKIP_CALLBACKS) != 0);
-    this.isPutDML = ((s & IS_PUT_DML) != 0);
   }
 
   @Override
@@ -436,12 +425,8 @@ public final class PutAllPRMessage extends PartitionMessageWithDirectReply
     // Fix the updateMsg misorder issue
     // Lock the keys when doing postPutAll
     Object keys[] = new Object[putAllPRDataSize];
-    final boolean keyRequiresRegionContext = r.keyRequiresRegionContext();
     for (int i = 0; i < putAllPRDataSize; ++i) {
       keys[i] = putAllPRData[i].getKey();
-      if (keyRequiresRegionContext) {
-        ((KeyWithRegionContext)keys[i]).setRegionContext(r);
-      }
     }
 
     if (!notificationOnly) {
@@ -482,7 +467,7 @@ public final class PutAllPRMessage extends PartitionMessageWithDirectReply
            * in this request, because these request will be blocked by foundKey
            */
           for (int i=0; i<putAllPRDataSize; i++) {
-            @Released EntryEventImpl ev = getEventFromEntry(r, myId, eventSender, i,putAllPRData,notificationOnly,bridgeContext,posDup,skipCallbacks, this.isPutDML);
+            @Released EntryEventImpl ev = getEventFromEntry(r, myId, eventSender, i,putAllPRData,notificationOnly,bridgeContext,posDup,skipCallbacks);
             try {
             key = ev.getKey();
 
@@ -558,7 +543,7 @@ public final class PutAllPRMessage extends PartitionMessageWithDirectReply
       }
     } else {
       for (int i=0; i<putAllPRDataSize; i++) {
-        EntryEventImpl ev = getEventFromEntry(r, myId, eventSender, i,putAllPRData,notificationOnly,bridgeContext,posDup,skipCallbacks, this.isPutDML);
+        EntryEventImpl ev = getEventFromEntry(r, myId, eventSender, i,putAllPRData,notificationOnly,bridgeContext,posDup,skipCallbacks);
         try {
         ev.setOriginRemote(true);
         if (this.callbackArg != null) {
@@ -594,7 +579,7 @@ public final class PutAllPRMessage extends PartitionMessageWithDirectReply
       InternalDistributedMember myId, InternalDistributedMember eventSender,
       int idx, DistributedPutAllOperation.PutAllEntryData[] data,
       boolean notificationOnly, ClientProxyMembershipID bridgeContext,
-      boolean posDup, boolean skipCallbacks, boolean isPutDML) {
+      boolean posDup, boolean skipCallbacks) {
     PutAllEntryData prd = data[idx];
     //EntryEventImpl ev = EntryEventImpl.create(r, 
        // prd.getOp(),
@@ -633,7 +618,6 @@ public final class PutAllPRMessage extends PartitionMessageWithDirectReply
     } else {
       ev.setTailKey(prd.getTailKey());
     }
-    ev.setPutDML(isPutDML);
     evReturned = true;
     return ev;
     } finally {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/880f8648/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/PutMessage.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/PutMessage.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/PutMessage.java
index db137c6..e63d288 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/PutMessage.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/PutMessage.java
@@ -56,7 +56,6 @@ import com.gemstone.gemfire.internal.cache.EnumListenerEvent;
 import com.gemstone.gemfire.internal.cache.EventID;
 import com.gemstone.gemfire.internal.cache.FilterRoutingInfo;
 import com.gemstone.gemfire.internal.cache.ForceReattemptException;
-import com.gemstone.gemfire.internal.cache.KeyWithRegionContext;
 import com.gemstone.gemfire.internal.cache.PartitionedRegion;
 import com.gemstone.gemfire.internal.cache.PartitionedRegionDataStore;
 import com.gemstone.gemfire.internal.cache.PrimaryBucketException;
@@ -119,8 +118,7 @@ public final class PutMessage extends PartitionMessageWithDirectReply implements
   
   /**
    * Indicates if and when the new value should be deserialized on the
-   * the receiver. Distinguishes between Deltas which need to be eagerly
-   * deserialized (DESERIALIZATION_POLICY_EAGER), a non-byte[] value that was
+   * the receiver. Distinguishes between a non-byte[] value that was
    * serialized (DESERIALIZATION_POLICY_LAZY) and a
    * byte[] array value that didn't need to be serialized
    * (DESERIALIZATION_POLICY_NONE). While this seems like an extra data, it
@@ -182,15 +180,11 @@ public final class PutMessage extends PartitionMessageWithDirectReply implements
 
   private VersionTag versionTag;
 
-  private transient boolean isPutDML;
-  
   // additional bitmask flags used for serialization/deserialization
 
   protected static final short CACHE_WRITE = UNRESERVED_FLAGS_START;
   protected static final short HAS_EXPECTED_OLD_VAL = (CACHE_WRITE << 1);
   protected static final short HAS_VERSION_TAG = (HAS_EXPECTED_OLD_VAL << 1);
-  //using the left most bit for IS_PUT_DML, the last available bit
-  protected static final short IS_PUT_DML = (short) (HAS_VERSION_TAG << 1);
 
   // extraFlags
   protected static final int HAS_BRIDGE_CONTEXT =
@@ -349,11 +343,7 @@ public final class PutMessage extends PartitionMessageWithDirectReply implements
     this.expectedOldValue = expectedOldValue;
     this.key = event.getKey();
     if (event.hasNewValue()) {
-      if (CachedDeserializableFactory.preferObject() || event.hasDelta()) {
-        this.deserializationPolicy = DistributedCacheOperation.DESERIALIZATION_POLICY_EAGER;
-      } else {
-        this.deserializationPolicy = DistributedCacheOperation.DESERIALIZATION_POLICY_LAZY;
-      }
+      this.deserializationPolicy = DistributedCacheOperation.DESERIALIZATION_POLICY_LAZY;
       event.exportNewValue(this);
     }
     else {
@@ -627,14 +617,7 @@ public final class PutMessage extends PartitionMessageWithDirectReply implements
       this.deltaBytes = DataSerializer.readByteArray(in);
     }
     else {
-      // for eager deserialization avoid extra byte array serialization
-      if (this.deserializationPolicy ==
-          DistributedCacheOperation.DESERIALIZATION_POLICY_EAGER) {
-        setValObj(DataSerializer.readObject(in));
-      }
-      else {
-        setValBytes(DataSerializer.readByteArray(in));
-      }
+      setValBytes(DataSerializer.readByteArray(in));
       if ((extraFlags & HAS_DELTA_WITH_FULL_VALUE) != 0) {
         this.deltaBytes = DataSerializer.readByteArray(in);
       }
@@ -642,10 +625,6 @@ public final class PutMessage extends PartitionMessageWithDirectReply implements
     if ((flags & HAS_VERSION_TAG) != 0) {
       this.versionTag =  DataSerializer.readObject(in);
     }
-    if ((flags & IS_PUT_DML) != 0) {
-      this.isPutDML = true;
-    }
-    
   }
   
   @Override
@@ -752,7 +731,6 @@ public final class PutMessage extends PartitionMessageWithDirectReply implements
       }
     }
     if (this.versionTag != null) s |= HAS_VERSION_TAG;
-    if (this.event.isPutDML()) s |= IS_PUT_DML;
     return s;
   }
 
@@ -788,9 +766,6 @@ public final class PutMessage extends PartitionMessageWithDirectReply implements
     if (eventSender == null) {
        eventSender = getSender();
     }
-    if (r.keyRequiresRegionContext()) {
-      ((KeyWithRegionContext)this.key).setRegionContext(r);
-    }
     @Released final EntryEventImpl ev = EntryEventImpl.create(
         r,
         getOperation(),
@@ -814,7 +789,6 @@ public final class PutMessage extends PartitionMessageWithDirectReply implements
     ev.setCausedByMessage(this);
     ev.setInvokePRCallbacks(!notificationOnly);
     ev.setPossibleDuplicate(this.posDup);
-    ev.setPutDML(this.isPutDML);
     /*if (this.hasOldValue) {
       if (this.oldValueIsSerialized) {
         ev.setSerializedOldValue(getOldValueBytes());
@@ -839,10 +813,6 @@ public final class PutMessage extends PartitionMessageWithDirectReply implements
         case DistributedCacheOperation.DESERIALIZATION_POLICY_NONE:
           ev.setNewValue(getValBytes());
           break;
-        case DistributedCacheOperation.DESERIALIZATION_POLICY_EAGER:
-          // new value is a Delta
-          ev.setNewValue(this.valObj); // sets the delta field
-          break;
         default:
           throw new AssertionError("unknown deserialization policy: "
               + deserializationPolicy);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/880f8648/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/RegionAdvisor.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/RegionAdvisor.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/RegionAdvisor.java
index 176a41a..a5b4d71 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/RegionAdvisor.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/RegionAdvisor.java
@@ -1157,23 +1157,6 @@ public class RegionAdvisor extends CacheDistributionAdvisor
     return result;
   }
 
-  // For SQLFabric ALTER TABLE, need to reset the parentAdvisors if colocated
-  // region changes
-  public void resetBucketAdvisorParents() {
-    if (this.buckets != null) {
-      for (ProxyBucketRegion pbr : this.buckets) {
-        if (pbr.getCreatedBucketRegion() != null) {
-          throw new InternalGemFireException(
-              LocalizedStrings.RegionAdvisor_CANNOT_RESET_EXISTING_BUCKET
-                  .toLocalizedString(new Object[] {
-                      pbr.getPartitionedRegion().getFullPath(),
-                      pbr.getBucketId() }));
-        }
-        pbr.getBucketAdvisor().resetParentAdvisor(pbr.getBucketId());
-      }
-    }
-  }
-
   /**
    * Returns the bucket identified by bucketId after waiting for initialization
    * to finish processing queued profiles. Call synchronizes and waits on 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/880f8648/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/RemoteFetchKeysMessage.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/RemoteFetchKeysMessage.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/RemoteFetchKeysMessage.java
index ac95e03..bea08fc 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/RemoteFetchKeysMessage.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/RemoteFetchKeysMessage.java
@@ -49,7 +49,6 @@ import com.gemstone.gemfire.internal.Assert;
 import com.gemstone.gemfire.internal.HeapDataOutputStream;
 import com.gemstone.gemfire.internal.cache.ForceReattemptException;
 import com.gemstone.gemfire.internal.cache.InitialImageOperation;
-import com.gemstone.gemfire.internal.cache.KeyWithRegionContext;
 import com.gemstone.gemfire.internal.cache.LocalRegion;
 import com.gemstone.gemfire.internal.cache.PartitionedRegion;
 import com.gemstone.gemfire.internal.cache.RemoteOperationException;
@@ -421,14 +420,9 @@ public class RemoteFetchKeysMessage extends RemoteOperationMessage {
         
         ByteArrayInputStream byteStream = new ByteArrayInputStream(msg.chunk);
         DataInputStream in = new DataInputStream(byteStream);
-        final boolean requiresRegionContext = this.region
-            .keyRequiresRegionContext();
         while (in.available() > 0) {
           Object key = DataSerializer.readObject(in);
           if (key != null) {
-            if (requiresRegionContext) {
-              ((KeyWithRegionContext)key).setRegionContext(this.region);
-            }
             synchronized(returnValue) {
               returnValue.add(key);
             }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/880f8648/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/RemoveAllPRMessage.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/RemoveAllPRMessage.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/RemoveAllPRMessage.java
index 125cdb0..5c9e799 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/RemoveAllPRMessage.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/RemoveAllPRMessage.java
@@ -59,7 +59,6 @@ import com.gemstone.gemfire.internal.cache.EntryEventImpl;
 import com.gemstone.gemfire.internal.cache.EnumListenerEvent;
 import com.gemstone.gemfire.internal.cache.EventID;
 import com.gemstone.gemfire.internal.cache.ForceReattemptException;
-import com.gemstone.gemfire.internal.cache.KeyWithRegionContext;
 import com.gemstone.gemfire.internal.cache.LocalRegion;
 import com.gemstone.gemfire.internal.cache.PartitionedRegion;
 import com.gemstone.gemfire.internal.cache.PartitionedRegionDataStore;
@@ -260,10 +259,6 @@ public final class RemoveAllPRMessage extends PartitionMessageWithDirectReply
       EntryVersionsList versionTags = new EntryVersionsList(removeAllPRDataSize);
 
       boolean hasTags = false;
-      // get the "keyRequiresRegionContext" flag from first element assuming
-      // all key objects to be uniform
-      final boolean requiresRegionContext =
-        (this.removeAllPRData[0].getKey() instanceof KeyWithRegionContext);
       for (int i = 0; i < this.removeAllPRDataSize; i++) {
         // If sender's version is >= 7.0.1 then we can send versions list.
         if (!hasTags && removeAllPRData[i].versionTag != null) {
@@ -273,7 +268,7 @@ public final class RemoveAllPRMessage extends PartitionMessageWithDirectReply
         VersionTag<?> tag = removeAllPRData[i].versionTag;
         versionTags.add(tag);
         removeAllPRData[i].versionTag = null;
-        removeAllPRData[i].toData(out, requiresRegionContext);
+        removeAllPRData[i].toData(out);
         removeAllPRData[i].versionTag = tag;
         // RemoveAllEntryData's toData did not serialize eventID to save
         // performance for DR, but in PR,
@@ -423,12 +418,8 @@ public final class RemoveAllPRMessage extends PartitionMessageWithDirectReply
     // Fix the updateMsg misorder issue
     // Lock the keys when doing postRemoveAll
     Object keys[] = new Object[removeAllPRDataSize];
-    final boolean keyRequiresRegionContext = r.keyRequiresRegionContext();
     for (int i = 0; i < removeAllPRDataSize; ++i) {
       keys[i] = removeAllPRData[i].getKey();
-      if (keyRequiresRegionContext) {
-        ((KeyWithRegionContext)keys[i]).setRegionContext(r);
-      }
     }
 
     if (!notificationOnly) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/880f8648/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/rebalance/PartitionedRegionLoadModel.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/rebalance/PartitionedRegionLoadModel.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/rebalance/PartitionedRegionLoadModel.java
index 6111561..44647b5 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/rebalance/PartitionedRegionLoadModel.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/rebalance/PartitionedRegionLoadModel.java
@@ -243,8 +243,7 @@ public class PartitionedRegionLoadModel {
         // [sumedh] remove from buckets array too to be consistent since
         // this method will be invoked repeatedly for all colocated regions,
         // and then we may miss some colocated regions for a bucket leading
-        // to all kinds of issues later (e.g. see SQLF test for #41472 that
-        //   shows some problems including NPEs, hangs etc.)
+        // to all kinds of issues later
         this.buckets[i] = null;
         continue;
       }
@@ -555,22 +554,12 @@ public class PartitionedRegionLoadModel {
   public Move findBestPrimaryMove() {
     Move bestMove= null;
     double bestImprovement = 0;
-    GemFireCacheImpl cache = null;
     for(Member source: this.members.values()) {
       for(Bucket bucket: source.getPrimaryBuckets()) {
         for(Member target: bucket.getMembersHosting()) {
           if(source.equals(target)) {
             continue;
           }
-          // If node is not fully initialized yet, then skip this node
-          // (SQLFabric DDL replay in progress).
-          if (cache == null) {
-            cache = GemFireCacheImpl.getInstance();
-          }
-          if (cache != null
-              && cache.isUnInitializedMember(target.getMemberId())) {
-            continue;
-          }
           double improvement = improvement(source.getPrimaryLoad(), source
               .getWeight(), target.getPrimaryLoad(), target.getWeight(), bucket.getPrimaryLoad(),
               getPrimaryAverage());
@@ -1211,12 +1200,6 @@ public class PartitionedRegionLoadModel {
       if(getBuckets().contains(bucket)) {
         return RefusalReason.ALREADY_HOSTING;
       }
-      // If node is not fully initialized yet, then skip this node (SQLFabric
-      // DDL replay in progress).
-      final GemFireCacheImpl cache = GemFireCacheImpl.getInstance();
-      if (cache != null && cache.isUnInitializedMember(getMemberId())) {
-        return RefusalReason.UNITIALIZED_MEMBER;
-      }
       //Check the ip address
       if(checkZone) {
         //If the source member is equivalent to the target member, go

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/880f8648/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/command/GatewayReceiverCommand.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/command/GatewayReceiverCommand.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/command/GatewayReceiverCommand.java
index 448be92..e3a3d53 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/command/GatewayReceiverCommand.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/command/GatewayReceiverCommand.java
@@ -39,7 +39,6 @@ import com.gemstone.gemfire.internal.cache.EntryEventImpl;
 import com.gemstone.gemfire.internal.cache.EventID;
 import com.gemstone.gemfire.internal.cache.EventIDHolder;
 import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import com.gemstone.gemfire.internal.cache.KeyWithRegionContext;
 import com.gemstone.gemfire.internal.cache.LocalRegion;
 import com.gemstone.gemfire.internal.cache.tier.CachedRegionHelper;
 import com.gemstone.gemfire.internal.cache.tier.Command;
@@ -320,9 +319,6 @@ public class GatewayReceiverCommand extends BaseCommand {
             try {
               byte[] value = valuePart.getSerializedForm();
               boolean isObject = valuePart.isObject();
-              if (region.keyRequiresRegionContext()) {
-                ((KeyWithRegionContext)key).setRegionContext(region);
-              }
               // [sumedh] This should be done on client while sending
               // since that is the WAN gateway
               AuthorizeRequest authzRequest = servConn.getAuthzRequest();
@@ -428,9 +424,6 @@ public class GatewayReceiverCommand extends BaseCommand {
             try {
               byte[] value = valuePart.getSerializedForm();
               boolean isObject = valuePart.isObject();
-              if (region.keyRequiresRegionContext()) {
-                ((KeyWithRegionContext)key).setRegionContext(region);
-              }
               AuthorizeRequest authzRequest = servConn.getAuthzRequest();
               if (authzRequest != null) {
                 PutOperationContext putContext = authzRequest.putAuthorize(
@@ -523,9 +516,6 @@ public class GatewayReceiverCommand extends BaseCommand {
             }
             handleMessageRetry(region, clientEvent);
             // Destroy the entry
-            if (region.keyRequiresRegionContext()) {
-              ((KeyWithRegionContext)key).setRegionContext(region);
-            }
             try {
               AuthorizeRequest authzRequest = servConn.getAuthzRequest();
               if (authzRequest != null) {
@@ -606,9 +596,6 @@ public class GatewayReceiverCommand extends BaseCommand {
               }
               
               // Update the version tag
-              if (region.keyRequiresRegionContext()) {
-                ((KeyWithRegionContext) key).setRegionContext(region);
-              }
               try {
 
                 region.basicBridgeUpdateVersionStamp(key, callbackArg, servConn.getProxyID(), false, clientEvent);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/880f8648/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tx/DistTxEntryEvent.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tx/DistTxEntryEvent.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tx/DistTxEntryEvent.java
index 6e7c21c..c84fb99 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tx/DistTxEntryEvent.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tx/DistTxEntryEvent.java
@@ -138,12 +138,7 @@ public class DistTxEntryEvent extends EntryEventImpl {
     EntryVersionsList versionTags = new EntryVersionsList(
         this.putAllOp.putAllDataSize);
     boolean hasTags = false;
-    // get the "keyRequiresRegionContext" flag from first element assuming
-    // all key objects to be uniform
     final PutAllEntryData[] putAllData = this.putAllOp.getPutAllEntryData();
-    // final boolean requiresRegionContext =
-    // (putAllData[0].key instanceof KeyWithRegionContext);
-    final boolean requiresRegionContext = false;
     for (int i = 0; i < this.putAllOp.putAllDataSize; i++) {
       if (!hasTags && putAllData[i].versionTag != null) {
         hasTags = true;
@@ -151,7 +146,7 @@ public class DistTxEntryEvent extends EntryEventImpl {
       VersionTag<?> tag = putAllData[i].versionTag;
       versionTags.add(tag);
       putAllData[i].versionTag = null;
-      putAllData[i].toData(out, requiresRegionContext);
+      putAllData[i].toData(out);
       putAllData[i].versionTag = tag;
     }
     out.writeBoolean(hasTags);
@@ -206,13 +201,8 @@ public class DistTxEntryEvent extends EntryEventImpl {
         this.removeAllOp.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);
     final RemoveAllEntryData[] removeAllData = this.removeAllOp
         .getRemoveAllEntryData();
-    final boolean requiresRegionContext = false;
     for (int i = 0; i < this.removeAllOp.removeAllDataSize; i++) {
       if (!hasTags && removeAllData[i].versionTag != null) {
         hasTags = true;
@@ -220,7 +210,7 @@ public class DistTxEntryEvent extends EntryEventImpl {
       VersionTag<?> tag = removeAllData[i].versionTag;
       versionTags.add(tag);
       removeAllData[i].versionTag = null;
-      removeAllData[i].toData(out, requiresRegionContext);
+      removeAllData[i].toData(out);
       removeAllData[i].versionTag = tag;
     }
     out.writeBoolean(hasTags);



Mime
View raw message