geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hiteshkhame...@apache.org
Subject [51/55] [abbrv] incubator-geode git commit: GEODE-1464: remove sqlf code
Date Tue, 07 Jun 2016 19:07:10 GMT
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/880f8648/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/InitialImageOperation.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/InitialImageOperation.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/InitialImageOperation.java
index f0836d4..55bdde4 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/InitialImageOperation.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/InitialImageOperation.java
@@ -23,7 +23,6 @@ import com.gemstone.gemfire.cache.Operation;
 import com.gemstone.gemfire.cache.RegionDestroyedException;
 import com.gemstone.gemfire.cache.query.internal.CqStateImpl;
 import com.gemstone.gemfire.cache.query.internal.DefaultQueryService;
-import com.gemstone.gemfire.cache.query.internal.IndexUpdater;
 import com.gemstone.gemfire.cache.query.internal.cq.CqService;
 import com.gemstone.gemfire.cache.query.internal.cq.ServerCQ;
 import com.gemstone.gemfire.distributed.DistributedMember;
@@ -764,10 +763,6 @@ public class InitialImageOperation  {
       if (entryCount <= 1000 && isDebugEnabled) {
         keys = new HashSet();
       }
-      final boolean keyRequiresRegionContext = this.region
-          .keyRequiresRegionContext();
-      // get SQLF index manager for the case of recovery from disk
-      final IndexUpdater indexUpdater = this.region.getIndexUpdater();
       final ByteArrayDataInput in = new ByteArrayDataInput();
       for (int i = 0; i < entryCount; i++) {
         // stream is null-terminated
@@ -816,33 +811,7 @@ public class InitialImageOperation  {
         Object tmpValue = entry.value;
         byte[] tmpBytes = null;
 
-        if (keyRequiresRegionContext) {
-          final KeyWithRegionContext key = (KeyWithRegionContext)entry.key;
-          Object keyObject = tmpValue;
-          if (tmpValue != null) {
-            if (entry.isEagerDeserialize()) {
-              tmpValue = CachedDeserializableFactory.create(tmpValue,
-                  CachedDeserializableFactory.getArrayOfBytesSize(
-                      (byte[][])tmpValue, true));
-              entry.setSerialized(false);
-            }
-            else if (entry.isSerialized()) {
-              tmpBytes = (byte[])tmpValue;
-              // force deserialization for passing to key
-              keyObject = EntryEventImpl.deserialize(tmpBytes,
-                  remoteVersion, in);
-              tmpValue = CachedDeserializableFactory.create(keyObject,
-                  CachedDeserializableFactory.getByteSize(tmpBytes));
-              entry.setSerialized(false);
-            }
-            else {
-              tmpBytes = (byte[])tmpValue;
-            }
-          }
-          key.setRegionContext(this.region);
-          entry.key = key.afterDeserializationWithValue(keyObject);
-        }
-        else {
+        {
           if (tmpValue instanceof byte[]) {
             tmpBytes = (byte[])tmpValue;
           }
@@ -879,32 +848,6 @@ public class InitialImageOperation  {
                 //actually are equal, keep don't put the received
                 //entry into the cache (this avoids writing a record to disk)
                 if(entriesEqual) {
-                  // explicit SQLF index maintenance here since
-                  // it was not done during recovery from disk
-                  if (indexUpdater != null && !Token.isInvalidOrRemoved(tmpValue)) {
-                    boolean success = false;
-                    if (entry.isSerialized()) {
-                      tmpValue = CachedDeserializableFactory
-                          .create((byte[])tmpValue);
-                    }
-                    // dummy EntryEvent to pass for SQLF index maintenance
-                    @Released final EntryEventImpl ev = EntryEventImpl.create(this.region,
-                        Operation.CREATE, null, null, null, true, null, false, false);
-                    try {
-                    ev.setKeyInfo(this.region.getKeyInfo(entry.key,
-                        tmpValue, null));
-                    ev.setNewValue(tmpValue);
-                    try {
-                      indexUpdater.onEvent(this.region, ev, re);
-                      success = true;
-                    } finally {
-                      indexUpdater.postEvent(this.region, ev, re,
-                          success);
-                    }
-                    } finally {
-                      ev.release();
-                    }
-                  }
                   continue;
                 }
                 if (entry.isSerialized() && !Token.isInvalidOrRemoved(tmpValue)) {
@@ -1864,7 +1807,6 @@ public class InitialImageOperation  {
 
       List chunkEntries = null;
       chunkEntries = new InitialImageVersionedEntryList(rgn.concurrencyChecksEnabled, MAX_ENTRIES_PER_CHUNK);
-      final boolean keyRequiresRegionContext = rgn.keyRequiresRegionContext();
       DiskRegion dr = rgn.getDiskRegion();
       if( dr!=null ){
         dr.setClearCountReference();
@@ -1926,9 +1868,6 @@ public class InitialImageOperation  {
                     entry = new InitialImageOperation.Entry();
                     entry.key = key;
                     entry.setVersionTag(stamp.asVersionTag());
-                    if (keyRequiresRegionContext) {
-                      entry.setEagerDeserialize();
-                    }
                     fillRes = mapEntry.fillInValue(rgn, entry, in, rgn.getDistributionManager());
                     if (versionVector != null) {
                       if (logger.isTraceEnabled(LogMarker.GII)) {
@@ -1939,9 +1878,6 @@ public class InitialImageOperation  {
                 } else {
                   entry = new InitialImageOperation.Entry();
                   entry.key = key;
-                  if (keyRequiresRegionContext) {
-                    entry.setEagerDeserialize();
-                  }
                   fillRes = mapEntry.fillInValue(rgn, entry, in, rgn.getDistributionManager());
                 }
               }
@@ -1961,11 +1897,6 @@ public class InitialImageOperation  {
               entry.setLastModified(rgn.getDistributionManager(), mapEntry
                   .getLastModified());
             }
-            if (keyRequiresRegionContext) {
-              entry.key = ((KeyWithRegionContext)key)
-                  .beforeSerializationWithValue(entry.isInvalid()
-                      || entry.isLocalInvalid());
-            }
 
             chunkEntries.add(entry);
             currentChunkSize += entry.calcSerializedSize();
@@ -2952,18 +2883,6 @@ public class InitialImageOperation  {
       this.entryBits = EntryBits.setSerialized(this.entryBits, isSerialized);
     }
 
-    public boolean isEagerDeserialize() {
-      return EntryBits.isEagerDeserialize(this.entryBits);
-    }
-
-    void setEagerDeserialize() {
-      this.entryBits = EntryBits.setEagerDeserialize(this.entryBits);
-    }
-
-    void clearEagerDeserialize() {
-      this.entryBits = EntryBits.clearEagerDeserialize(this.entryBits);
-    }
-
     public boolean isInvalid() {
       return (this.value == null) && !EntryBits.isLocalInvalid(this.entryBits);
     }
@@ -3005,12 +2924,7 @@ public class InitialImageOperation  {
       out.writeByte(flags);
       DataSerializer.writeObject(this.key, out);
       if (!EntryBits.isTombstone(this.entryBits)) {
-        if (!isEagerDeserialize()) {
-          DataSerializer.writeObjectAsByteArray(this.value, out);
-        }
-        else {
-          DataSerializer.writeArrayOfByteArrays((byte[][])this.value, out);
-        }
+        DataSerializer.writeObjectAsByteArray(this.value, out);
       }
       out.writeLong(this.lastModified);
       if (this.versionTag != null) {
@@ -3030,11 +2944,7 @@ public class InitialImageOperation  {
       if (EntryBits.isTombstone(this.entryBits)) {
         this.value = Token.TOMBSTONE;
       } else {
-        if (!isEagerDeserialize()) {
-          this.value = DataSerializer.readByteArray(in);
-        } else {
-          this.value = DataSerializer.readArrayOfByteArrays(in);
-        }
+        this.value = DataSerializer.readByteArray(in);
       }
       this.lastModified = in.readLong();
       if ((flags & HAS_VERSION) != 0) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/880f8648/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/InternalRegionArguments.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/InternalRegionArguments.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/InternalRegionArguments.java
index 3a254d5..c403231 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/InternalRegionArguments.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/InternalRegionArguments.java
@@ -22,7 +22,6 @@ import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
-import com.gemstone.gemfire.cache.query.internal.IndexUpdater;
 import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
 import com.gemstone.gemfire.internal.cache.LocalRegion.TestCallable;
 import com.gemstone.gemfire.internal.cache.partitioned.RegionAdvisor;
@@ -58,8 +57,6 @@ public final class InternalRegionArguments
   private DiskRegion diskRegion;
   private PartitionedRegion partitionedRegion;
   private TestCallable testCallable;
-  private IndexUpdater indexUpdater;
-  private boolean keyRequiresRegionContext;
 
   private AbstractGatewaySender parallelGatewaySender;
   private AbstractGatewaySender serialGatewaySender;
@@ -233,25 +230,6 @@ public final class InternalRegionArguments
     return this.testCallable;
   }
 
-  // SQLFabric index manager
-  public IndexUpdater getIndexUpdater() {
-    return this.indexUpdater;
-  }
-
-  public InternalRegionArguments setIndexUpdater(IndexUpdater indexUpdater) {
-    this.indexUpdater = indexUpdater;
-    return this;
-  }
-
-  public boolean keyRequiresRegionContext() {
-    return this.keyRequiresRegionContext;
-  }
-
-  public InternalRegionArguments setKeyRequiresRegionContext(boolean v) {
-    this.keyRequiresRegionContext = v;
-    return this;
-  }
-
   public InternalRegionArguments setUserAttribute(Object userAttr) {
     this.userAttribute = userAttr;
     return this;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/880f8648/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/InvalidateOperation.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/InvalidateOperation.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/InvalidateOperation.java
index 6e1d91e..1742ad3 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/InvalidateOperation.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/InvalidateOperation.java
@@ -112,9 +112,6 @@ public class InvalidateOperation 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, this.callbackArg, true, getSender());

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/880f8648/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/KeyInfo.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/KeyInfo.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/KeyInfo.java
index 30f30fc..3065b47 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/KeyInfo.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/KeyInfo.java
@@ -40,9 +40,8 @@ public class KeyInfo {
   private Object callbackArg;
   private int bucketId;
 
-  // Rahul: The value field is add since Sqlf Partition resolver also relies on the value
-  // part to calculate the routing object if the table is not partitioned on 
-  // primary key.
+  // The value field is added since a Partition resolver could also rely on the value
+  // part to calculate the routing object
   @Retained(ENTRY_EVENT_NEW_VALUE)
   private final Object value;
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/880f8648/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/KeyWithRegionContext.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/KeyWithRegionContext.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/KeyWithRegionContext.java
deleted file mode 100644
index b28a551..0000000
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/KeyWithRegionContext.java
+++ /dev/null
@@ -1,70 +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;
-
-import com.gemstone.gemfire.internal.DataSerializableFixedID;
-
-/**
- * Interface that can be implemented by region keys to allow passing the region
- * after deserialization for any region specific initialization. Note that the
- * {@link LocalRegion#setKeyRequiresRegionContext(boolean)} should also be set
- * for {@link #setRegionContext(LocalRegion)} to be invoked by the GemFire
- * layer. It is required that either all keys of the region implement this
- * interface (and the flag
- * {@link LocalRegion#setKeyRequiresRegionContext(boolean)} is set) or none do.
- * 
- * Currently used by SQLFabric for the optimized
- * <code>CompactCompositeRegionKey</code> key implementations that keeps the key
- * as a reference to the raw row bytes and requires a handle of the table schema
- * to interpret those in hashCode/equals/compareTo methods that have no region
- * context information.
- * 
- */
-public interface KeyWithRegionContext extends DataSerializableFixedID {
-
-  /**
-   * Pass the region of the key for setting up of any region specific context
-   * for the key. In case of recovery from disk the region may not have been
-   * fully initialized yet, so the implementation needs to take that into
-   * consideration.
-   * 
-   * @param region
-   *          the region of this key
-   */
-  public void setRegionContext(LocalRegion region);
-
-  /**
-   * Changes required to be done to the key, if any, to optimize serialization
-   * for sending across when value is also available.
-   * 
-   * SQLFabric will make the value bytes as null in the key so as to avoid
-   * serializing the row twice.
-   */
-  public KeyWithRegionContext beforeSerializationWithValue(boolean valueIsToken);
-
-  /**
-   * Changes required to be done to the key, if any, to after deserializing the
-   * key in reply with value available. The value is required to be provided in
-   * deserialized format (e.g. for {@link CachedDeserializable}s the
-   * deserialized value being wrapped must be passed).
-   * 
-   * SQLFabric will restore the value bytes that were set as null in
-   * {@link #beforeSerializationWithValue}.
-   */
-  public KeyWithRegionContext afterDeserializationWithValue(Object val);
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/880f8648/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/ListOfDeltas.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/ListOfDeltas.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/ListOfDeltas.java
deleted file mode 100644
index 6592863..0000000
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/ListOfDeltas.java
+++ /dev/null
@@ -1,100 +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;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-import com.gemstone.gemfire.InternalGemFireException;
-import com.gemstone.gemfire.cache.EntryEvent;
-import com.gemstone.gemfire.internal.cache.delta.Delta;
-
-
-/**
- * 
- *
- */
-public final class ListOfDeltas implements Delta {
-
-  private  List<Delta> listOfDeltas;
-  transient private int deltaAppliedIndex = 0;
-  public ListOfDeltas(final int size) {
-    this.listOfDeltas = new ArrayList<Delta>(size);
-  }
-
-  public ListOfDeltas(Delta deltaObj) {
-    this.listOfDeltas = new ArrayList<Delta>();
-    this.listOfDeltas.add(deltaObj);
-  }
-  
-  public ListOfDeltas() {    
-  }
-
-  
-
-  public Object apply(EntryEvent ev) {
-    if (ev != null && ev instanceof EntryEventImpl) {
-      EntryEventImpl putEvent = (EntryEventImpl)ev;
-      int last = this.listOfDeltas.size() -1;
-      for (int i = this.deltaAppliedIndex; i < listOfDeltas.size(); i++) {
-        Object o = listOfDeltas.get(i).apply(putEvent);
-        if(i < last) { 
-          putEvent.setOldValue(o);
-        }else {
-          putEvent.setNewValue(o);
-        }
-      }
-      return putEvent.getNewValue();
-    }
-    else {
-      throw new InternalGemFireException(
-          "ListOfDeltas.apply: putEvent is either null "
-              + "or is not of type EntryEventImpl");
-    }
-  }
-
-
-  public Object merge(Object toMerge, boolean isCreate)
-  {
-    throw new UnsupportedOperationException("Invocation not expected");
-  }
-  
-  public Object merge(Object toMerge)
-  {
-    this.listOfDeltas.add((Delta)toMerge); 
-    return this;
-  }
-  
-  public Object getResultantValue()
-  {
-    return this;
-  } 
-  
-  public int getNumDeltas() {
-    return this.listOfDeltas.size();
-  }
-  
-  public void setDeltaAppliedIndex(int deltaApplied) {
-    this.deltaAppliedIndex = deltaApplied;
-  }
-  
-  public List<Delta> getListOfDeltas() {
-    return Collections.unmodifiableList(this.listOfDeltas);
-  }
-}
-//SqlFabric changes END

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/880f8648/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/LocalRegion.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/LocalRegion.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/LocalRegion.java
index 6b664fe..8b9664f 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/LocalRegion.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/LocalRegion.java
@@ -36,7 +36,6 @@ import com.gemstone.gemfire.cache.query.*;
 import com.gemstone.gemfire.cache.query.internal.DefaultQuery;
 import com.gemstone.gemfire.cache.query.internal.DefaultQueryService;
 import com.gemstone.gemfire.cache.query.internal.ExecutionContext;
-import com.gemstone.gemfire.cache.query.internal.IndexUpdater;
 import com.gemstone.gemfire.cache.query.internal.cq.CqService;
 import com.gemstone.gemfire.cache.query.internal.index.IndexCreationData;
 import com.gemstone.gemfire.cache.query.internal.index.IndexManager;
@@ -428,26 +427,6 @@ public class LocalRegion extends AbstractRegion
     return initializingRegion.get();
   }
 
-  /**
-   * Return true if the keys of this region implement
-   * {@link KeyWithRegionContext} that require region specific context
-   * initialization after deserialization or recovery from disk.
-   * 
-   * Currently used by SQLFabric for the optimized
-   * <code>CompactCompositeRegionKey</code> that points to the raw row bytes and
-   * so requires a handle to table schema for interpretation of those bytes.
-   */
-  public boolean keyRequiresRegionContext() {
-    return this.keyRequiresRegionContext;
-  }
-
-  /**
-   * Set the {@link #keyRequiresRegionContext} flag to given value.
-   */
-  public final void setKeyRequiresRegionContext(boolean v) {
-    this.keyRequiresRegionContext = v;
-  }
-
   public CancelCriterion getCancelCriterion() {
     return this.stopper;
   }
@@ -502,11 +481,9 @@ public class LocalRegion extends AbstractRegion
     this.initializationLatchAfterGetInitialImage = new StoppableCountDownLatch(this.stopper, 1);
     this.afterRegionCreateEventLatch = new StoppableCountDownLatch(this.stopper, 1);
 
-    // set the user-attribute object upfront for SQLFabric
     if (internalRegionArgs.getUserAttribute() != null) {
       setUserAttribute(internalRegionArgs.getUserAttribute());
     }
-    setKeyRequiresRegionContext(internalRegionArgs.keyRequiresRegionContext());
     initializingRegion.set(this);
 
     if (internalRegionArgs.getCachePerfStatsHolder() != null) {
@@ -674,10 +651,6 @@ public class LocalRegion extends AbstractRegion
     }
   }
 
-  public IndexUpdater getIndexUpdater() {
-    return this.entries.getIndexUpdater();
-  }
-
   boolean isCacheClosing()
   {
     return this.cache.isClosed();
@@ -854,10 +827,7 @@ public class LocalRegion extends AbstractRegion
                 && internalRegionArgs.isUsedForPartitionedRegionBucket()) {
               final PartitionedRegion pr = internalRegionArgs
                   .getPartitionedRegion();
-              internalRegionArgs.setIndexUpdater(pr.getIndexUpdater());
               internalRegionArgs.setUserAttribute(pr.getUserAttribute());
-              internalRegionArgs.setKeyRequiresRegionContext(pr
-                  .keyRequiresRegionContext());
               if (pr.isShadowPR()) {
                 newRegion = new BucketRegionQueue(subregionName, regionAttributes,
                   this, this.cache, internalRegionArgs);
@@ -1016,8 +986,6 @@ public class LocalRegion extends AbstractRegion
       }
   }
 
-  // split into a separate newCreateEntryEvent since SQLFabric may need to
-  // manipulate event before doing the put (e.g. posDup flag)
   @Retained
   public final EntryEventImpl newCreateEntryEvent(Object key, Object value,
       Object aCallbackArgument) {
@@ -1076,8 +1044,6 @@ public class LocalRegion extends AbstractRegion
       }
   }
 
-  // split into a separate newDestroyEntryEvent since SQLFabric may need to
-  // manipulate event before doing the put (e.g. posDup flag)
   @Retained
   public final EntryEventImpl newDestroyEntryEvent(Object key,
       Object aCallbackArgument) {
@@ -1588,15 +1554,8 @@ public class LocalRegion extends AbstractRegion
         event.setNewEventId(cache.getDistributedSystem());
       }
       Object oldValue = null;
-      // Sqlf changes begin
-      // see #40294.
-
-      // Rahul: this has to be an update.
-      // so executing it as an update.
-      boolean forceUpdateForDelta = event.hasDelta();
-      // Sqlf Changes end.
       if (basicPut(event, false, // ifNew
-          forceUpdateForDelta, // ifOld
+          false, // ifOld
           null, // expectedOldValue
           false // requireOldValue
       )) {
@@ -1612,8 +1571,6 @@ public class LocalRegion extends AbstractRegion
       return handleNotAvailable(oldValue);
   }
 
-  // split into a separate newUpdateEntryEvent since SQLFabric may need to
-  // manipulate event before doing the put (e.g. posDup flag)
   @Retained
   public final EntryEventImpl newUpdateEntryEvent(Object key, Object value,
       Object aCallbackArgument) {
@@ -1643,17 +1600,6 @@ public class LocalRegion extends AbstractRegion
       if (!eventReturned) event.release();
     }
   }
-  /**
-   * Creates an EntryEventImpl that is optimized to not fetch data from HDFS.
-   * This is meant to be used by PUT dml from GemFireXD.
-   */
-  @Retained
-  public final EntryEventImpl newPutEntryEvent(Object key, Object value,
-      Object aCallbackArgument) {
-    EntryEventImpl ev = newUpdateEntryEvent(key, value, aCallbackArgument);
-    ev.setPutDML(true);
-    return ev;
-  }
   private void extractDeltaIntoEvent(Object value, EntryEventImpl event) {
     // 1. Check for DS-level delta property.
     // 2. Default value for operation type is UPDATE, so no need to check that here.
@@ -3579,8 +3525,6 @@ public class LocalRegion extends AbstractRegion
    * Returns the value of the entry with the given key as it is stored on disk.
    * While the value may be read from disk, it is <b>not </b> stored into the
    * entry in the VM. This method is intended for testing purposes only.
-   * DO NOT use in product code else it will break SQLFabric that has cases
-   * where routing object is not part of only the key.
    *
    * @throws EntryNotFoundException
    *           No entry with <code>key</code> exists
@@ -3619,8 +3563,7 @@ public class LocalRegion extends AbstractRegion
   /**
    * Get the serialized bytes from disk. This method only looks for the value on
    * the disk, ignoring heap data. This method is intended for testing purposes
-   * only. DO NOT use in product code else it will break SQLFabric that has
-   * cases where routing object is not part of only the key.
+   * only. 
    * 
    * @param key the object whose hashCode is used to find the value
    * @return either a byte array, a CacheDeserializable with the serialized value,
@@ -3675,9 +3618,6 @@ public class LocalRegion extends AbstractRegion
   /**
    * Does a get that attempts to not fault values in from disk or make the entry
    * the most recent in the LRU.
-   * 
-   * Originally implemented in WAN gateway code and moved here in the sqlfire
-   * "cheetah" branch.
    * @param adamant fault in and affect LRU as a last resort
    * @param allowTombstone also return Token.TOMBSTONE if the entry is deleted
    * @param serializedFormOkay if the serialized form can be returned
@@ -5069,9 +5009,6 @@ public class LocalRegion extends AbstractRegion
   
   /**
    * Get the best iterator for the region entries.
-   * 
-   * TODO there has been some work on this on the sqlfire branch that should
-   * be picked up here.
    */
   public Iterator<RegionEntry> getBestIterator(boolean includeValues) {
     if(this instanceof DistributedRegion) {
@@ -5395,12 +5332,6 @@ public class LocalRegion extends AbstractRegion
         callbackArg = new GatewaySenderEventCallbackArgument(callbackArg);
       }
     }
-    //Asif: Modified the call to this constructor by passing the new value obtained from remote site
-    //instead of null .
-    //The need for this arose, because creation of EntryEvent, makes call to PartitionResolver,
-    //to get Hash. If the partitioning column is different from primary key, 
-    //the resolver for Sqlfabric is not able to obtain the hash object used for creation of KeyInfo  
-     
     @Released final EntryEventImpl event = EntryEventImpl.create(this, Operation.CREATE, key,
        value, callbackArg,  false /* origin remote */, client.getDistributedMember(),
         true /* generateCallbacks */,
@@ -5420,9 +5351,6 @@ public class LocalRegion extends AbstractRegion
     }
 
     // Set the new value to the input byte[] if it isn't null
-    /// For SqlFabric, if the new value happens to be an serialized object, then 
-    //it needs to be converted into VMCachedDeserializable , or serializable delta 
-    // as the case may be
     if (value != null) {
       // If the byte[] represents an object, then store it serialized
       // in a CachedDeserializable; otherwise store it directly as a byte[]
@@ -6064,12 +5992,6 @@ public class LocalRegion extends AbstractRegion
     long lastModifiedTime = event.getEventTime(lastModified);
     updateStatsForPut(entry, lastModifiedTime, lruRecentUse);
     if (!isProxy()) {
-      //if (this.isUsedForPartitionedRegionBucket) {
-      //  if (this.sqlfIndexManager != null) {
-      //    this.sqlfIndexManager.onEvent(this, event, entry);
-      //  }
-      //}
-
       if (!clearConflict && this.indexManager != null) {
         try {
           if (!entry.isInvalid()) {
@@ -6340,7 +6262,6 @@ public class LocalRegion extends AbstractRegion
          }
        }
        isDup = this.eventTracker.hasSeenEvent(event);
-       // don't clobber existing posDup flag e.g. set from SQLFabric client
        if (isDup) {
          event.setPossibleDuplicate(true);
          if (this.concurrencyChecksEnabled && event.getVersionTag() == null) {
@@ -7844,25 +7765,9 @@ public class LocalRegion extends AbstractRegion
       }
     }
   }
-  void cleanUpOnIncompleteOp(EntryEventImpl event,   RegionEntry re, 
-      boolean eventRecorded, boolean updateStats, boolean isReplace) {
-    //TODO:Asif: This is incorrect implementation for replicated region in case of
-    //sql fabric, as sqlf index would already be  updated, if eventRecorded 
-    //flag is true.So if entry is being removed , 
-    //then the sqlfindex also needs to be corrected
-    IndexUpdater iu = this.getIndexUpdater(); // sqlf system
-    if(!eventRecorded || iu ==null || isReplace) {
-    //Ok to remove entry whether sqlfabric or gfe as index has not been modified yet by the operation
-      this.entries.removeEntry(event.getKey(), re, updateStats) ;      
-    }else {
-      // a sqlf system, with event recorded as true. we need to update index.
-      //Use the current event to indicate destroy.should be ok
-      Operation oldOp = event.getOperation();
-      event.setOperation(Operation.DESTROY);
-      this.entries.removeEntry(event.getKey(), re, updateStats, event, this, iu);
-      event.setOperation(oldOp);
-    } 
-    
+  void cleanUpOnIncompleteOp(EntryEventImpl event, RegionEntry re) {
+    //Ok to remove entry as index has not been modified yet by the operation
+    this.entries.removeEntry(event.getKey(), re, false) ;      
   }
 
   static void validateRegionName(String name)
@@ -10531,8 +10436,6 @@ public class LocalRegion extends AbstractRegion
   }
 
 
-  // split into a separate newPutAllOperation since SQLFabric may need to
-  // manipulate event before doing the put (e.g. posDup flag)
   public final DistributedPutAllOperation newPutAllOperation(Map<?, ?> map, Object callbackArg) {
     if (map == null) {
       throw new NullPointerException(LocalizedStrings
@@ -10556,12 +10459,6 @@ public class LocalRegion extends AbstractRegion
     DistributedPutAllOperation dpao = new DistributedPutAllOperation(event, map.size(), false);
     return dpao;
   }
-    public final DistributedPutAllOperation newPutAllForPUTDmlOperation(Map<?, ?> map, Object callbackArg) {
-    DistributedPutAllOperation dpao = newPutAllOperation(map, callbackArg);
-    dpao.getEvent().setPutDML(true);
-    return dpao;
-  }
-
   
   public final DistributedRemoveAllOperation newRemoveAllOperation(Collection<?> keys, Object callbackArg) {
     if (keys == null) {
@@ -10613,8 +10510,6 @@ public class LocalRegion extends AbstractRegion
         putallOp, this, Operation.PUTALL_CREATE, key, value);
 
     try {
-    event.setPutDML(putallOp.getEvent().isPutDML());
-    
     if (tagHolder != null) {
       event.setVersionTag(tagHolder.getVersionTag());
       event.setFromServer(tagHolder.isFromServer());
@@ -11015,8 +10910,7 @@ public class LocalRegion extends AbstractRegion
       final 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
         // cut the visit short if we find a CacheLoader
         return !prof.hasCacheLoader;
       }
@@ -11033,8 +10927,8 @@ public class LocalRegion extends AbstractRegion
       assert profile instanceof CacheProfile;
       final CacheProfile prof = (CacheProfile)profile;
 
-      // if region in cache is in recovery, or member not initialized exclude
-      if (!prof.inRecovery && !prof.memberUnInitialized) {
+      // if region in cache is in recovery
+      if (!prof.inRecovery) {
         // cut the visit short if we find a CacheWriter
         return !prof.hasCacheWriter;
       }
@@ -11486,15 +11380,6 @@ public class LocalRegion extends AbstractRegion
     distributeUpdatedProfileOnSenderCreation();
   }
   
-  /**
-   * @since GemFire SqlFabric
-   *
-   */
-  void distributeUpdatedProfileOnHubCreation()
-  {
-    // No op
-  }  
-  
   void distributeUpdatedProfileOnSenderCreation()
   {
     // No op

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/880f8648/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/Oplog.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/Oplog.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/Oplog.java
index 4c04054..59b0893 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/Oplog.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/Oplog.java
@@ -1867,7 +1867,6 @@ public final class Oplog implements CompactableOplog, Flushable {
     CountingDataInputStream dis = null;
     try {
       final LocalRegion currentRegion = LocalRegion.getInitializingRegion();
-      final boolean keyRequiresRegionContext = currentRegion != null ? currentRegion.keyRequiresRegionContext() : false;
       final Version version = getProductVersionIfOld();
       final ByteArrayDataInput in = new ByteArrayDataInput();
       final HeapDataOutputStream hdos = new HeapDataOutputStream(Version.CURRENT);
@@ -1909,7 +1908,7 @@ public final class Oplog implements CompactableOplog, Flushable {
           }
             break;
           case OPLOG_NEW_ENTRY_0ID:
-            readNewEntry(dis, opCode, deletedIds, recoverValues, currentRegion, keyRequiresRegionContext, version, in, hdos);
+            readNewEntry(dis, opCode, deletedIds, recoverValues, currentRegion, version, in, hdos);
             recordCount++;
             break;
           case OPLOG_MOD_ENTRY_1ID:
@@ -1920,7 +1919,7 @@ public final class Oplog implements CompactableOplog, Flushable {
           case OPLOG_MOD_ENTRY_6ID:
           case OPLOG_MOD_ENTRY_7ID:
           case OPLOG_MOD_ENTRY_8ID:
-            readModifyEntry(dis, opCode, deletedIds, recoverValues, currentRegion, keyRequiresRegionContext, version, in, hdos);
+            readModifyEntry(dis, opCode, deletedIds, recoverValues, currentRegion, version, in, hdos);
             recordCount++;
             break;
           case OPLOG_MOD_ENTRY_WITH_KEY_1ID:
@@ -1931,7 +1930,7 @@ public final class Oplog implements CompactableOplog, Flushable {
           case OPLOG_MOD_ENTRY_WITH_KEY_6ID:
           case OPLOG_MOD_ENTRY_WITH_KEY_7ID:
           case OPLOG_MOD_ENTRY_WITH_KEY_8ID:
-            readModifyEntryWithKey(dis, opCode, deletedIds, recoverValues, currentRegion, keyRequiresRegionContext, version, in,
+            readModifyEntryWithKey(dis, opCode, deletedIds, recoverValues, currentRegion, version, in,
                 hdos);
             recordCount++;
             break;
@@ -2414,7 +2413,7 @@ public final class Oplog implements CompactableOplog, Flushable {
    * @throws IOException
    */
   private void readNewEntry(CountingDataInputStream dis, byte opcode, OplogEntryIdSet deletedIds, boolean recoverValue,
-      final LocalRegion currentRegion, boolean keyRequiresRegionContext, Version version, ByteArrayDataInput in,
+      final LocalRegion currentRegion, Version version, ByteArrayDataInput in,
       HeapDataOutputStream hdos) throws IOException {
     final boolean isPersistRecoveryDebugEnabled = logger.isTraceEnabled(LogMarker.PERSIST_RECOVERY);
     
@@ -2553,9 +2552,6 @@ public final class Oplog implements CompactableOplog, Flushable {
           }
         } else {
           Object key = deserializeKey(keyBytes, version, in);
-          if (keyRequiresRegionContext) {
-            ((KeyWithRegionContext) key).setRegionContext(currentRegion);
-          }
           {
             Object oldValue = getRecoveryMap().put(oplogKeyId, key);
             if (oldValue != null) {
@@ -2605,7 +2601,7 @@ public final class Oplog implements CompactableOplog, Flushable {
    * @throws IOException
    */
   private void readModifyEntry(CountingDataInputStream dis, byte opcode, OplogEntryIdSet deletedIds, boolean recoverValue,
-      LocalRegion currentRegion, boolean keyRequiresRegionContext, Version version, ByteArrayDataInput in, HeapDataOutputStream hdos)
+      LocalRegion currentRegion, Version version, ByteArrayDataInput in, HeapDataOutputStream hdos)
       throws IOException {
     final boolean isPersistRecoveryDebugEnabled = logger.isTraceEnabled(LogMarker.PERSIST_RECOVERY);
     
@@ -2711,9 +2707,6 @@ public final class Oplog implements CompactableOplog, Flushable {
         byte[] keyBytes = (byte[]) skippedKeyBytes.get(oplogKeyId);
         if (keyBytes != null) {
           key = deserializeKey(keyBytes, version, in);
-          if (keyRequiresRegionContext) {
-            ((KeyWithRegionContext) key).setRegionContext(currentRegion);
-          }
         }
       }
       if (isPersistRecoveryDebugEnabled) {
@@ -2829,7 +2822,7 @@ public final class Oplog implements CompactableOplog, Flushable {
    * @throws IOException
    */
   private void readModifyEntryWithKey(CountingDataInputStream dis, byte opcode, OplogEntryIdSet deletedIds, boolean recoverValue,
-      final LocalRegion currentRegion, final boolean keyRequiresRegionContext, Version version, ByteArrayDataInput in,
+      final LocalRegion currentRegion, Version version, ByteArrayDataInput in,
       HeapDataOutputStream hdos) throws IOException {
     long oplogOffset = -1;
 
@@ -2966,9 +2959,6 @@ public final class Oplog implements CompactableOplog, Flushable {
         }
       } else {
         Object key = deserializeKey(keyBytes, version, in);
-        if (keyRequiresRegionContext) {
-          ((KeyWithRegionContext) key).setRegionContext(currentRegion);
-        }
         Object oldValue = getRecoveryMap().put(oplogKeyId, key);
         if (oldValue != null) {
           throw new AssertionError(LocalizedStrings.Oplog_DUPLICATE_CREATE.toLocalizedString(oplogKeyId));
@@ -7039,8 +7029,6 @@ public final class Oplog implements CompactableOplog, Flushable {
     public void handleValueOverflow(RegionEntryContext context) {throw new IllegalStateException();}
 
     @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");  }
 
     @Override

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/880f8648/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PRHARedundancyProvider.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PRHARedundancyProvider.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PRHARedundancyProvider.java
index f933024..c33efb7 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PRHARedundancyProvider.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PRHARedundancyProvider.java
@@ -432,8 +432,6 @@ public class PRHARedundancyProvider
       this.prRegion.checkReadiness();
       Set<InternalDistributedMember> available = this.prRegion
           .getRegionAdvisor().adviseInitializedDataStore();
-      // remove uninitialized members for bucket creation
-      this.prRegion.getCache().removeUnInitializedMembers(available);
       InternalDistributedMember target = null;
       available.removeAll(attempted);
       for (InternalDistributedMember member : available) {
@@ -575,8 +573,6 @@ public class PRHARedundancyProvider
         // Always go back to the advisor, see if any fresh data stores are
           // present.
         Set<InternalDistributedMember> allStores = getAllStores(partitionName);
-        // remove nodes that are not fully initialized
-        this.prRegion.getCache().removeUnInitializedMembers(allStores);
 
         loggedInsufficentStores  = checkSufficientStores(allStores, 
             loggedInsufficentStores);
@@ -776,7 +772,6 @@ public class PRHARedundancyProvider
       //  the parent's in case of colocation) so it is now passed
       //InternalDistributedMember targetPrimary = getPreferredDataStore(
       //    acceptedMembers, Collections.<InternalDistributedMember> emptySet());
-      this.prRegion.getCache().removeUnInitializedMembers(acceptedMembers);
       targetPrimary = getPreferredDataStore(acceptedMembers, Collections
           .<InternalDistributedMember> emptySet());
     }
@@ -1580,9 +1575,6 @@ public class PRHARedundancyProvider
     if (!PRHARedundancyProvider.this.prRegion.isDataStore()) {
       return;
     }
-    if (cache.isUnInitializedMember(cache.getMyId())) {
-      return;
-    }
     Runnable task = new RecoveryRunnable(this) {
       @Override
       public void run2()

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/880f8648/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PartitionAttributesImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PartitionAttributesImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PartitionAttributesImpl.java
index 47548f3..dd90a62 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PartitionAttributesImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PartitionAttributesImpl.java
@@ -384,16 +384,6 @@ public class PartitionAttributesImpl implements PartitionAttributes,
       .append("]") .toString();
   }
 
-  public String getStringForSQLF() {
-    final StringBuilder sb = new StringBuilder();
-    return sb.append("redundantCopies=").append(getRedundantCopies()).append(
-        ",totalMaxMemory=").append(this.totalMaxMemory).append(
-        ",totalNumBuckets=").append(this.totalNumBuckets).append(
-        ",colocatedWith=").append(this.colocatedRegionName).append(
-        ",recoveryDelay=").append(this.recoveryDelay).append(
-        ",startupRecoveryDelay=").append(this.startupRecoveryDelay).toString();
-  }
-
   /**
    * @throws IllegalStateException if off-heap and the actual value is not yet known (because the DistributedSystem has not yet been created)
    */

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/880f8648/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PartitionedRegion.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PartitionedRegion.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PartitionedRegion.java
index 9375d04..26c91e0 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PartitionedRegion.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PartitionedRegion.java
@@ -1035,16 +1035,6 @@ public class PartitionedRegion extends LocalRegion implements
   }
   
   @Override
-  void distributeUpdatedProfileOnHubCreation()
-  {
-    if (!(this.isClosed || this.isLocallyDestroyed)) {
-      // tell others of the change in status
-      this.requiresNotification = true;
-      new UpdateAttributesProcessor(this).distribute(false);      
-    }
-  }
-
-  @Override
   void distributeUpdatedProfileOnSenderCreation()
   {
     if (!(this.isClosed || this.isLocallyDestroyed)) {
@@ -1376,11 +1366,7 @@ public class PartitionedRegion extends LocalRegion implements
     boolean colocatedLockAcquired = false;
     try {
       boolean colocationComplete = false;
-      if (colocatedRegion != null && !prConfig.isColocationComplete() &&
-        // if the current node is marked uninitialized (SQLF DDL replay in
-        // progress) then colocation will definitely not be marked complete so
-        // avoid taking the expensive region lock
-          !getCache().isUnInitializedMember(getDistributionManager().getId())) {
+      if (colocatedRegion != null && !prConfig.isColocationComplete()) {
         colocatedLock = colocatedRegion.getRegionLock();
         colocatedLock.lock();
         colocatedLockAcquired = true;
@@ -1389,16 +1375,7 @@ public class PartitionedRegion extends LocalRegion implements
         if (parentConf.isColocationComplete()
             && parentConf.hasSameDataStoreMembers(prConfig)) {
           colocationComplete = true;
-          // check if all the nodes have been initialized (SQLF bug #42089)
-          for (Node node : nodes) {
-            if (getCache().isUnInitializedMember(node.getMemberId())) {
-              colocationComplete = false;
-              break;
-            }
-          }
-          if (colocationComplete) {
-            prConfig.setColocationComplete();
-          }
+          prConfig.setColocationComplete();
         }
       }
 
@@ -1935,13 +1912,6 @@ public class PartitionedRegion extends LocalRegion implements
       if (targetNode == null) {
         try {
           bucketStorageAssigned=false;
-          // if this is a Delta update, then throw exception since the key doesn't
-          // exist if there is no bucket for it yet
-          if (event.hasDelta()) {
-            throw new EntryNotFoundException(LocalizedStrings.
-              PartitionedRegion_CANNOT_APPLY_A_DELTA_WITHOUT_EXISTING_ENTRY
-                .toLocalizedString());
-          }
           targetNode = createBucket(bucketId.intValue(), event.getNewValSizeForPR(),
               null);
         }
@@ -3462,10 +3432,8 @@ public class PartitionedRegion extends LocalRegion implements
       boolean isBucketSetAsFilter) {
     final Set routingKeys = execution.getFilter();
     final boolean primaryMembersNeeded = function.optimizeForWrite();
-    final boolean hasRoutingObjects = execution.hasRoutingObjects();
     HashMap<Integer, HashSet> bucketToKeysMap = FunctionExecutionNodePruner
-        .groupByBucket(this, routingKeys, primaryMembersNeeded,
-            hasRoutingObjects, isBucketSetAsFilter);
+        .groupByBucket(this, routingKeys, primaryMembersNeeded, false, isBucketSetAsFilter);
     HashMap<InternalDistributedMember, HashSet> memberToKeysMap = new HashMap<InternalDistributedMember, HashSet>();
     HashMap<InternalDistributedMember, HashSet<Integer>> memberToBuckets = FunctionExecutionNodePruner
     .groupByMemberToBuckets(this, bucketToKeysMap.keySet(), primaryMembersNeeded);    
@@ -3555,7 +3523,7 @@ public class PartitionedRegion extends LocalRegion implements
     else {
       localBucketSet = FunctionExecutionNodePruner
       .getBucketSet(PartitionedRegion.this, localKeys,
-                    hasRoutingObjects, isBucketSetAsFilter);
+                    false, isBucketSetAsFilter);
       
       remoteOnly = false;
     }
@@ -3591,7 +3559,7 @@ public class PartitionedRegion extends LocalRegion implements
         FunctionRemoteContext context = new FunctionRemoteContext(function,
             execution.getArgumentsForMember(recip.getId()), memKeys,
             FunctionExecutionNodePruner.getBucketSet(this, memKeys,
-                hasRoutingObjects, isBucketSetAsFilter), execution.isReExecute(),
+                false, isBucketSetAsFilter), execution.isReExecute(),
                 execution.isFnSerializationReqd());
         recipMap.put(recip, context);
       }
@@ -3621,15 +3589,8 @@ public class PartitionedRegion extends LocalRegion implements
     if (isBucketSetAsFilter) {
       bucketId = ((Integer) key).intValue();
     } else {
-      if (execution.hasRoutingObjects()) {
-        bucketId = Integer.valueOf(PartitionedRegionHelper
-            .getHashKey(this, key));
-      } else {
-        // bucketId = Integer.valueOf(PartitionedRegionHelper.getHashKey(this,
-        // Operation.FUNCTION_EXECUTION, key, null));
-        bucketId = Integer.valueOf(PartitionedRegionHelper.getHashKey(this,
+      bucketId = Integer.valueOf(PartitionedRegionHelper.getHashKey(this,
             Operation.FUNCTION_EXECUTION, key, null, null));
-      }
     }
     InternalDistributedMember targetNode = null;
     if (function.optimizeForWrite()) {
@@ -5066,21 +5027,6 @@ public class PartitionedRegion extends LocalRegion implements
   /**
    * generates new partitioned region ID globally.
    */
-  // !!!:ezoerner:20080321 made this function public and static.
-  // @todo should be moved to the Distributed System level as a general service
-  // for getting a unique id, with different "domains" for different
-  // contexts
-  // :soubhik:pr_func merge20914:21056: overloaded static and non-static version of generatePRId.
-  //   static version is used mainly with sqlf & non-static in gfe.
-  public static int generatePRId(InternalDistributedSystem sys, Cache cache) {
-    
-    GemFireCacheImpl gfcache = (GemFireCacheImpl) cache;
-    
-    if(gfcache == null) return 0;
-    
-    return _generatePRId(sys, gfcache.getPartitionedRegionLockService());
-  }
-  
   public int generatePRId(InternalDistributedSystem sys) {
     final DistributedLockService lockService = getPartitionedRegionLockService();
     return _generatePRId(sys, lockService);
@@ -6257,15 +6203,6 @@ public class PartitionedRegion extends LocalRegion implements
   }
 
   /**
-   * Currently used by SQLFabric to get a non-wrapped iterator for all entries
-   * for index consistency check.
-   */
-  public Set allEntries() {
-    return new PREntriesSet();
-  }
-
-
-  /**
    * Set view of entries. This currently extends the keySet iterator and
    * performs individual getEntry() operations using the keys
    * 
@@ -7678,20 +7615,7 @@ public class PartitionedRegion extends LocalRegion implements
   }
         
   @Override
-  public void localDestroyRegion(Object aCallbackArgument) {
-    localDestroyRegion(aCallbackArgument, false);
-  }
-
-  /**
-   * Locally destroy a region.
-   * 
-   * SQLFabric change: The parameter "ignoreParent" has been added to allow
-   * skipping the check for parent colocated region. This is because SQLFabric
-   * DDLs are distributed in any case and are guaranteed to be atomic (i.e. no
-   * concurrent DMLs on that table). Without this it is quite ugly to implement
-   * "TRUNCATE TABLE" which first drops the table and recreates it.
-   */
-  public void localDestroyRegion(Object aCallbackArgument, boolean ignoreParent)
+  public void localDestroyRegion(Object aCallbackArgument)
   {
     getDataView().checkSupportsRegionDestroy();
     String prName = this.getColocatedWith();
@@ -7707,7 +7631,7 @@ public class PartitionedRegion extends LocalRegion implements
       }
     }
 
-    if ((!ignoreParent && prName != null)
+    if ((prName != null)
         || (!childRegionsWithoutSendersList.isEmpty())) {
       throw new UnsupportedOperationException(
           "Any Region in colocation chain cannot be destroyed locally.");
@@ -9430,8 +9354,6 @@ public class PartitionedRegion extends LocalRegion implements
 
   /**
    * This method is intended for testing purposes only.
-   * DO NOT use in product code else it will break SQLFabric that has cases
-   * where routing object is not part of only the key.
    */
   @Override
   public Object getValueOnDisk(Object key) throws EntryNotFoundException {
@@ -9444,8 +9366,6 @@ public class PartitionedRegion extends LocalRegion implements
   
   /**
    * This method is intended for testing purposes only.
-   * DO NOT use in product code else it will break SQLFabric that has cases
-   * where routing object is not part of only the key.
    */
   @Override
   public Object getValueOnDiskOrBuffer(Object key) throws EntryNotFoundException {
@@ -9565,33 +9485,13 @@ public class PartitionedRegion extends LocalRegion implements
   }
 
   public PartitionResolver getPartitionResolver() {
-    // [SQLFabric] use PartitionAttributes to get the the resolver
-    // since it may change after ALTER TABLE
     return this.partitionAttributes.getPartitionResolver();
   }
 
   public String getColocatedWith() {
-    // [SQLFabric] use PartitionAttributes to get colocated region
-    // since it may change after ALTER TABLE
     return this.partitionAttributes.getColocatedWith();
   }
 
-  // For SQLFabric ALTER TABLE. Need to set the colocated region using
-  // PartitionAttributesImpl and also reset the parentAdvisor for
-  // BucketAdvisors.
-  /**
-   * Set the colocated with region path and adjust the BucketAdvisor's. This
-   * should *only* be invoked when region is just newly created and has no data
-   * or existing buckets else will have undefined behaviour.
-   * 
-   * @since GemFire 6.5
-   */
-  public void setColocatedWith(String colocatedRegionFullPath) {
-    ((PartitionAttributesImpl)this.partitionAttributes)
-        .setColocatedWith(colocatedRegionFullPath);
-    this.getRegionAdvisor().resetBucketAdvisorParents();
-  }
-
   /**
    * Used to get membership events from our advisor to implement
    * RegionMembershipListener invocations. This is copied almost in whole from
@@ -9649,98 +9549,6 @@ public class PartitionedRegion extends LocalRegion implements
     }
   }
   
-  /*
-   * This is an internal API for sqlFabric only <br>
-   * This is usefull to execute a function on set of nodes irrelevant of the
-   * routinKeys <br>
-   * notes : This API uses DefaultResultCollector. If you want your Custome
-   * Result collector, let me know
-   * 
-   * @param functionName
-   * @param args
-   * @param nodes
-   *                Set of DistributedMembers on which this function will be
-   *                executed
-   * @throws Exception
-   *//*
-  public ResultCollector executeFunctionOnNodes(String functionName,
-      Serializable args, Set nodes) throws Exception {
-    Assert.assertTrue(functionName != null, "Error: functionName is null");
-    Assert.assertTrue(nodes != null, "Error: nodes set is null");
-    Assert.assertTrue(nodes.size() != 0, "Error: empty nodes Set");
-    ResultCollector rc = new DefaultResultCollector();
-    boolean isSelf = nodes.remove(getMyId());
-    PartitionedRegionFunctionResponse response = null;
-    //TODO Yogesh: this API is broken after Resultsender implementation
-    //response = new PartitionedRegionFunctionResponse(this.getSystem(), nodes,
-    //    rc);
-    Iterator i = nodes.iterator();
-    while (i.hasNext()) {
-      InternalDistributedMember recip = (InternalDistributedMember)i.next();
-      PartitionedRegionFunctionMessage.send(recip, this, functionName, args,
-          null routingKeys , response, null);
-    }
-    if (isSelf) {
-      // execute locally and collect the result
-      if (this.dataStore != null) {
-        this.dataStore.executeOnDataStore(
-            null routingKeys , functionName, args, 0,null,rc,null);
-      }
-    }
-    return response;
-  }*/
-
-
-  /*
-   * This is an internal API for sqlFabric only <br>
-   * API for invoking a function using primitive ints as the routing objects
-   * (i.e. passing the hashcodes of the routing objects directly). <br>
-   * notes : This API uses DefaultResultCollector. If you want to pass your
-   * Custom Result collector, let me know
-   * 
-   * @param functionName
-   * @param args
-   * @param hashcodes
-   *          hashcodes of the routing objects
-   * @throws Exception
-   *//*
-  public ResultCollector executeFunctionUsingHashCodes(String functionName,
-      Serializable args, int hashcodes[]) throws Exception {
-    Assert.assertTrue(functionName != null, "Error: functionName is null");
-    Assert.assertTrue(hashcodes != null, "Error: hashcodes array is null");
-    Assert.assertTrue(hashcodes.length != 0, "Error: empty hashcodes array");
-    Set nodes = new HashSet();
-    for (int i = 0; i < hashcodes.length; i++) {
-      int bucketId = hashcodes[i] % getTotalNumberOfBuckets();
-      InternalDistributedMember n = getNodeForBucketRead(bucketId);
-      nodes.add(n);
-    }
-    return executeFunctionOnNodes(functionName, args, nodes);
-  }*/
-
-  /**
-   * This is an internal API for sqlFabric only <br>
-   * Given a array of routing objects, returns a set of members on which the (owner of each
-   * buckets)
-   * 
-   * @param routingObjects array of routing objects passed 
-   * @return Set of  InternalDistributedMembers
-   */
-  public Set getMembersFromRoutingObjects(Object[] routingObjects) {
-    Assert.assertTrue(routingObjects != null, "Error: null routingObjects ");
-    Assert.assertTrue(routingObjects.length != 0, "Error: empty routingObjects ");
-    Set nodeSet = new HashSet();
-    int bucketId;
-    for (int i = 0; i < routingObjects.length; i++) {
-      bucketId = PartitionedRegionHelper.getHashKey(routingObjects[i],
-                                                    getTotalNumberOfBuckets());
-      InternalDistributedMember lnode = getOrCreateNodeForBucketRead(bucketId);
-      if (lnode != null) {
-        nodeSet.add(lnode);
-      }
-    }
-    return nodeSet;
-  }
   @Override
   protected RegionEntry basicGetTXEntry(KeyInfo keyInfo) {
     int bucketId = keyInfo.getBucketId();
@@ -10525,9 +10333,7 @@ public class PartitionedRegion extends LocalRegion implements
   }
 
   /**
-   * Returns the local BucketRegion given the key and value. Particularly useful
-   * for SQLFabric where the routing object may be part of value and determining
-   * from key alone will require an expensive global index lookup.
+   * Returns the local BucketRegion given the key and value.
    * Returns null if no BucketRegion exists.
    */
   public BucketRegion getBucketRegion(Object key, Object value) {
@@ -10754,74 +10560,6 @@ public class PartitionedRegion extends LocalRegion implements
     }  
   }
 
-  /**
-   * Clear local primary buckets.
-   * This is currently only used by gemfirexd truncate table
-   * to clear the partitioned region.
-   */
-  public void clearLocalPrimaries() {
- // rest of it should be done only if this is a store while RecoveryLock
-    // above still required even if this is an accessor
-    if (getLocalMaxMemory() > 0) {
-      // acquire the primary bucket locks
-      // do this in a loop to handle the corner cases where a primary
-      // bucket region ceases to be so when we actually take the lock
-      // (probably not required to do this in loop after the recovery lock)
-      // [sumedh] do we need both recovery lock and bucket locks?
-      boolean done = false;
-      Set<BucketRegion> lockedRegions = null;
-      while (!done) {
-        lockedRegions = getDataStore().getAllLocalPrimaryBucketRegions();
-        done = true;
-        for (BucketRegion br : lockedRegions) {
-          try {
-            br.doLockForPrimary(false);
-          } catch (RegionDestroyedException rde) {
-            done = false;
-            break;
-          } catch (PrimaryBucketException pbe) {
-            done = false;
-            break;
-          } catch (Exception e) {
-            // ignore any other exception
-            logger.debug(
-                "GemFireContainer#clear: ignoring exception "
-                    + "in bucket lock acquire", e);
-          }
-        }
-      }
-      
-      try {
-        // now clear the bucket regions; we go through the primary bucket
-        // regions so there is distribution for every bucket but that
-        // should be performant enough
-        for (BucketRegion br : lockedRegions) {
-          try {
-            br.clear();
-          } catch (Exception e) {
-            // ignore any other exception
-            logger.debug(
-                "GemFireContainer#clear: ignoring exception "
-                    + "in bucket clear", e);
-          }
-        }
-      } finally {
-        // release the bucket locks
-        for (BucketRegion br : lockedRegions) {
-          try {
-            br.doUnlockForPrimary();
-          } catch (Exception e) {
-            // ignore all exceptions at this stage
-            logger.debug(
-                "GemFireContainer#clear: ignoring exception "
-                    + "in bucket lock release", e);
-          }
-        }
-      }
-    }
-    
-  }
-
   public void shadowPRWaitForBucketRecovery() {
     assert this.isShadowPR();
     PartitionedRegion userPR = ColocationHelper.getLeaderRegion(this);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/880f8648/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PartitionedRegionDataStore.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PartitionedRegionDataStore.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PartitionedRegionDataStore.java
index 3855adc..494c288 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PartitionedRegionDataStore.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PartitionedRegionDataStore.java
@@ -24,7 +24,6 @@ import com.gemstone.gemfire.cache.execute.Function;
 import com.gemstone.gemfire.cache.execute.FunctionException;
 import com.gemstone.gemfire.cache.execute.ResultSender;
 import com.gemstone.gemfire.cache.query.QueryInvalidException;
-import com.gemstone.gemfire.cache.query.internal.IndexUpdater;
 import com.gemstone.gemfire.cache.query.internal.QCompiler;
 import com.gemstone.gemfire.cache.query.internal.index.IndexCreationData;
 import com.gemstone.gemfire.cache.query.internal.index.PartitionedIndex;
@@ -431,19 +430,7 @@ public class PartitionedRegionDataStore implements HasCachePerfStats
               Object redundancyLock = lockRedundancyLock(moveSource,
                   possiblyFreeBucketId, replaceOffineData);
               //DAN - I hope this is ok to do without that bucket admin lock
-              // Take SQLF lock to wait for any ongoing index initializations.
-              // The lock is taken here in addition to that in
-              // DistributedRegion#initialize() so as to release only after
-              // assignBucketRegion() has been invoked (see bug #41877).
-              // Assumes that the IndexUpdater#lockForGII() lock is re-entrant.
-              final IndexUpdater indexUpdater = this.partitionedRegion
-              .getIndexUpdater();
-              boolean sqlfIndexLocked = false;
               try {
-                if (indexUpdater != null) {
-                  indexUpdater.lockForGII();
-                  sqlfIndexLocked = true;
-                }
                 buk.initializePrimaryElector(creationRequestor);
                 if (getPartitionedRegion().getColocatedWith() == null) {
                   buk.getBucketAdvisor().setShadowBucketDestroyed(false);
@@ -476,9 +463,6 @@ public class PartitionedRegionDataStore implements HasCachePerfStats
                   }
                 }
               } finally {
-                if (sqlfIndexLocked) {
-                  indexUpdater.unlockForGII();
-                }
                 releaseRedundancyLock(redundancyLock);
                 if(bukReg == null) {
                   buk.clearPrimaryElector();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/880f8648/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/ProxyRegionMap.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/ProxyRegionMap.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/ProxyRegionMap.java
index ee8e0c8..55d11fc 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/ProxyRegionMap.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/ProxyRegionMap.java
@@ -30,7 +30,6 @@ import com.gemstone.gemfire.cache.EntryNotFoundException;
 import com.gemstone.gemfire.cache.Operation;
 import com.gemstone.gemfire.cache.TimeoutException;
 import com.gemstone.gemfire.cache.TransactionId;
-import com.gemstone.gemfire.cache.query.internal.IndexUpdater;
 import com.gemstone.gemfire.distributed.internal.DM;
 import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
 import com.gemstone.gemfire.internal.ByteArrayDataInput;
@@ -56,23 +55,10 @@ import com.gemstone.gemfire.internal.offheap.annotations.Released;
  */
 final class ProxyRegionMap implements RegionMap {
 
-  /** An internal Listener for index maintenance for SQLFabric. */
-  private final IndexUpdater indexUpdater;
-
   protected ProxyRegionMap(LocalRegion owner, Attributes attr,
       InternalRegionArguments internalRegionArgs) {
     this.owner = owner;
     this.attr = attr;
-    if (internalRegionArgs != null) {
-      this.indexUpdater = internalRegionArgs.getIndexUpdater();
-    }
-    else {
-      this.indexUpdater = null;
-    }
-  }
-
-  public final IndexUpdater getIndexUpdater() {
-    return this.indexUpdater;
   }
 
   /**
@@ -249,13 +235,6 @@ final class ProxyRegionMap implements RegionMap {
     lastModified = // fix for bug 40129
       this.owner.basicPutPart2(event, markerEntry, true,
         lastModified, false /*Clear conflict occurred */);
-    // invoke SQLFabric index manager if present
-    final IndexUpdater indexUpdater = getIndexUpdater();
-    if (indexUpdater != null) {
-      // postEvent not required to be invoked since this is currently used
-      // only for FK checks
-      indexUpdater.onEvent(this.owner, event, markerEntry);
-    }
     this.owner.basicPutPart3(event, markerEntry, true,
           lastModified, true, ifNew, ifOld, expectedOldValue, requireOldValue);
     return markerEntry;
@@ -399,7 +378,7 @@ final class ProxyRegionMap implements RegionMap {
   }
 
   public void removeEntry(Object key, RegionEntry re, boolean updateStat,
-      EntryEventImpl event, LocalRegion owner, IndexUpdater indexUpdater) {
+      EntryEventImpl event, LocalRegion owner) {
     // nothing to do
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/880f8648/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/QueuedOperation.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/QueuedOperation.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/QueuedOperation.java
index 22f9903..7be2bb9 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/QueuedOperation.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/QueuedOperation.java
@@ -161,13 +161,7 @@ public class QueuedOperation
       key = DataSerializer.readObject(in);
       if (op.isUpdate() || op.isCreate()) {
         deserializationPolicy = in.readByte();
-        if (deserializationPolicy ==
-            DistributedCacheOperation.DESERIALIZATION_POLICY_EAGER) {
-          valueObj = DataSerializer.readObject(in);
-        }
-        else {
-          value = DataSerializer.readByteArray(in);
-        }
+        value = DataSerializer.readByteArray(in);
       }
     }
     return new QueuedOperation(op, key, value, valueObj, deserializationPolicy,
@@ -183,13 +177,7 @@ public class QueuedOperation
       DataSerializer.writeObject(this.key, out);
       if (this.op.isUpdate() || this.op.isCreate()) {
         out.writeByte(this.deserializationPolicy);
-        if (this.deserializationPolicy !=
-            DistributedCacheOperation.DESERIALIZATION_POLICY_EAGER) {
-          DataSerializer.writeByteArray(this.value, out);
-        }
-        else {
-          DataSerializer.writeObject(this.valueObj, out);
-        }
+        DataSerializer.writeByteArray(this.value, out);
       }
     }
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/880f8648/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/RegionEntry.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/RegionEntry.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/RegionEntry.java
index b35eaa3..48ed5db 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/RegionEntry.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/RegionEntry.java
@@ -379,16 +379,14 @@ public interface RegionEntry {
   /**
    * Gets the value for this entry. For DiskRegions, unlike
    * {@link #getValue(RegionEntryContext)} this will not fault in the value rather
-   * return a temporary copy. For SQLFabric this is used during table scans in
-   * queries when faulting in every value will be only an unnecessary overhead.
+   * return a temporary copy.
    */
   public Object getValueInVMOrDiskWithoutFaultIn(LocalRegion owner);
 
   /**
    * Gets the value for this entry. For DiskRegions, unlike
    * {@link #getValue(RegionEntryContext)} this will not fault in the value rather
-   * return a temporary copy. For SQLFabric this is used during table scans in
-   * queries when faulting in every value will be only an unnecessary overhead.
+   * return a temporary copy.
    * The value returned will be kept off heap (and compressed) if possible.
    */
   @Retained

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/880f8648/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/RegionMap.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/RegionMap.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/RegionMap.java
index a16f1ec..57f8853 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/RegionMap.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/RegionMap.java
@@ -27,7 +27,6 @@ import com.gemstone.gemfire.cache.EntryNotFoundException;
 import com.gemstone.gemfire.cache.Operation;
 import com.gemstone.gemfire.cache.TimeoutException;
 import com.gemstone.gemfire.cache.TransactionId;
-import com.gemstone.gemfire.cache.query.internal.IndexUpdater;
 import com.gemstone.gemfire.internal.cache.lru.LRUMapCallbacks;
 import com.gemstone.gemfire.internal.cache.tier.sockets.ClientProxyMembershipID;
 import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
@@ -355,16 +354,13 @@ public interface RegionMap extends LRUMapCallbacks {
 
   /**
    * Removes the given key if the enclosing RegionEntry is still in this map for
-   * the given EntryEvent and updating the given {@link IndexUpdater} of the
-   * region ({@link #getIndexUpdater()}) for the event.
+   * the given EntryEvent
    */
   public void removeEntry(Object key, RegionEntry re, boolean updateStat,
-      EntryEventImpl event, LocalRegion owner, IndexUpdater indexUpdater);
+      EntryEventImpl event, LocalRegion owner);
 
   public void copyRecoveredEntries(RegionMap rm);
 
-  public IndexUpdater getIndexUpdater();
-  
   /**
    * Removes an entry that was previously destroyed and made into a tombstone.
    * 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/880f8648/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/RemoteContainsKeyValueMessage.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/RemoteContainsKeyValueMessage.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/RemoteContainsKeyValueMessage.java
index a1b5d0c..d5a52d4 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/RemoteContainsKeyValueMessage.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/RemoteContainsKeyValueMessage.java
@@ -123,9 +123,6 @@ public final class RemoteContainsKeyValueMessage extends RemoteOperationMessageW
       r.waitOnInitialization(); // bug #43371 - accessing a region before it's initialized
     }
 
-    if (r.keyRequiresRegionContext()) {
-      ((KeyWithRegionContext)this.key).setRegionContext(r);
-    }
     final boolean replyVal;
         if (this.valueCheck) {
           replyVal = r.containsValueForKey(this.key);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/880f8648/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/RemoteDestroyMessage.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/RemoteDestroyMessage.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/RemoteDestroyMessage.java
index 822b317..2bec70f 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/RemoteDestroyMessage.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/RemoteDestroyMessage.java
@@ -357,9 +357,6 @@ public class RemoteDestroyMessage extends RemoteOperationMessageWithDirectReply
     if (eventSender == null) {
        eventSender = getSender();
     }
-    if (r.keyRequiresRegionContext()) {
-      ((KeyWithRegionContext)this.key).setRegionContext(r);
-    }
     @Released EntryEventImpl event = null;
     try {
     if (this.bridgeContext != null) {
@@ -468,8 +465,6 @@ public class RemoteDestroyMessage extends RemoteOperationMessageWithDirectReply
     if (this.hasOldValue){
       //out.writeBoolean(this.hasOldValue);
       // below boolean is not strictly required, but this is for compatibility
-      // with SQLFire code which writes as byte here to indicate whether
-      // oldValue is an object, serialized object or byte[]
       in.readByte();
       setOldValBytes(DataSerializer.readByteArray(in));
     }
@@ -595,12 +590,8 @@ public class RemoteDestroyMessage extends RemoteOperationMessageWithDirectReply
   
   private void setOldValueIsSerialized(boolean isSerialized) {
     if (isSerialized) {
-      if (CachedDeserializableFactory.preferObject()) {
-        this.oldValueIsSerialized = true; //VALUE_IS_OBJECT;
-      } else {
-        // Defer serialization until toData is called.
-        this.oldValueIsSerialized = true; //VALUE_IS_SERIALIZED_OBJECT;
-      }
+      // Defer serialization until toData is called.
+      this.oldValueIsSerialized = true; //VALUE_IS_SERIALIZED_OBJECT;
     } else {
       this.oldValueIsSerialized = false; //VALUE_IS_BYTES;
     }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/880f8648/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/RemoteFetchEntryMessage.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/RemoteFetchEntryMessage.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/RemoteFetchEntryMessage.java
index b7cc393..b7a4a81 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/RemoteFetchEntryMessage.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/RemoteFetchEntryMessage.java
@@ -128,9 +128,6 @@ public final class RemoteFetchEntryMessage extends RemoteOperationMessage
     }
     EntrySnapshot val;
       try {
-        if (r.keyRequiresRegionContext()) {
-          ((KeyWithRegionContext)this.key).setRegionContext(r);
-        }
         final KeyInfo keyInfo = r.getKeyInfo(key);
         Region.Entry re = r.getDataView().getEntry(keyInfo, r, true);
         if(re==null) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/880f8648/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/RemoteFetchVersionMessage.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/RemoteFetchVersionMessage.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/RemoteFetchVersionMessage.java
index 21590f6..124c9b5 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/RemoteFetchVersionMessage.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/RemoteFetchVersionMessage.java
@@ -122,9 +122,6 @@ public final class RemoteFetchVersionMessage extends RemoteOperationMessage {
     }
     VersionTag tag;
     try {
-      if (r.keyRequiresRegionContext()) {
-        ((KeyWithRegionContext) this.key).setRegionContext(r);
-      }
       RegionEntry re = r.getRegionEntry(key);
       if (re == null) {
         if (logger.isTraceEnabled(LogMarker.DM)) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/880f8648/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/RemoteGetMessage.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/RemoteGetMessage.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/RemoteGetMessage.java
index 7e2be1f..05d62d4 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/RemoteGetMessage.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/RemoteGetMessage.java
@@ -118,9 +118,6 @@ public final class RemoteGetMessage extends RemoteOperationMessageWithDirectRepl
     RawValue valueBytes;
     Object val = null;
       try {
-        if (r.keyRequiresRegionContext()) {
-          ((KeyWithRegionContext)this.key).setRegionContext(r);
-        }
         KeyInfo keyInfo = r.getKeyInfo(key, cbArg);
         val = r.getDataView().getSerializedValue(r, keyInfo, false, this.context, null, false /*for replicate regions*/);
         valueBytes = val instanceof RawValue ? (RawValue)val : new RawValue(val);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/880f8648/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/RemoteInvalidateMessage.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/RemoteInvalidateMessage.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/RemoteInvalidateMessage.java
index f975f6f..a4e020e 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/RemoteInvalidateMessage.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/RemoteInvalidateMessage.java
@@ -188,9 +188,6 @@ public final class RemoteInvalidateMessage extends RemoteDestroyMessage {
        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/RemotePutAllMessage.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/RemotePutAllMessage.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/RemotePutAllMessage.java
index 045e51c..c0c56c9 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/RemotePutAllMessage.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/RemotePutAllMessage.java
@@ -82,7 +82,6 @@ public final class RemotePutAllMessage extends RemoteOperationMessageWithDirectR
 
   protected static final short HAS_BRIDGE_CONTEXT = UNRESERVED_FLAGS_START;
   protected static final short SKIP_CALLBACKS = (HAS_BRIDGE_CONTEXT << 1);
-  protected static final short IS_PUT_DML = (SKIP_CALLBACKS << 1);
 
   private EventID eventId;
   
@@ -92,8 +91,6 @@ public final class RemotePutAllMessage extends RemoteOperationMessageWithDirectR
 
 //  private boolean useOriginRemote;
 
-  private boolean isPutDML;
-  
   public void addEntry(PutAllEntryData entry) {
     this.putAllData[this.putAllDataCount++] = entry;
   }
@@ -190,7 +187,6 @@ public final class RemotePutAllMessage extends RemoteOperationMessageWithDirectR
     this.eventId = event.getEventId();
     this.skipCallbacks = skipCallbacks;
     this.callbackArg = event.getCallbackArgument();
-	this.isPutDML = event.isPutDML();
   }
 
   public RemotePutAllMessage() {
@@ -241,7 +237,6 @@ public final class RemotePutAllMessage extends RemoteOperationMessageWithDirectR
       this.bridgeContext = DataSerializer.readObject(in);
     }
     this.skipCallbacks = (flags & SKIP_CALLBACKS) != 0;
-    this.isPutDML = (flags & IS_PUT_DML) != 0;
     this.putAllDataCount = (int)InternalDataSerializer.readUnsignedVL(in);
     this.putAllData = new PutAllEntryData[putAllDataCount];
     if (this.putAllDataCount > 0) {
@@ -279,10 +274,6 @@ public final class RemotePutAllMessage extends RemoteOperationMessageWithDirectR
       EntryVersionsList versionTags = new EntryVersionsList(putAllDataCount);
 
       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.putAllDataCount; i++) {
         if (!hasTags && putAllData[i].versionTag != null) {
           hasTags = true;
@@ -290,7 +281,7 @@ public final class RemotePutAllMessage extends RemoteOperationMessageWithDirectR
         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;
       }
 
@@ -307,7 +298,6 @@ public final class RemotePutAllMessage extends RemoteOperationMessageWithDirectR
     if (this.posDup) flags |= POS_DUP;
     if (this.bridgeContext != null) flags |= HAS_BRIDGE_CONTEXT;
     if (this.skipCallbacks) flags |= SKIP_CALLBACKS;
-    if (this.isPutDML) flags |= IS_PUT_DML;
     return flags;
   }
 
@@ -370,7 +360,6 @@ public final class RemotePutAllMessage extends RemoteOperationMessageWithDirectR
       baseEvent.setContext(this.bridgeContext);
     }
     baseEvent.setPossibleDuplicate(this.posDup);
-	baseEvent.setPutDML(this.isPutDML);
     if (logger.isDebugEnabled()) {
       logger.debug("RemotePutAllMessage.doLocalPutAll: eventSender is {}, baseEvent is {}, msg is {}",
           eventSender, baseEvent, this);
@@ -384,7 +373,7 @@ public final class RemotePutAllMessage extends RemoteOperationMessageWithDirectR
 //        final boolean requiresRegionContext = dr.keyRequiresRegionContext();
         InternalDistributedMember myId = r.getDistributionManager().getDistributionManagerId();
         for (int i = 0; i < putAllDataCount; ++i) {
-          @Released EntryEventImpl ev = PutAllPRMessage.getEventFromEntry(r, myId, eventSender, i, putAllData, false, bridgeContext, posDup, !skipCallbacks, isPutDML);
+          @Released EntryEventImpl ev = PutAllPRMessage.getEventFromEntry(r, myId, eventSender, i, putAllData, false, bridgeContext, posDup, !skipCallbacks);
           try {
           ev.setPutAllOperation(dpao);
           if (logger.isDebugEnabled()) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/880f8648/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/RemotePutMessage.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/RemotePutMessage.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/RemotePutMessage.java
index 678927d..34d3585 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/RemotePutMessage.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/RemotePutMessage.java
@@ -135,8 +135,7 @@ public final class RemotePutMessage extends RemoteOperationMessageWithDirectRepl
   
   /**
    * 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
@@ -252,11 +251,7 @@ public final class RemotePutMessage extends RemoteOperationMessageWithDirectRepl
     event.setOriginRemote(useOriginRemote);
 
     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 {
@@ -568,13 +563,7 @@ public final class RemotePutMessage extends RemoteOperationMessageWithDirectRepl
       this.oldValueIsSerialized = (in.readByte() == 1);
       setOldValBytes(DataSerializer.readByteArray(in));
     }
-    if (this.deserializationPolicy ==
-        DistributedCacheOperation.DESERIALIZATION_POLICY_EAGER) {
-      setValObj(DataSerializer.readObject(in));
-    }
-    else {
-      setValBytes(DataSerializer.readByteArray(in));
-    }
+    setValBytes(DataSerializer.readByteArray(in));
     if ((flags & HAS_DELTA_BYTES) != 0) {
       this.applyDeltaBytes = true;
       this.deltaBytes = DataSerializer.readByteArray(in);
@@ -681,9 +670,6 @@ public final class RemotePutMessage extends RemoteOperationMessageWithDirectRepl
     if (eventSender == null) {
        eventSender = getSender();
     }
-    if (r.keyRequiresRegionContext()) {
-      ((KeyWithRegionContext)this.key).setRegionContext(r);
-    }
     @Released EntryEventImpl eei = EntryEventImpl.create(
         r,
         getOperation(),
@@ -732,10 +718,6 @@ public final class RemotePutMessage extends RemoteOperationMessageWithDirectRepl
         case DistributedCacheOperation.DESERIALIZATION_POLICY_NONE:
           event.setNewValue(getValBytes());
           break;
-        case DistributedCacheOperation.DESERIALIZATION_POLICY_EAGER:
-          // new value is a Delta
-          event.setNewValue(this.valObj); // sets the delta field
-          break;
         default:
           throw new AssertionError("unknown deserialization policy: "
               + deserializationPolicy);
@@ -1212,12 +1194,8 @@ public final class RemotePutMessage extends RemoteOperationMessageWithDirectRepl
   
   private void setOldValueIsSerialized(boolean isSerialized) {
     if (isSerialized) {
-      if (CachedDeserializableFactory.preferObject()) {
-        this.oldValueIsSerialized = true; //VALUE_IS_OBJECT;
-      } else {
-        // Defer serialization until toData is called.
-        this.oldValueIsSerialized = true; //VALUE_IS_SERIALIZED_OBJECT;
-      }
+      // Defer serialization until toData is called.
+      this.oldValueIsSerialized = true; //VALUE_IS_SERIALIZED_OBJECT;
     } else {
       this.oldValueIsSerialized = false; //VALUE_IS_BYTES;
     }



Mime
View raw message