This is an automated email from the ASF dual-hosted git repository.

dschneider pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git


The following commit(s) were added to refs/heads/develop by this push:
     new d752dce  GEODE-4541: remove singleton calls (#1463)
d752dce is described below

commit d752dceaee450ce4d49dcd06766b3dd665211e16
Author: Darrel Schneider <dschnei...@pivotal.io>
AuthorDate: Fri Feb 23 11:48:16 2018 -0800

    GEODE-4541: remove singleton calls (#1463)
    
    * removed getAnyInstance call from PartitionedRegionHelper
    
    * removed getInstance call from CacheServerLauncher
    
    * removed getAnyInstance call from EventStateHelper
    
    * DistributedPutAllOperation no longer calls GemFireCacheImpl.getInstance
    
    * EntryEventImpl no longer calls getInstance.
    This fix requires that when an EntryEventImpl is deserialized
    that setRegion will be called on it before the values are accessed.
    Also encapsulated the "region" field and got rid of getLocalRegion
    in favor of getRegion.
---
 .../geode/internal/cache/AbstractRegionMap.java    |  16 +-
 .../internal/cache/AbstractUpdateOperation.java    |   2 +-
 .../apache/geode/internal/cache/BucketRegion.java  |   4 +-
 .../geode/internal/cache/CacheServerLauncher.java  |   2 +-
 .../internal/cache/CreateRegionProcessor.java      |   3 +-
 .../geode/internal/cache/DestroyOperation.java     |   2 +-
 .../apache/geode/internal/cache/DistTXState.java   |   8 +-
 .../internal/cache/DistTXStateOnCoordinator.java   |   8 +-
 .../cache/DistTXStateProxyImplOnCoordinator.java   |   2 +-
 .../internal/cache/DistributedPutAllOperation.java |  26 +--
 .../geode/internal/cache/DistributedRegion.java    |   2 +-
 .../geode/internal/cache/EntryEventImpl.java       | 178 ++++++++++++---------
 .../geode/internal/cache/EventStateHelper.java     |   9 +-
 .../internal/cache/FutureCachedDeserializable.java |  35 ++++
 .../internal/cache/InitialImageOperation.java      |   4 +-
 .../geode/internal/cache/InvalidateOperation.java  |   2 +-
 .../geode/internal/cache/LocalRegionDataView.java  |   8 +-
 .../internal/cache/PartitionedRegionDataView.java  |  12 +-
 .../internal/cache/PartitionedRegionHelper.java    |   9 +-
 .../cache/SearchLoadAndWriteProcessor.java         |   2 +-
 .../geode/internal/cache/TXStateProxyImpl.java     |  16 +-
 .../cache/UpdateEntryVersionOperation.java         |   2 +-
 .../cache/entries/AbstractRegionEntry.java         |   2 +-
 .../geode/internal/cache/map/RegionMapDestroy.java |   4 +-
 .../cache/partitioned/PutAllPRMessage.java         |  16 +-
 .../geode/internal/cache/tx/DistTxEntryEvent.java  |  11 +-
 .../internal/cache/tx/DistributedTXRegionStub.java |   4 +-
 .../internal/cache/tx/PartitionedTXRegionStub.java |   6 +-
 .../geode/internal/cache/EntryEventImplTest.java   |   2 +-
 .../codeAnalysis/sanctionedDataSerializables.txt   |  12 +-
 30 files changed, 237 insertions(+), 172 deletions(-)

diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/cache/AbstractRegionMap.java
 
b/geode-core/src/main/java/org/apache/geode/internal/cache/AbstractRegionMap.java
index 8ae34d0..68d7134 100644
--- 
a/geode-core/src/main/java/org/apache/geode/internal/cache/AbstractRegionMap.java
+++ 
b/geode-core/src/main/java/org/apache/geode/internal/cache/AbstractRegionMap.java
@@ -2438,7 +2438,7 @@ public abstract class AbstractRegionMap
       // Note that v will be null instead of INVALID because setOldValue
       // converts INVALID to null.
       // But checkExpectedOldValue handle this and says INVALID equals null.
-      if (!AbstractRegionEntry.checkExpectedOldValue(expectedOldValue, v, 
event.getLocalRegion())) {
+      if (!AbstractRegionEntry.checkExpectedOldValue(expectedOldValue, v, 
event.getRegion())) {
         return false;
       }
     }
@@ -2455,7 +2455,7 @@ public abstract class AbstractRegionMap
         // In these cases we want to even get the old value from disk if it is 
not in memory
         ReferenceCountHelper.skipRefCountTracking();
         @Released
-        Object oldValueInVMOrDisk = 
re.getValueOffHeapOrDiskWithoutFaultIn(event.getLocalRegion());
+        Object oldValueInVMOrDisk = 
re.getValueOffHeapOrDiskWithoutFaultIn(event.getRegion());
         ReferenceCountHelper.unskipRefCountTracking();
         try {
           event.setOldValue(oldValueInVMOrDisk, true);
@@ -2468,9 +2468,9 @@ public abstract class AbstractRegionMap
 
         @Retained
         @Released
-        Object oldValueInVM = re.getValueRetain(event.getLocalRegion(), true); 
// OFFHEAP: re
-                                                                               
// synced so can use
-                                                                               
// its ref.
+        Object oldValueInVM = re.getValueRetain(event.getRegion(), true); // 
OFFHEAP: re
+                                                                          // 
synced so can use
+                                                                          // 
its ref.
         if (oldValueInVM == null) {
           oldValueInVM = Token.NOT_AVAILABLE;
         }
@@ -2501,17 +2501,17 @@ public abstract class AbstractRegionMap
     processVersionTag(re, event);
     event.putNewEntry(owner, re);
     updateSize(event, 0, false, wasTombstone);
-    if (!event.getLocalRegion().isInitialized()) {
+    if (!event.getRegion().isInitialized()) {
       owner.getImageState().removeDestroyedEntry(event.getKey());
     }
   }
 
   protected void updateEntry(EntryEventImpl event, boolean requireOldValue, 
Object oldValueForDelta,
       RegionEntry re) throws RegionClearedException {
-    final int oldSize = 
event.getLocalRegion().calculateRegionEntryValueSize(re);
+    final int oldSize = event.getRegion().calculateRegionEntryValueSize(re);
     final boolean wasTombstone = re.isTombstone();
     processVersionTag(re, event);
-    event.putExistingEntry(event.getLocalRegion(), re, requireOldValue, 
oldValueForDelta);
+    event.putExistingEntry(event.getRegion(), re, requireOldValue, 
oldValueForDelta);
     EntryLogger.logPut(event);
     updateSize(event, oldSize, true/* isUpdate */, wasTombstone);
   }
diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/cache/AbstractUpdateOperation.java
 
b/geode-core/src/main/java/org/apache/geode/internal/cache/AbstractUpdateOperation.java
index 1eb2761..6ec4453 100644
--- 
a/geode-core/src/main/java/org/apache/geode/internal/cache/AbstractUpdateOperation.java
+++ 
b/geode-core/src/main/java/org/apache/geode/internal/cache/AbstractUpdateOperation.java
@@ -241,7 +241,7 @@ public abstract class AbstractUpdateOperation extends 
DistributedCacheOperation
     protected boolean operateOnRegion(CacheEvent event, 
ClusterDistributionManager dm)
         throws EntryNotFoundException {
       EntryEventImpl ev = (EntryEventImpl) event;
-      DistributedRegion rgn = (DistributedRegion) ev.region;
+      DistributedRegion rgn = (DistributedRegion) ev.getRegion();
       DistributionManager mgr = dm;
       boolean sendReply = true; // by default tell caller to send ack
 
diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/cache/BucketRegion.java 
b/geode-core/src/main/java/org/apache/geode/internal/cache/BucketRegion.java
index 736f50d..d5bbbbb 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/BucketRegion.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/BucketRegion.java
@@ -1314,7 +1314,7 @@ public class BucketRegion extends DistributedRegion 
implements Bucket {
     Assert.assertTrue(!isTX());
     Assert.assertTrue(event.getOperation().isDistributed());
 
-    LocalRegion lr = event.getLocalRegion();
+    LocalRegion lr = event.getRegion();
     AbstractRegionMap arm = ((AbstractRegionMap) lr.getRegionMap());
     try {
       arm.lockForCacheModification(lr, event);
@@ -1340,7 +1340,7 @@ public class BucketRegion extends DistributedRegion 
implements Bucket {
         endLocalWrite(event);
       }
     } finally {
-      arm.releaseCacheModificationLock(event.getLocalRegion(), event);
+      arm.releaseCacheModificationLock(event.getRegion(), event);
     }
   }
 
diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/cache/CacheServerLauncher.java
 
b/geode-core/src/main/java/org/apache/geode/internal/cache/CacheServerLauncher.java
index ee2e8ea..e888ce5 100755
--- 
a/geode-core/src/main/java/org/apache/geode/internal/cache/CacheServerLauncher.java
+++ 
b/geode-core/src/main/java/org/apache/geode/internal/cache/CacheServerLauncher.java
@@ -762,7 +762,7 @@ public class CacheServerLauncher {
           reconnected = system.waitUntilReconnected(-1, TimeUnit.SECONDS);
           if (reconnected) {
             system = (InternalDistributedSystem) system.getReconnectedSystem();
-            cache = GemFireCacheImpl.getInstance();
+            cache = system.getCache();
           }
         }
         if (!reconnected) {
diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/cache/CreateRegionProcessor.java
 
b/geode-core/src/main/java/org/apache/geode/internal/cache/CreateRegionProcessor.java
index 46e52c6..ec55171 100644
--- 
a/geode-core/src/main/java/org/apache/geode/internal/cache/CreateRegionProcessor.java
+++ 
b/geode-core/src/main/java/org/apache/geode/internal/cache/CreateRegionProcessor.java
@@ -417,6 +417,7 @@ public class CreateRegionProcessor implements 
ProfileExchangeProcessor {
         replyMsg.eventState = this.eventState;
         replyMsg.destroyedId = destroyedId;
         replyMsg.setProcessorId(this.processorId);
+        replyMsg.setSender(dm.getId()); // for EventStateHelper.dataSerialize
         replyMsg.setRecipient(this.getSender());
         replyMsg.skippedCompatibilityChecks = this.skippedCompatibilityChecks;
 
@@ -837,7 +838,7 @@ public class CreateRegionProcessor implements 
ProfileExchangeProcessor {
         // The isHARegion flag is false here because
         // we currently only include the event state in the profile
         // for bucket regions.
-        EventStateHelper.dataSerialize(out, (Map) eventState, false);
+        EventStateHelper.dataSerialize(out, (Map) eventState, false, 
getSender());
       } else {
         out.writeBoolean(false);
       }
diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/cache/DestroyOperation.java
 
b/geode-core/src/main/java/org/apache/geode/internal/cache/DestroyOperation.java
index 0d2dc7f..3371c9c 100644
--- 
a/geode-core/src/main/java/org/apache/geode/internal/cache/DestroyOperation.java
+++ 
b/geode-core/src/main/java/org/apache/geode/internal/cache/DestroyOperation.java
@@ -80,7 +80,7 @@ public class DestroyOperation extends 
DistributedCacheOperation {
     protected boolean operateOnRegion(CacheEvent event, 
ClusterDistributionManager dm)
         throws EntryNotFoundException {
       EntryEventImpl ev = (EntryEventImpl) event;
-      DistributedRegion rgn = (DistributedRegion) ev.region;
+      DistributedRegion rgn = (DistributedRegion) ev.getRegion();
 
       try {
         if (!rgn.isCacheContentProxy()) {
diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/cache/DistTXState.java 
b/geode-core/src/main/java/org/apache/geode/internal/cache/DistTXState.java
index ac42e9c..e4f3c56b 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/DistTXState.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/DistTXState.java
@@ -442,8 +442,8 @@ public class DistTXState extends TXState {
         // [DISTTX] TODO what do with versions next?
         final VersionedObjectList versions =
             new VersionedObjectList(dtop.getPutAllOperation().putAllDataSize, 
true,
-                dtop.region.getConcurrencyChecksEnabled());
-        postPutAll(dtop.getPutAllOperation(), versions, dtop.region);
+                dtop.getRegion().getConcurrencyChecksEnabled());
+        postPutAll(dtop.getPutAllOperation(), versions, dtop.getRegion());
       } else {
         result = putEntryOnRemote(dtop, false/* ifNew */, false/* ifOld */,
             null/* expectedOldValue */, false/* requireOldValue */, 0L/* 
lastModified */,
@@ -457,8 +457,8 @@ public class DistTXState extends TXState {
         // [DISTTX] TODO what do with versions next?
         final VersionedObjectList versions =
             new 
VersionedObjectList(dtop.getRemoveAllOperation().removeAllDataSize, true,
-                dtop.region.getConcurrencyChecksEnabled());
-        postRemoveAll(dtop.getRemoveAllOperation(), versions, dtop.region);
+                dtop.getRegion().getConcurrencyChecksEnabled());
+        postRemoveAll(dtop.getRemoveAllOperation(), versions, 
dtop.getRegion());
       } else {
         destroyOnRemote(dtop, false/* TODO [DISTTX] */, null/*
                                                              * TODO [DISTTX]
diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/cache/DistTXStateOnCoordinator.java
 
b/geode-core/src/main/java/org/apache/geode/internal/cache/DistTXStateOnCoordinator.java
index 147c23a..eacb6b9 100644
--- 
a/geode-core/src/main/java/org/apache/geode/internal/cache/DistTXStateOnCoordinator.java
+++ 
b/geode-core/src/main/java/org/apache/geode/internal/cache/DistTXStateOnCoordinator.java
@@ -335,8 +335,8 @@ public class DistTXStateOnCoordinator extends DistTXState 
implements DistTXCoord
         // [DISTTX] TODO what do with versions next?
         final VersionedObjectList versions =
             new VersionedObjectList(dtop.getPutAllOperation().putAllDataSize, 
true,
-                dtop.region.getConcurrencyChecksEnabled());
-        postPutAll(dtop.getPutAllOperation(), versions, dtop.region);
+                dtop.getRegion().getConcurrencyChecksEnabled());
+        postPutAll(dtop.getPutAllOperation(), versions, dtop.getRegion());
       } else {
         result = putEntry(dtop, false/* ifNew */, false/* ifOld */, null/* 
expectedOldValue */,
             false/* requireOldValue */, 0L/* lastModified */, true/*
@@ -349,8 +349,8 @@ public class DistTXStateOnCoordinator extends DistTXState 
implements DistTXCoord
         // [DISTTX] TODO what do with versions next?
         final VersionedObjectList versions =
             new 
VersionedObjectList(dtop.getRemoveAllOperation().removeAllDataSize, true,
-                dtop.region.getConcurrencyChecksEnabled());
-        postRemoveAll(dtop.getRemoveAllOperation(), versions, dtop.region);
+                dtop.getRegion().getConcurrencyChecksEnabled());
+        postRemoveAll(dtop.getRemoveAllOperation(), versions, 
dtop.getRegion());
       } else {
         destroyExistingEntry(dtop, false/* TODO [DISTTX] */, null/*
                                                                   * TODO 
[DISTTX]
diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/cache/DistTXStateProxyImplOnCoordinator.java
 
b/geode-core/src/main/java/org/apache/geode/internal/cache/DistTXStateProxyImplOnCoordinator.java
index e5e8c37..761a7fb 100644
--- 
a/geode-core/src/main/java/org/apache/geode/internal/cache/DistTXStateProxyImplOnCoordinator.java
+++ 
b/geode-core/src/main/java/org/apache/geode/internal/cache/DistTXStateProxyImplOnCoordinator.java
@@ -775,7 +775,7 @@ public class DistTXStateProxyImplOnCoordinator extends 
DistTXStateProxyImpl {
         if (putAllForBucket == null) {
           // TODO DISTTX: event is never released
           EntryEventImpl event = EntryEventImpl.createPutAllEvent(null, region,
-              Operation.PUTALL_CREATE, key, putallOp.putAllData[i].getValue());
+              Operation.PUTALL_CREATE, key, 
putallOp.putAllData[i].getValue(region.getCache()));
           event.setEventId(putallOp.putAllData[i].getEventID());
           putAllForBucket =
               new DistributedPutAllOperation(event, putallOp.putAllDataSize, 
putallOp.isBridgeOp);
diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/cache/DistributedPutAllOperation.java
 
b/geode-core/src/main/java/org/apache/geode/internal/cache/DistributedPutAllOperation.java
index 747bfbb..bb95f44 100644
--- 
a/geode-core/src/main/java/org/apache/geode/internal/cache/DistributedPutAllOperation.java
+++ 
b/geode-core/src/main/java/org/apache/geode/internal/cache/DistributedPutAllOperation.java
@@ -236,11 +236,12 @@ public class DistributedPutAllOperation extends 
AbstractUpdateOperation {
 
       entry.event = ev;
       returnedEv = true;
-      if (entry.getValue() == null
+      Object entryValue = entry.getValue(region.getCache());
+      if (entryValue == null
           && ev.getRegion().getAttributes().getDataPolicy() == 
DataPolicy.NORMAL) {
         ev.setLocalInvalid(true);
       }
-      ev.setNewValue(entry.getValue());
+      ev.setNewValue(entryValue);
       ev.setOldValue(entry.getOldValue());
       CqService cqService = region.getCache().getCqService();
       if (cqService.isRunning() && !entry.getOp().isCreate() && 
!ev.hasOldValue()) {
@@ -271,7 +272,7 @@ public class DistributedPutAllOperation extends 
AbstractUpdateOperation {
 
     final Object key;
 
-    final Object value;
+    private Object value;
 
     private final Object oldValue;
 
@@ -336,7 +337,7 @@ public class DistributedPutAllOperation extends 
AbstractUpdateOperation {
       } else {
         byte[] bb = DataSerializer.readByteArray(in);
         if ((flgs & IS_CACHED_DESER) != 0) {
-          this.value = CachedDeserializableFactory.create(bb, 
GemFireCacheImpl.getInstance());
+          this.value = new FutureCachedDeserializable(bb);
         } else {
           this.value = bb;
         }
@@ -365,7 +366,7 @@ public class DistributedPutAllOperation extends 
AbstractUpdateOperation {
     @Override
     public String toString() {
       StringBuilder sb = new StringBuilder(50);
-      
sb.append("(").append(getKey()).append(",").append(getValue()).append(",")
+      
sb.append("(").append(getKey()).append(",").append(this.value).append(",")
           .append(getOldValue());
       if (this.bucketId > 0) {
         sb.append(", b").append(this.bucketId);
@@ -455,8 +456,14 @@ public class DistributedPutAllOperation extends 
AbstractUpdateOperation {
     /**
      * Returns the value
      */
-    public Object getValue() {
-      return this.value;
+    public Object getValue(InternalCache cache) {
+      Object result = this.value;
+      if (result instanceof FutureCachedDeserializable) {
+        FutureCachedDeserializable future = (FutureCachedDeserializable) 
result;
+        result = future.create(cache);
+        this.value = result;
+      }
+      return result;
     }
 
     /**
@@ -1134,10 +1141,11 @@ public class DistributedPutAllOperation extends 
AbstractUpdateOperation {
         if (context != null) {
           ev.context = context;
         }
-        if (entry.getValue() == null && rgn.getDataPolicy() == 
DataPolicy.NORMAL) {
+        Object entryValue = entry.getValue(rgn.getCache());
+        if (entryValue == null && rgn.getDataPolicy() == DataPolicy.NORMAL) {
           ev.setLocalInvalid(true);
         }
-        ev.setNewValue(entry.getValue());
+        ev.setNewValue(entryValue);
         ev.setPossibleDuplicate(possibleDuplicate);
         ev.setVersionTag(entry.versionTag);
         // if (needsRouting) {
diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/cache/DistributedRegion.java
 
b/geode-core/src/main/java/org/apache/geode/internal/cache/DistributedRegion.java
index 9727de2..9e22307 100755
--- 
a/geode-core/src/main/java/org/apache/geode/internal/cache/DistributedRegion.java
+++ 
b/geode-core/src/main/java/org/apache/geode/internal/cache/DistributedRegion.java
@@ -1821,7 +1821,7 @@ public class DistributedRegion extends LocalRegion 
implements InternalDistribute
 
   @Override
   void basicUpdateEntryVersion(EntryEventImpl event) throws 
EntryNotFoundException {
-    LocalRegion localRegion = event.getLocalRegion();
+    LocalRegion localRegion = event.getRegion();
     AbstractRegionMap regionMap = (AbstractRegionMap) 
localRegion.getRegionMap();
     try {
       regionMap.lockForCacheModification(localRegion, event);
diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/cache/EntryEventImpl.java 
b/geode-core/src/main/java/org/apache/geode/internal/cache/EntryEventImpl.java
index 7ee03a8..da722ce 100644
--- 
a/geode-core/src/main/java/org/apache/geode/internal/cache/EntryEventImpl.java
+++ 
b/geode-core/src/main/java/org/apache/geode/internal/cache/EntryEventImpl.java
@@ -97,7 +97,7 @@ public class EntryEventImpl implements InternalEntryEvent, 
InternalCacheEvent,
   private static final Logger logger = LogService.getLogger();
 
   // PACKAGE FIELDS //
-  public transient LocalRegion region;
+  private transient LocalRegion region;
 
   private transient RegionEntry re;
 
@@ -210,9 +210,10 @@ public class EntryEventImpl implements InternalEntryEvent, 
InternalCacheEvent,
       if (in.readBoolean()) { // newValueSerialized
         this.newValueBytes = DataSerializer.readByteArray(in);
         this.cachedSerializedNewValue = this.newValueBytes;
-        this.newValue =
-            CachedDeserializableFactory.create(this.newValueBytes, 
GemFireCacheImpl.getInstance());
+        this.newValue = null; // set later in generateNewValueFromBytesIfNeeded
       } else {
+        this.newValueBytes = null;
+        this.cachedSerializedNewValue = null;
         this.newValue = DataSerializer.readObject(in);
       }
     }
@@ -221,9 +222,9 @@ public class EntryEventImpl implements InternalEntryEvent, 
InternalCacheEvent,
     // code needs to change.
     if (in.readBoolean()) { // oldValueSerialized
       this.oldValueBytes = DataSerializer.readByteArray(in);
-      this.oldValue =
-          CachedDeserializableFactory.create(this.oldValueBytes, 
GemFireCacheImpl.getInstance());
+      this.oldValue = null; // set later in basicGetOldValue
     } else {
+      this.oldValueBytes = null;
       this.oldValue = DataSerializer.readObject(in);
     }
     this.distributedMember = DSFIDFactory.readInternalDistributedMember(in);
@@ -236,7 +237,7 @@ public class EntryEventImpl implements InternalEntryEvent, 
InternalCacheEvent,
       DistributedMember distributedMember, boolean generateCallbacks, boolean 
fromRILocalDestroy) {
     this.region = region;
     this.op = op;
-    this.keyInfo = this.region.getKeyInfo(key);
+    this.keyInfo = region.getKeyInfo(key);
     setOriginRemote(originRemote);
     setGenerateCallbacks(generateCallbacks);
     this.distributedMember = distributedMember;
@@ -254,13 +255,13 @@ public class EntryEventImpl implements 
InternalEntryEvent, InternalCacheEvent,
 
     this.region = region;
     this.op = op;
-    this.keyInfo = this.region.getKeyInfo(key, newVal, callbackArgument);
+    this.keyInfo = region.getKeyInfo(key, newVal, callbackArgument);
 
     if (!Token.isInvalid(newVal)) {
-      basicSetNewValue(newVal);
+      basicSetNewValue(newVal, false);
     }
 
-    this.txId = this.region.getTXId();
+    this.txId = region.getTXId();
     /*
      * this might set txId for events done from a thread that has a tx even 
though the op is non-tx.
      * For example region ops.
@@ -300,10 +301,10 @@ public class EntryEventImpl implements 
InternalEntryEvent, InternalCacheEvent,
   public EntryEventImpl(
       @Retained({ENTRY_EVENT_NEW_VALUE, ENTRY_EVENT_OLD_VALUE}) EntryEventImpl 
other,
       boolean setOldValue) {
-    region = other.region;
+    setRegion(other.getRegion());
 
     this.eventID = other.eventID;
-    basicSetNewValue(other.basicGetNewValue());
+    basicSetNewValue(other.basicGetNewValue(), false);
     this.newValueBytes = other.newValueBytes;
     this.cachedSerializedNewValue = other.cachedSerializedNewValue;
     this.re = other.re;
@@ -727,7 +728,7 @@ public class EntryEventImpl implements InternalEntryEvent, 
InternalCacheEvent,
    */
   public Object getOldValue() {
     try {
-      if (isOriginRemote() && this.region.isProxy()) {
+      if (isOriginRemote() && getRegion().isProxy()) {
         return null;
       }
       @Unretained
@@ -737,9 +738,9 @@ public class EntryEventImpl implements InternalEntryEvent, 
InternalCacheEvent,
         if (ov instanceof CachedDeserializable) {
           return callWithOffHeapLock((CachedDeserializable) ov, oldValueCD -> {
             if (doCopyOnRead) {
-              return oldValueCD.getDeserializedWritableCopy(this.region, 
this.re);
+              return oldValueCD.getDeserializedWritableCopy(getRegion(), 
this.re);
             } else {
-              return oldValueCD.getDeserializedValue(this.region, this.re);
+              return oldValueCD.getDeserializedValue(getRegion(), this.re);
             }
           });
         } else {
@@ -773,7 +774,7 @@ public class EntryEventImpl implements InternalEntryEvent, 
InternalCacheEvent,
     }
     if (getReadOldValueFromDisk()) {
       try {
-        result = this.region.getValueInVMOrDiskWithoutFaultIn(getKey());
+        result = getRegion().getValueInVMOrDiskWithoutFaultIn(getKey());
       } catch (EntryNotFoundException ex) {
         result = null;
       }
@@ -825,7 +826,8 @@ public class EntryEventImpl implements InternalEntryEvent, 
InternalCacheEvent,
   }
 
   @Released(ENTRY_EVENT_NEW_VALUE)
-  protected void basicSetNewValue(@Retained(ENTRY_EVENT_NEW_VALUE) Object v) {
+  protected void basicSetNewValue(@Retained(ENTRY_EVENT_NEW_VALUE) Object v,
+      boolean clearCachedSerializedAndBytes) {
     if (v == this.newValue)
       return;
     if (mayHaveOffHeapReferences()) {
@@ -843,11 +845,26 @@ public class EntryEventImpl implements 
InternalEntryEvent, InternalCacheEvent,
       }
     }
     this.newValue = v;
-    this.cachedSerializedNewValue = null;
+    if (clearCachedSerializedAndBytes) {
+      this.newValueBytes = null;
+      this.cachedSerializedNewValue = null;
+    }
+  }
+
+  private void generateNewValueFromBytesIfNeeded() {
+    if (this.newValue != null) {
+      // no need to generate a new value
+      return;
+    }
+    byte[] bytes = this.newValueBytes;
+    if (bytes != null) {
+      this.newValue = CachedDeserializableFactory.create(bytes, 
getRegion().getCache());
+    }
   }
 
   @Unretained
   protected Object basicGetNewValue() {
+    generateNewValueFromBytesIfNeeded();
     Object result = this.newValue;
     if (!this.offHeapOk && isOffHeapReference(result)) {
       // this.region.getCache().getLogger().info("DEBUG new value already 
freed " +
@@ -909,6 +926,7 @@ public class EntryEventImpl implements InternalEntryEvent, 
InternalCacheEvent,
     }
 
     this.oldValue = v;
+    this.oldValueBytes = null;
   }
 
   @Released(ENTRY_EVENT_OLD_VALUE)
@@ -924,11 +942,13 @@ public class EntryEventImpl implements 
InternalEntryEvent, InternalCacheEvent,
         ReferenceCountHelper.setReferenceCountOwner(null);
         if (couldNotRetain) {
           this.oldValue = null;
+          this.oldValueBytes = null;
           return;
         }
       } else {
         if (!so.retain()) {
           this.oldValue = null;
+          this.oldValueBytes = null;
           return;
         }
       }
@@ -940,6 +960,13 @@ public class EntryEventImpl implements InternalEntryEvent, 
InternalCacheEvent,
   Object basicGetOldValue() {
     @Unretained(ENTRY_EVENT_OLD_VALUE)
     Object result = this.oldValue;
+    if (result == null) {
+      byte[] bytes = this.oldValueBytes;
+      if (bytes != null) {
+        result = CachedDeserializableFactory.create(bytes, 
getRegion().getCache());
+        this.oldValue = result;
+      }
+    }
     if (!this.offHeapOk && isOffHeapReference(result)) {
       // this.region.getCache().getLogger().info("DEBUG old value already 
freed " +
       // System.identityHashCode(result));
@@ -1009,9 +1036,9 @@ public class EntryEventImpl implements 
InternalEntryEvent, InternalCacheEvent,
         return callWithOffHeapLock((CachedDeserializable) nv, newValueCD -> {
           Object v = null;
           if (doCopyOnRead) {
-            v = newValueCD.getDeserializedWritableCopy(this.region, this.re);
+            v = newValueCD.getDeserializedWritableCopy(getRegion(), this.re);
           } else {
-            v = newValueCD.getDeserializedValue(this.region, this.re);
+            v = newValueCD.getDeserializedValue(getRegion(), this.re);
           }
           assert !(v instanceof CachedDeserializable) : "for key " + 
this.getKey()
               + " found nested CachedDeserializable";
@@ -1059,7 +1086,7 @@ public class EntryEventImpl implements 
InternalEntryEvent, InternalCacheEvent,
 
   /** Set a deserialized value */
   public void setNewValue(@Retained(ENTRY_EVENT_NEW_VALUE) Object obj) {
-    basicSetNewValue(obj);
+    basicSetNewValue(obj, true);
   }
 
   public TransactionId getTransactionId() {
@@ -1221,11 +1248,12 @@ public class EntryEventImpl implements 
InternalEntryEvent, InternalCacheEvent,
   public void exportNewValue(NewValueImporter importer) {
     final boolean prefersSerialized = importer.prefersNewSerialized();
     if (prefersSerialized) {
-      if (getCachedSerializedNewValue() != null) {
-        importer.importNewBytes(getCachedSerializedNewValue(), true);
-        return;
-      } else if (this.newValueBytes != null && this.newValue instanceof 
CachedDeserializable) {
-        importer.importNewBytes(this.newValueBytes, true);
+      byte[] serializedNewValue = getCachedSerializedNewValue();
+      if (serializedNewValue == null) {
+        serializedNewValue = this.newValueBytes;
+      }
+      if (serializedNewValue != null) {
+        importer.importNewBytes(serializedNewValue, true);
         return;
       }
     }
@@ -1313,7 +1341,7 @@ public class EntryEventImpl implements 
InternalEntryEvent, InternalCacheEvent,
   public void exportOldValue(OldValueImporter importer) {
     final boolean prefersSerialized = importer.prefersOldSerialized();
     if (prefersSerialized) {
-      if (this.oldValueBytes != null && this.oldValue instanceof 
CachedDeserializable) {
+      if (this.oldValueBytes != null) {
         importer.importOldBytes(this.oldValueBytes, true);
         return;
       }
@@ -1440,7 +1468,7 @@ public class EntryEventImpl implements 
InternalEntryEvent, InternalCacheEvent,
     if (isSynced) {
       this.setSerializationDeferred(false);
     }
-    basicSetNewValue(getCachedDeserializable(obj, this));
+    basicSetNewValue(getCachedDeserializable(obj, this), false);
   }
 
   public static Object getCachedDeserializable(Object obj, EntryEventImpl ev) {
@@ -1488,13 +1516,12 @@ public class EntryEventImpl implements 
InternalEntryEvent, InternalCacheEvent,
     if (serializedValue != null) {
       newVal = CachedDeserializableFactory.create(serializedValue, 
getRegion().getCache());
     }
+    basicSetNewValue(newVal, false);
     this.newValueBytes = serializedValue;
-    basicSetNewValue(newVal);
     this.cachedSerializedNewValue = serializedValue;
   }
 
   public void setSerializedOldValue(byte[] serializedOldValue) {
-    this.oldValueBytes = serializedOldValue;
     final Object ov;
     if (serializedOldValue != null) {
       ov = CachedDeserializableFactory.create(serializedOldValue, 
getRegion().getCache());
@@ -1502,6 +1529,7 @@ public class EntryEventImpl implements 
InternalEntryEvent, InternalCacheEvent,
       ov = null;
     }
     retainAndSetOldValue(ov);
+    this.oldValueBytes = serializedOldValue;
   }
 
   /**
@@ -1529,12 +1557,9 @@ public class EntryEventImpl implements 
InternalEntryEvent, InternalCacheEvent,
       Object oldValueForDelta) throws RegionClearedException {
     makeUpdate();
     // only set oldValue if it hasn't already been set to something
-    if (this.oldValue == null) {
+    if (this.oldValue == null && this.oldValueBytes == null) {
       if (!reentry.isInvalidOrRemoved()) {
-        if (requireOldValue || areOldValuesEnabled() || this.region instanceof 
HARegion // fix for
-                                                                               
         // bug
-        // 37909
-        ) {
+        if (requireOldValue || areOldValuesEnabled() || getRegion() instanceof 
HARegion) {
           @Retained
           Object ov;
           if (ReferenceCountHelper.trackReferenceCounts()) {
@@ -1544,8 +1569,9 @@ public class EntryEventImpl implements 
InternalEntryEvent, InternalCacheEvent,
           } else {
             ov = reentry.getValueRetain(owner, true);
           }
-          if (ov == null)
+          if (ov == null) {
             ov = Token.NOT_AVAILABLE;
+          }
           // ov has already been retained so call basicSetOldValue instead of 
retainAndSetOldValue
           basicSetOldValue(ov);
         } else {
@@ -1554,7 +1580,7 @@ public class EntryEventImpl implements 
InternalEntryEvent, InternalCacheEvent,
       }
     }
     if (this.oldValue == Token.NOT_AVAILABLE) {
-      FilterProfile fp = this.region.getFilterProfile();
+      FilterProfile fp = getRegion().getFilterProfile();
       if (this.op.guaranteesOldValue()
           || (fp != null /* #41532 */ && 
fp.entryRequiresOldValue(this.getKey()))) {
         setOldValueForQueryProcessing();
@@ -1613,21 +1639,22 @@ public class EntryEventImpl implements 
InternalEntryEvent, InternalCacheEvent,
 
     // If event contains new value, then it may mean that the delta bytes 
should
     // not be applied. This is possible if the event originated locally.
-    if (this.deltaBytes != null && this.newValue == null) {
+    if (this.deltaBytes != null && this.newValue == null && this.newValueBytes 
== null) {
       processDeltaBytes(oldValueForDelta);
     }
 
     if (owner != null) {
       owner.generateAndSetVersionTag(this, reentry);
     } else {
-      this.region.generateAndSetVersionTag(this, reentry);
+      getRegion().generateAndSetVersionTag(this, reentry);
     }
 
+    generateNewValueFromBytesIfNeeded();
     Object v = this.newValue;
     if (v == null) {
       v = isLocalInvalid() ? Token.LOCAL_INVALID : Token.INVALID;
     } else {
-      this.region.regionInvalid = false;
+      getRegion().regionInvalid = false;
     }
 
     reentry.setValueResultOfSearch(this.op.isNetSearch());
@@ -1636,26 +1663,26 @@ public class EntryEventImpl implements 
InternalEntryEvent, InternalCacheEvent,
     // This is a horrible hack, but we need to get the size of the object
     // When we store an entry. This code is only used when we do a put
     // in the primary.
-    if (v instanceof org.apache.geode.Delta && 
region.isUsedForPartitionedRegionBucket()) {
+    if (v instanceof org.apache.geode.Delta && 
getRegion().isUsedForPartitionedRegionBucket()) {
       int vSize;
       Object ov = basicGetOldValue();
       if (ov instanceof CachedDeserializable && 
!GemFireCacheImpl.DELTAS_RECALCULATE_SIZE) {
         vSize = ((CachedDeserializable) ov).getValueSizeInBytes();
       } else {
-        vSize = CachedDeserializableFactory.calcMemSize(v, 
region.getObjectSizer(), false);
+        vSize = CachedDeserializableFactory.calcMemSize(v, 
getRegion().getObjectSizer(), false);
       }
-      v = CachedDeserializableFactory.create(v, vSize, region.getCache());
-      basicSetNewValue(v);
+      v = CachedDeserializableFactory.create(v, vSize, getRegion().getCache());
+      basicSetNewValue(v, true);
     }
 
-    Object preparedV = reentry.prepareValueForCache(this.region, v, this, 
false);
+    Object preparedV = reentry.prepareValueForCache(getRegion(), v, this, 
false);
     if (preparedV != v) {
       v = preparedV;
       if (v instanceof StoredObject) {
         if (!((StoredObject) v).isCompressed()) { // fix bug 52109
           // If we put it off heap and it is not compressed then remember that 
value.
           // Otherwise we want to remember the decompressed value in the event.
-          basicSetNewValue(v);
+          basicSetNewValue(v, false);
         }
       }
     }
@@ -1676,7 +1703,7 @@ public class EntryEventImpl implements 
InternalEntryEvent, InternalCacheEvent,
 
       if ((this.op.isUpdate() && !reentry.isInvalid()) || 
this.op.isInvalidate()) {
         IndexManager idxManager =
-            IndexUtils.getIndexManager(this.region.getCache(), this.region, 
false);
+            IndexUtils.getIndexManager(getRegion().getCache(), getRegion(), 
false);
         if (idxManager != null) {
           try {
             idxManager.updateIndexes(reentry, IndexManager.REMOVE_ENTRY,
@@ -1721,30 +1748,30 @@ public class EntryEventImpl implements 
InternalEntryEvent, InternalCacheEvent,
 
   private void setNewValueBucketSize(LocalRegion lr, Object v) {
     if (lr == null) {
-      lr = this.region;
+      lr = getRegion();
     }
     this.newValueBucketSize = lr.calculateValueSize(v);
   }
 
   private void processDeltaBytes(Object oldValueInVM) {
-    if (!this.region.hasSeenEvent(this)) {
+    if (!getRegion().hasSeenEvent(this)) {
       if (oldValueInVM == null || Token.isInvalidOrRemoved(oldValueInVM)) {
-        this.region.getCachePerfStats().incDeltaFailedUpdates();
+        getRegion().getCachePerfStats().incDeltaFailedUpdates();
         throw new InvalidDeltaException("Old value not found for key " + 
this.keyInfo.getKey());
       }
-      FilterProfile fp = this.region.getFilterProfile();
+      FilterProfile fp = getRegion().getFilterProfile();
       // If compression is enabled then we've already gotten a new copy due to 
the
       // serializaion and deserialization that occurs.
-      boolean copy = this.region.getCompressor() == null && 
(this.region.isCopyOnRead()
-          || this.region.getCloningEnabled() || (fp != null && fp.getCqCount() 
> 0));
+      boolean copy = getRegion().getCompressor() == null && 
(getRegion().isCopyOnRead()
+          || getRegion().getCloningEnabled() || (fp != null && fp.getCqCount() 
> 0));
       Object value = oldValueInVM;
       boolean wasCD = false;
       if (value instanceof CachedDeserializable) {
         wasCD = true;
         if (copy) {
-          value = ((CachedDeserializable) 
value).getDeserializedWritableCopy(this.region, re);
+          value = ((CachedDeserializable) 
value).getDeserializedWritableCopy(getRegion(), re);
         } else {
-          value = ((CachedDeserializable) 
value).getDeserializedValue(this.region, re);
+          value = ((CachedDeserializable) 
value).getDeserializedValue(getRegion(), re);
         }
       } else {
         if (copy) {
@@ -1756,7 +1783,7 @@ public class EntryEventImpl implements 
InternalEntryEvent, InternalCacheEvent,
         long start = CachePerfStats.getStatTime();
         ((org.apache.geode.Delta) value)
             .fromDelta(new DataInputStream(new 
ByteArrayInputStream(getDeltaBytes())));
-        this.region.getCachePerfStats().endDeltaUpdate(start);
+        getRegion().getCachePerfStats().endDeltaUpdate(start);
         deltaBytesApplied = true;
       } catch (RuntimeException rte) {
         throw rte;
@@ -1768,7 +1795,7 @@ public class EntryEventImpl implements 
InternalEntryEvent, InternalCacheEvent,
         throw new DeltaSerializationException("Exception while deserializing 
delta bytes.", t);
       } finally {
         if (!deltaBytesApplied) {
-          this.region.getCachePerfStats().incDeltaFailedUpdates();
+          getRegion().getCachePerfStats().incDeltaFailedUpdates();
         }
       }
       if (logger.isDebugEnabled()) {
@@ -1780,7 +1807,7 @@ public class EntryEventImpl implements 
InternalEntryEvent, InternalCacheEvent,
         int valueSize;
         if (GemFireCacheImpl.DELTAS_RECALCULATE_SIZE) {
           valueSize =
-              CachedDeserializableFactory.calcMemSize(value, 
region.getObjectSizer(), false);
+              CachedDeserializableFactory.calcMemSize(value, 
getRegion().getObjectSizer(), false);
         } else {
           valueSize = old.getValueSizeInBytes();
         }
@@ -1791,7 +1818,7 @@ public class EntryEventImpl implements 
InternalEntryEvent, InternalCacheEvent,
         ((PutMessage) this.causedByMessage).setDeltaValObj(value);
       }
     } else {
-      this.region.getCachePerfStats().incDeltaFailedUpdates();
+      getRegion().getCachePerfStats().incDeltaFailedUpdates();
       throw new InvalidDeltaException(
           "Cache encountered replay of event containing delta bytes for key "
               + this.keyInfo.getKey());
@@ -1837,12 +1864,12 @@ public class EntryEventImpl implements 
InternalEntryEvent, InternalCacheEvent,
 
   public void setOldValueFromRegion() {
     try {
-      RegionEntry re = this.region.getRegionEntry(getKey());
+      RegionEntry re = getRegion().getRegionEntry(getKey());
       if (re == null) {
         return;
       }
       ReferenceCountHelper.skipRefCountTracking();
-      Object v = re.getValueRetain(this.region, true);
+      Object v = re.getValueRetain(getRegion(), true);
       if (v == null) {
         v = Token.NOT_AVAILABLE;
       }
@@ -1894,7 +1921,7 @@ public class EntryEventImpl implements 
InternalEntryEvent, InternalCacheEvent,
     if (areOldValuesEnabled()) {
       return false;
     }
-    if (this.region instanceof HARegion) {
+    if (getRegion() instanceof HARegion) {
       return false;
     }
     return true;
@@ -1916,11 +1943,17 @@ public class EntryEventImpl implements 
InternalEntryEvent, InternalCacheEvent,
 
   /** Return true if new value available */
   public boolean hasNewValue() {
+    if (this.newValueBytes != null) {
+      return true;
+    }
     Object tmp = this.newValue;
     return tmp != null && tmp != Token.NOT_AVAILABLE;
   }
 
   public boolean hasOldValue() {
+    if (this.oldValueBytes != null) {
+      return true;
+    }
     return this.oldValue != null && this.oldValue != Token.NOT_AVAILABLE;
   }
 
@@ -1929,7 +1962,7 @@ public class EntryEventImpl implements 
InternalEntryEvent, InternalCacheEvent,
   }
 
   public boolean isOldValueAvailable() {
-    if (isOriginRemote() && this.region.isProxy()) {
+    if (isOriginRemote() && getRegion().isProxy()) {
       return false;
     } else {
       return basicGetOldValue() != Token.NOT_AVAILABLE;
@@ -2236,7 +2269,7 @@ public class EntryEventImpl implements 
InternalEntryEvent, InternalCacheEvent,
       if (!cd.isSerialized()) {
         return null;
       }
-      return new SerializedCacheValueImpl(this, this.region, this.re, cd, 
this.oldValueBytes);
+      return new SerializedCacheValueImpl(this, getRegion(), this.re, cd, 
this.oldValueBytes);
     } else {
       return null;
     }
@@ -2450,11 +2483,6 @@ public class EntryEventImpl implements 
InternalEntryEvent, InternalCacheEvent,
     return this.filterInfo;
   }
 
-
-  public LocalRegion getLocalRegion() {
-    return this.region;
-  }
-
   /**
    * This method returns the delta bytes used in Delta Propagation feature. 
<B>For internal delta,
    * see getRawNewValue().</B>
@@ -2502,10 +2530,10 @@ public class EntryEventImpl implements 
InternalEntryEvent, InternalCacheEvent,
    * establish the old value in this event as the current cache value, whether 
in memory or on disk
    */
   public void setOldValueForQueryProcessing() {
-    RegionEntry reentry = this.region.entries.getEntry(this.getKey());
+    RegionEntry reentry = getRegion().entries.getEntry(this.getKey());
     if (reentry != null) {
       @Retained
-      Object v = reentry.getValueOffHeapOrDiskWithoutFaultIn(this.region);
+      Object v = reentry.getValueOffHeapOrDiskWithoutFaultIn(getRegion());
       if (!(v instanceof Token)) {
         // v has already been retained.
         basicSetOldValue(v);
@@ -2556,7 +2584,7 @@ public class EntryEventImpl implements 
InternalEntryEvent, InternalCacheEvent,
       }
     }
     if (result <= 0) {
-      LocalRegion region = this.getLocalRegion();
+      LocalRegion region = this.getRegion();
       if (region != null) {
         result = region.cacheTimeMillis();
       } else {
@@ -2727,15 +2755,15 @@ public class EntryEventImpl implements 
InternalEntryEvent, InternalCacheEvent,
    * @return whether this event is on the PDX type region
    */
   public boolean isOnPdxTypeRegion() {
-    return 
PeerTypeRegistration.REGION_FULL_PATH.equals(this.region.getFullPath());
+    return 
PeerTypeRegistration.REGION_FULL_PATH.equals(getRegion().getFullPath());
   }
 
   /**
    * returns true if it is okay to process this event even though it has a 
null version
    */
   public boolean noVersionReceivedFromServer() {
-    return versionTag == null && region.getConcurrencyChecksEnabled()
-        && region.getServerProxy() != null && !op.isLocal() && 
!isOriginRemote();
+    return versionTag == null && getRegion().getConcurrencyChecksEnabled()
+        && getRegion().getServerProxy() != null && !op.isLocal() && 
!isOriginRemote();
   }
 
   /** returns a copy of this event with the additional fields for WAN conflict 
resolution */
@@ -2804,7 +2832,7 @@ public class EntryEventImpl implements 
InternalEntryEvent, InternalCacheEvent,
    * Return true if this EntryEvent may have off-heap references.
    */
   private boolean mayHaveOffHeapReferences() {
-    LocalRegion lr = this.region;
+    LocalRegion lr = getRegion();
     if (lr != null) {
       return lr.getOffHeap();
     }
diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/cache/EventStateHelper.java
 
b/geode-core/src/main/java/org/apache/geode/internal/cache/EventStateHelper.java
index 6570660..cd45b65 100644
--- 
a/geode-core/src/main/java/org/apache/geode/internal/cache/EventStateHelper.java
+++ 
b/geode-core/src/main/java/org/apache/geode/internal/cache/EventStateHelper.java
@@ -24,7 +24,6 @@ import java.util.List;
 import java.util.Map;
 
 import org.apache.geode.DataSerializer;
-import org.apache.geode.distributed.internal.InternalDistributedSystem;
 import 
org.apache.geode.distributed.internal.membership.InternalDistributedMember;
 import org.apache.geode.internal.InternalDataSerializer;
 import 
org.apache.geode.internal.cache.CreateRegionProcessor.CreateRegionReplyMessage;
@@ -48,14 +47,14 @@ public class EventStateHelper {
    * Callers for this method are: <br>
    * {@link CreateRegionReplyMessage#toData(DataOutput)} <br>
    * {@link RegionStateMessage#toData(DataOutput)} <br>
+   *
+   * @param myId the memberId that is serializing
    */
   @SuppressWarnings("synthetic-access")
-  public static void dataSerialize(DataOutput dop, Map eventState, boolean 
isHARegion)
-      throws IOException {
+  public static void dataSerialize(DataOutput dop, Map eventState, boolean 
isHARegion,
+      InternalDistributedMember myId) throws IOException {
     // For HARegionQueues, the event state map is uses different values
     // than a regular region :(
-    InternalDistributedMember myId =
-        InternalDistributedSystem.getAnyInstance().getDistributedMember();
     Map<MemberIdentifier, Map<ThreadIdentifier, Object>> groupedThreadIds =
         groupThreadIds(eventState);
     List<MemberIdentifier> orderedIds = new LinkedList();
diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/cache/FutureCachedDeserializable.java
 
b/geode-core/src/main/java/org/apache/geode/internal/cache/FutureCachedDeserializable.java
new file mode 100644
index 0000000..4b84011
--- /dev/null
+++ 
b/geode-core/src/main/java/org/apache/geode/internal/cache/FutureCachedDeserializable.java
@@ -0,0 +1,35 @@
+/*
+ * 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 org.apache.geode.internal.cache;
+
+/**
+ * Used to delay creating a CachedDeserializable
+ * during deserialization until later when a Cache
+ * will be available.
+ */
+public class FutureCachedDeserializable {
+  private final byte[] data;
+
+  public FutureCachedDeserializable(byte[] data) {
+    this.data = data;
+  }
+
+  public CachedDeserializable create(InternalCache cache) {
+    return CachedDeserializableFactory.create(this.data, cache);
+  }
+
+}
diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/cache/InitialImageOperation.java
 
b/geode-core/src/main/java/org/apache/geode/internal/cache/InitialImageOperation.java
index 894f096..068ca70 100644
--- 
a/geode-core/src/main/java/org/apache/geode/internal/cache/InitialImageOperation.java
+++ 
b/geode-core/src/main/java/org/apache/geode/internal/cache/InitialImageOperation.java
@@ -3394,12 +3394,14 @@ public class InitialImageOperation {
         Map<? extends DataSerializable, ? extends DataSerializable> eventState,
         boolean isHARegion) {
       RegionStateMessage msg = new RegionStateMessage(dest, processorId, 
eventState, isHARegion);
+      msg.setSender(dm.getId()); // for EventStateHelper.dataSerialize
       dm.putOutgoing(msg);
     }
 
     public static void send(DistributionManager dm, InternalDistributedMember 
dest, int processorId,
         RegionVersionVector rvv, boolean isHARegion) {
       RegionStateMessage msg = new RegionStateMessage(dest, processorId, rvv, 
isHARegion);
+      msg.setSender(dm.getId()); // for EventStateHelper.dataSerialize
       dm.putOutgoing(msg);
     }
 
@@ -3409,7 +3411,7 @@ public class InitialImageOperation {
       dop.writeBoolean(isHARegion);
       if (eventState != null) {
         dop.writeBoolean(true);
-        EventStateHelper.dataSerialize(dop, eventState, isHARegion);
+        EventStateHelper.dataSerialize(dop, eventState, isHARegion, 
getSender());
       } else {
         dop.writeBoolean(false);
       }
diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/cache/InvalidateOperation.java
 
b/geode-core/src/main/java/org/apache/geode/internal/cache/InvalidateOperation.java
index d2c37cf..11e7273 100644
--- 
a/geode-core/src/main/java/org/apache/geode/internal/cache/InvalidateOperation.java
+++ 
b/geode-core/src/main/java/org/apache/geode/internal/cache/InvalidateOperation.java
@@ -73,7 +73,7 @@ public class InvalidateOperation extends 
DistributedCacheOperation {
     protected boolean operateOnRegion(CacheEvent event, 
ClusterDistributionManager dm)
         throws EntryNotFoundException {
       EntryEventImpl ev = (EntryEventImpl) event;
-      DistributedRegion rgn = (DistributedRegion) ev.region;
+      DistributedRegion rgn = (DistributedRegion) ev.getRegion();
 
       try {
         if (!rgn.isCacheContentProxy()) {
diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/cache/LocalRegionDataView.java
 
b/geode-core/src/main/java/org/apache/geode/internal/cache/LocalRegionDataView.java
index 22f5e0b..7e3b746 100644
--- 
a/geode-core/src/main/java/org/apache/geode/internal/cache/LocalRegionDataView.java
+++ 
b/geode-core/src/main/java/org/apache/geode/internal/cache/LocalRegionDataView.java
@@ -52,7 +52,7 @@ public class LocalRegionDataView implements InternalDataView {
    */
   public void destroyExistingEntry(EntryEventImpl event, boolean cacheWrite,
       Object expectedOldValue) {
-    LocalRegion lr = event.getLocalRegion();
+    LocalRegion lr = event.getRegion();
     lr.mapDestroy(event, cacheWrite, false, // isEviction
         expectedOldValue);
   }
@@ -67,7 +67,7 @@ public class LocalRegionDataView implements InternalDataView {
   public void invalidateExistingEntry(EntryEventImpl event, boolean 
invokeCallbacks,
       boolean forceNewEntry) {
     try {
-      event.getLocalRegion().entries.invalidate(event, invokeCallbacks, 
forceNewEntry, false);
+      event.getRegion().entries.invalidate(event, invokeCallbacks, 
forceNewEntry, false);
     } catch (ConcurrentCacheModificationException e) {
       // a newer event has already been applied to the cache. this can happen
       // in a client cache if another thread is operating on the same key
@@ -77,7 +77,7 @@ public class LocalRegionDataView implements InternalDataView {
   @Override
   public void updateEntryVersion(EntryEventImpl event) throws 
EntryNotFoundException {
     try {
-      event.getLocalRegion().entries.updateEntryVersion(event);
+      event.getRegion().entries.updateEntryVersion(event);
     } catch (ConcurrentCacheModificationException e) {
       // a later in time event has already been applied to the cache. this can 
happen
       // in a cache if another thread is operating on the same key
@@ -149,7 +149,7 @@ public class LocalRegionDataView implements 
InternalDataView {
   public boolean putEntry(EntryEventImpl event, boolean ifNew, boolean ifOld,
       Object expectedOldValue, boolean requireOldValue, long lastModified,
       boolean overwriteDestroyed) {
-    return event.getLocalRegion().virtualPut(event, ifNew, ifOld, 
expectedOldValue, requireOldValue,
+    return event.getRegion().virtualPut(event, ifNew, ifOld, expectedOldValue, 
requireOldValue,
         lastModified, overwriteDestroyed);
   }
 
diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionDataView.java
 
b/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionDataView.java
index 489ad33..e07201f 100644
--- 
a/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionDataView.java
+++ 
b/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionDataView.java
@@ -33,21 +33,21 @@ public class PartitionedRegionDataView extends 
LocalRegionDataView {
 
   @Override
   public void updateEntryVersion(EntryEventImpl event) throws 
EntryNotFoundException {
-    PartitionedRegion pr = (PartitionedRegion) event.getLocalRegion();
+    PartitionedRegion pr = (PartitionedRegion) event.getRegion();
     pr.updateEntryVersionInBucket(event);
   }
 
   @Override
   public void invalidateExistingEntry(EntryEventImpl event, boolean 
invokeCallbacks,
       boolean forceNewEntry) {
-    PartitionedRegion pr = (PartitionedRegion) event.getLocalRegion();
+    PartitionedRegion pr = (PartitionedRegion) event.getRegion();
     pr.invalidateInBucket(event);
   }
 
   @Override
   public void destroyExistingEntry(EntryEventImpl event, boolean cacheWrite,
       Object expectedOldValue) {
-    PartitionedRegion pr = (PartitionedRegion) event.getLocalRegion();
+    PartitionedRegion pr = (PartitionedRegion) event.getRegion();
     pr.destroyInBucket(event, expectedOldValue);
   }
 
@@ -95,7 +95,7 @@ public class PartitionedRegionDataView extends 
LocalRegionDataView {
   public boolean putEntryOnRemote(EntryEventImpl event, boolean ifNew, boolean 
ifOld,
       Object expectedOldValue, boolean requireOldValue, long lastModified,
       boolean overwriteDestroyed) throws DataLocationException {
-    PartitionedRegion pr = (PartitionedRegion) event.getLocalRegion();
+    PartitionedRegion pr = (PartitionedRegion) event.getRegion();
     return pr.getDataStore().putLocally(event.getKeyInfo().getBucketId(), 
event, ifNew, ifOld,
         expectedOldValue, requireOldValue, lastModified);
   }
@@ -103,7 +103,7 @@ public class PartitionedRegionDataView extends 
LocalRegionDataView {
   @Override
   public void destroyOnRemote(EntryEventImpl event, boolean cacheWrite, Object 
expectedOldValue)
       throws DataLocationException {
-    PartitionedRegion pr = (PartitionedRegion) event.getLocalRegion();
+    PartitionedRegion pr = (PartitionedRegion) event.getRegion();
     pr.getDataStore().destroyLocally(event.getKeyInfo().getBucketId(), event, 
expectedOldValue);
     return;
   }
@@ -111,7 +111,7 @@ public class PartitionedRegionDataView extends 
LocalRegionDataView {
   @Override
   public void invalidateOnRemote(EntryEventImpl event, boolean invokeCallbacks,
       boolean forceNewEntry) throws DataLocationException {
-    PartitionedRegion pr = (PartitionedRegion) event.getLocalRegion();
+    PartitionedRegion pr = (PartitionedRegion) event.getRegion();
     pr.getDataStore().invalidateLocally(event.getKeyInfo().getBucketId(), 
event);
   }
 
diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionHelper.java
 
b/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionHelper.java
index e0e0123..bbeb486 100644
--- 
a/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionHelper.java
+++ 
b/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionHelper.java
@@ -47,10 +47,8 @@ import 
org.apache.geode.cache.partition.PartitionNotAvailableException;
 import org.apache.geode.cache.util.CacheListenerAdapter;
 import org.apache.geode.cache.util.CacheWriterAdapter;
 import org.apache.geode.distributed.DistributedMember;
-import org.apache.geode.distributed.DistributedSystem;
 import org.apache.geode.distributed.internal.DistributionConfig;
 import org.apache.geode.distributed.internal.DistributionManager;
-import org.apache.geode.distributed.internal.InternalDistributedSystem;
 import org.apache.geode.distributed.internal.MembershipListener;
 import 
org.apache.geode.distributed.internal.membership.InternalDistributedMember;
 import org.apache.geode.internal.Assert;
@@ -739,11 +737,8 @@ public class PartitionedRegionHelper {
       return bucketFullPath.substring(idxEndRoot);
     }
 
-    DistributedSystem ids = InternalDistributedSystem.getAnyInstance();
-    if (ids != null) {
-      if (logger.isDebugEnabled()) {
-        logger.debug("getBucketString no match fullPath={}", bucketFullPath);
-      }
+    if (logger.isDebugEnabled()) {
+      logger.debug("getBucketString no match fullPath={}", bucketFullPath);
     }
     return null;
   }
diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/cache/SearchLoadAndWriteProcessor.java
 
b/geode-core/src/main/java/org/apache/geode/internal/cache/SearchLoadAndWriteProcessor.java
index 988ec1e..c7502b5 100755
--- 
a/geode-core/src/main/java/org/apache/geode/internal/cache/SearchLoadAndWriteProcessor.java
+++ 
b/geode-core/src/main/java/org/apache/geode/internal/cache/SearchLoadAndWriteProcessor.java
@@ -2484,7 +2484,7 @@ public class SearchLoadAndWriteProcessor implements 
MembershipListener {
           RegionEventImpl regionEvtImpl = null;
           if (this.event instanceof EntryEventImpl) {
             entryEvtImpl = (EntryEventImpl) this.event;
-            entryEvtImpl.region = region;
+            entryEvtImpl.setRegion(region);
             Operation op = entryEvtImpl.getOperation();
             if (op == Operation.REPLACE) {
               entryEvtImpl.setOperation(Operation.UPDATE);
diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/cache/TXStateProxyImpl.java
 
b/geode-core/src/main/java/org/apache/geode/internal/cache/TXStateProxyImpl.java
index 64be4af..413c99c 100644
--- 
a/geode-core/src/main/java/org/apache/geode/internal/cache/TXStateProxyImpl.java
+++ 
b/geode-core/src/main/java/org/apache/geode/internal/cache/TXStateProxyImpl.java
@@ -286,8 +286,8 @@ public class TXStateProxyImpl implements TXStateProxy {
       Object expectedOldValue) throws EntryNotFoundException {
     try {
       this.operationCount++;
-      getRealDeal(event.getKeyInfo(), 
event.getLocalRegion()).destroyExistingEntry(event,
-          cacheWrite, expectedOldValue);
+      getRealDeal(event.getKeyInfo(), 
event.getRegion()).destroyExistingEntry(event, cacheWrite,
+          expectedOldValue);
       trackBucketForTx(event.getKeyInfo());
     } catch (TransactionDataRebalancedException | PrimaryBucketException re) {
       throw getTransactionException(event.getKeyInfo(), re);
@@ -364,7 +364,7 @@ public class TXStateProxyImpl implements TXStateProxy {
       boolean forceNewEntry) {
     try {
       this.operationCount++;
-      getRealDeal(event.getKeyInfo(), 
event.getLocalRegion()).invalidateExistingEntry(event,
+      getRealDeal(event.getKeyInfo(), 
event.getRegion()).invalidateExistingEntry(event,
           invokeCallbacks, forceNewEntry);
       trackBucketForTx(event.getKeyInfo());
     } catch (TransactionDataRebalancedException | PrimaryBucketException re) {
@@ -622,8 +622,8 @@ public class TXStateProxyImpl implements TXStateProxy {
       boolean overwriteDestroyed) {
     try {
       this.operationCount++;
-      boolean retVal = getRealDeal(event.getKeyInfo(), 
event.getLocalRegion()).putEntry(event,
-          ifNew, ifOld, expectedOldValue, requireOldValue, lastModified, 
overwriteDestroyed);
+      boolean retVal = getRealDeal(event.getKeyInfo(), 
event.getRegion()).putEntry(event, ifNew,
+          ifOld, expectedOldValue, requireOldValue, lastModified, 
overwriteDestroyed);
       trackBucketForTx(event.getKeyInfo());
       return retVal;
     } catch (TransactionDataRebalancedException | PrimaryBucketException re) {
@@ -655,7 +655,7 @@ public class TXStateProxyImpl implements TXStateProxy {
       Object expectedOldValue, boolean requireOldValue, long lastModified,
       boolean overwriteDestroyed) throws DataLocationException {
     this.operationCount++;
-    TXStateInterface tx = getRealDeal(event.getKeyInfo(), 
event.getLocalRegion());
+    TXStateInterface tx = getRealDeal(event.getKeyInfo(), event.getRegion());
     assert (tx instanceof TXState) : tx.getClass().getSimpleName();
     return tx.putEntryOnRemote(event, ifNew, ifOld, expectedOldValue, 
requireOldValue, lastModified,
         overwriteDestroyed);
@@ -670,7 +670,7 @@ public class TXStateProxyImpl implements TXStateProxy {
   public void destroyOnRemote(EntryEventImpl event, boolean cacheWrite, Object 
expectedOldValue)
       throws DataLocationException {
     this.operationCount++;
-    TXStateInterface tx = getRealDeal(event.getKeyInfo(), 
event.getLocalRegion());
+    TXStateInterface tx = getRealDeal(event.getKeyInfo(), event.getRegion());
     assert (tx instanceof TXState);
     tx.destroyOnRemote(event, cacheWrite, expectedOldValue);
   }
@@ -679,7 +679,7 @@ public class TXStateProxyImpl implements TXStateProxy {
   public void invalidateOnRemote(EntryEventImpl event, boolean invokeCallbacks,
       boolean forceNewEntry) throws DataLocationException {
     this.operationCount++;
-    TXStateInterface tx = getRealDeal(event.getKeyInfo(), 
event.getLocalRegion());
+    TXStateInterface tx = getRealDeal(event.getKeyInfo(), event.getRegion());
     assert (tx instanceof TXState);
     tx.invalidateOnRemote(event, invokeCallbacks, forceNewEntry);
   }
diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/cache/UpdateEntryVersionOperation.java
 
b/geode-core/src/main/java/org/apache/geode/internal/cache/UpdateEntryVersionOperation.java
index 58475ce..1d3fdf4 100644
--- 
a/geode-core/src/main/java/org/apache/geode/internal/cache/UpdateEntryVersionOperation.java
+++ 
b/geode-core/src/main/java/org/apache/geode/internal/cache/UpdateEntryVersionOperation.java
@@ -115,7 +115,7 @@ public class UpdateEntryVersionOperation extends 
DistributedCacheOperation {
     protected boolean operateOnRegion(CacheEvent event, 
ClusterDistributionManager dm)
         throws EntryNotFoundException {
       EntryEventImpl ev = (EntryEventImpl) event;
-      DistributedRegion rgn = (DistributedRegion) ev.region;
+      DistributedRegion rgn = (DistributedRegion) ev.getRegion();
 
       try {
         if (!rgn.isCacheContentProxy()) {
diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/cache/entries/AbstractRegionEntry.java
 
b/geode-core/src/main/java/org/apache/geode/internal/cache/entries/AbstractRegionEntry.java
index d614d1d..33d6e34 100644
--- 
a/geode-core/src/main/java/org/apache/geode/internal/cache/entries/AbstractRegionEntry.java
+++ 
b/geode-core/src/main/java/org/apache/geode/internal/cache/entries/AbstractRegionEntry.java
@@ -1718,7 +1718,7 @@ public abstract class AbstractRegionEntry implements 
HashRegionEntry<Object, Obj
       final InternalDistributedMember originator =
           (InternalDistributedMember) event.getDistributedMember();
       final VersionSource dmId = event.getRegion().getVersionMember();
-      InternalRegion r = event.getLocalRegion();
+      InternalRegion r = event.getRegion();
       boolean eventHasDelta = event.getDeltaBytes() != null && 
event.getRawNewValue() == null;
 
       VersionStamp stamp = getVersionStamp();
diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/cache/map/RegionMapDestroy.java
 
b/geode-core/src/main/java/org/apache/geode/internal/cache/map/RegionMapDestroy.java
index 5d1d2bb..0a2c1d2 100644
--- 
a/geode-core/src/main/java/org/apache/geode/internal/cache/map/RegionMapDestroy.java
+++ 
b/geode-core/src/main/java/org/apache/geode/internal/cache/map/RegionMapDestroy.java
@@ -720,8 +720,8 @@ public class RegionMapDestroy {
       EntryNotFoundException, RegionClearedException {
     focusedRegionMap.processVersionTag(re, event);
     final int oldSize = internalRegion.calculateRegionEntryValueSize(re);
-    boolean retVal = re.destroy(event.getLocalRegion(), event, inTokenMode, 
cacheWrite,
-        expectedOldValue, forceDestroy, removeRecoveredEntry);
+    boolean retVal = re.destroy(event.getRegion(), event, inTokenMode, 
cacheWrite, expectedOldValue,
+        forceDestroy, removeRecoveredEntry);
     if (retVal) {
       EntryLogger.logDestroy(event);
       internalRegion.updateSizeOnRemove(event.getKey(), oldSize);
diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/PutAllPRMessage.java
 
b/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/PutAllPRMessage.java
index 7c808d6..5295954 100755
--- 
a/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/PutAllPRMessage.java
+++ 
b/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/PutAllPRMessage.java
@@ -342,8 +342,8 @@ public class PutAllPRMessage extends 
PartitionMessageWithDirectReply {
 
     @Retained
     EntryEventImpl ev = EntryEventImpl.create(r, putAllPRData[0].getOp(), 
putAllPRData[0].getKey(),
-        putAllPRData[0].getValue(), this.callbackArg, false /* originRemote 
*/, getSender(),
-        true/* generate Callbacks */, putAllPRData[0].getEventID());
+        putAllPRData[0].getValue(r.getCache()), this.callbackArg, false /* 
originRemote */,
+        getSender(), true/* generate Callbacks */, 
putAllPRData[0].getEventID());
     return ev;
   }
 
@@ -493,7 +493,7 @@ public class PutAllPRMessage extends 
PartitionMessageWithDirectReply {
                   fre.setHash(ev.getKey().hashCode());
                   throw fre;
                 } else {
-                  succeeded.put(putAllPRData[i].getKey(), 
putAllPRData[i].getValue());
+                  succeeded.put(putAllPRData[i].getKey(), 
putAllPRData[i].getValue(r.getCache()));
                   this.versions.addKeyAndVersion(putAllPRData[i].getKey(), 
ev.getVersionTag());
                 }
               } finally {
@@ -582,18 +582,18 @@ public class PutAllPRMessage extends 
PartitionMessageWithDirectReply {
     // eventSender,
     // true/* generate Callbacks */,
     // prd.getEventID());
+    Object prdValue = prd.getValue(r.getCache());
 
     @Retained
-    EntryEventImpl ev = EntryEventImpl.create(r, prd.getOp(), prd.getKey(), 
prd.getValue(), null,
-        false, eventSender, !skipCallbacks, prd.getEventID());
+    EntryEventImpl ev = EntryEventImpl.create(r, prd.getOp(), prd.getKey(), 
prdValue, null, false,
+        eventSender, !skipCallbacks, prd.getEventID());
     boolean evReturned = false;
     try {
 
-      if (prd.getValue() == null
-          && ev.getRegion().getAttributes().getDataPolicy() == 
DataPolicy.NORMAL) {
+      if (prdValue == null && ev.getRegion().getAttributes().getDataPolicy() 
== DataPolicy.NORMAL) {
         ev.setLocalInvalid(true);
       }
-      ev.setNewValue(prd.getValue());
+      ev.setNewValue(prdValue);
       ev.setOldValue(prd.getOldValue());
       if (bridgeContext != null) {
         ev.setContext(bridgeContext);
diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/cache/tx/DistTxEntryEvent.java
 
b/geode-core/src/main/java/org/apache/geode/internal/cache/tx/DistTxEntryEvent.java
index 85d1bad..a4ff33e 100644
--- 
a/geode-core/src/main/java/org/apache/geode/internal/cache/tx/DistTxEntryEvent.java
+++ 
b/geode-core/src/main/java/org/apache/geode/internal/cache/tx/DistTxEntryEvent.java
@@ -31,9 +31,6 @@ import 
org.apache.geode.internal.cache.DistributedRemoveAllOperation;
 import 
org.apache.geode.internal.cache.DistributedRemoveAllOperation.RemoveAllEntryData;
 import org.apache.geode.internal.cache.EntryEventImpl;
 import org.apache.geode.internal.cache.EventID;
-import org.apache.geode.internal.cache.GemFireCacheImpl;
-import org.apache.geode.internal.cache.InternalCache;
-import org.apache.geode.internal.cache.LocalRegion;
 import org.apache.geode.internal.cache.versions.VersionTag;
 import org.apache.geode.internal.offheap.annotations.Retained;
 
@@ -74,7 +71,7 @@ public class DistTxEntryEvent extends EntryEventImpl {
   @Override
   public void toData(DataOutput out) throws IOException {
     DataSerializer.writeObject(this.eventID, out);
-    DataSerializer.writeObject(this.region.getFullPath(), out);
+    DataSerializer.writeObject(this.getRegion().getFullPath(), out);
     out.writeByte(this.op.ordinal);
     DataSerializer.writeObject(this.getKey(), out);
     DataSerializer.writeInteger(this.keyInfo.getBucketId(), out);
@@ -111,7 +108,7 @@ public class DistTxEntryEvent extends EntryEventImpl {
                                                */, null/*
                                                        * callbackarg [DISTTX] 
TODO
                                                        */, bucketId);
-    basicSetNewValue(DataSerializer.readObject(in));
+    basicSetNewValue(DataSerializer.readObject(in), true);
 
     byte flags = DataSerializer.readByte(in);
 
@@ -248,8 +245,8 @@ public class DistTxEntryEvent extends EntryEventImpl {
     buf.append("[");
     buf.append("eventID=");
     buf.append(this.eventID);
-    if (this.region != null) {
-      buf.append(";r=").append(this.region.getName());
+    if (this.getRegion() != null) {
+      buf.append(";r=").append(this.getRegion().getName());
     }
     buf.append(";op=");
     buf.append(getOperation());
diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/cache/tx/DistributedTXRegionStub.java
 
b/geode-core/src/main/java/org/apache/geode/internal/cache/tx/DistributedTXRegionStub.java
index 6f01ec6..2942187 100644
--- 
a/geode-core/src/main/java/org/apache/geode/internal/cache/tx/DistributedTXRegionStub.java
+++ 
b/geode-core/src/main/java/org/apache/geode/internal/cache/tx/DistributedTXRegionStub.java
@@ -53,7 +53,7 @@ public class DistributedTXRegionStub extends 
AbstractPeerTXRegionStub {
       Object expectedOldValue) {
     try {
       RemoteOperationResponse response = 
RemoteDestroyMessage.send(state.getTarget(),
-          event.getLocalRegion(), event, expectedOldValue, true, false);
+          event.getRegion(), event, expectedOldValue, true, false);
       response.waitForRemoteResponse();
     } catch (RegionDestroyedException rde) {
       throw new TransactionDataNotColocatedException(
@@ -167,7 +167,7 @@ public class DistributedTXRegionStub extends 
AbstractPeerTXRegionStub {
       Object expectedOldValue, boolean requireOldValue, long lastModified,
       boolean overwriteDestroyed) {
     boolean retVal = false;
-    final LocalRegion r = event.getLocalRegion();
+    final LocalRegion r = event.getRegion();
 
     try {
       RemotePutResponse response = RemotePutMessage.txSend(state.getTarget(), 
r, event,
diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/cache/tx/PartitionedTXRegionStub.java
 
b/geode-core/src/main/java/org/apache/geode/internal/cache/tx/PartitionedTXRegionStub.java
index c76f528..c029175 100644
--- 
a/geode-core/src/main/java/org/apache/geode/internal/cache/tx/PartitionedTXRegionStub.java
+++ 
b/geode-core/src/main/java/org/apache/geode/internal/cache/tx/PartitionedTXRegionStub.java
@@ -75,7 +75,7 @@ public class PartitionedTXRegionStub extends 
AbstractPeerTXRegionStub {
 
   public void destroyExistingEntry(EntryEventImpl event, boolean cacheWrite,
       Object expectedOldValue) {
-    PartitionedRegion pr = (PartitionedRegion) event.getLocalRegion();
+    PartitionedRegion pr = (PartitionedRegion) event.getRegion();
     try {
       pr.destroyRemotely(state.getTarget(), event.getKeyInfo().getBucketId(), 
event,
           expectedOldValue);
@@ -208,7 +208,7 @@ public class PartitionedTXRegionStub extends 
AbstractPeerTXRegionStub {
 
   public void invalidateExistingEntry(EntryEventImpl event, boolean 
invokeCallbacks,
       boolean forceNewEntry) {
-    PartitionedRegion pr = (PartitionedRegion) event.getLocalRegion();
+    PartitionedRegion pr = (PartitionedRegion) event.getRegion();
     try {
       pr.invalidateRemotely(state.getTarget(), 
event.getKeyInfo().getBucketId(), event);
     } catch (TransactionException e) {
@@ -359,7 +359,7 @@ public class PartitionedTXRegionStub extends 
AbstractPeerTXRegionStub {
       Object expectedOldValue, boolean requireOldValue, long lastModified,
       boolean overwriteDestroyed) {
     boolean retVal = false;
-    final LocalRegion r = event.getLocalRegion();
+    final LocalRegion r = event.getRegion();
     PartitionedRegion pr = (PartitionedRegion) r;
     try {
       retVal =
diff --git 
a/geode-core/src/test/java/org/apache/geode/internal/cache/EntryEventImplTest.java
 
b/geode-core/src/test/java/org/apache/geode/internal/cache/EntryEventImplTest.java
index 7097ba1..f548b4d 100644
--- 
a/geode-core/src/test/java/org/apache/geode/internal/cache/EntryEventImplTest.java
+++ 
b/geode-core/src/test/java/org/apache/geode/internal/cache/EntryEventImplTest.java
@@ -106,7 +106,7 @@ public class EntryEventImplTest {
 
     e.exportNewValue(nvImporter);
 
-    verify(nvImporter).importNewObject(newValue, true);
+    verify(nvImporter).importNewBytes(newValueBytes, true);
   }
 
   @Test
diff --git 
a/geode-core/src/test/resources/org/apache/geode/codeAnalysis/sanctionedDataSerializables.txt
 
b/geode-core/src/test/resources/org/apache/geode/codeAnalysis/sanctionedDataSerializables.txt
index b50e95c..c17eecb 100644
--- 
a/geode-core/src/test/resources/org/apache/geode/codeAnalysis/sanctionedDataSerializables.txt
+++ 
b/geode-core/src/test/resources/org/apache/geode/codeAnalysis/sanctionedDataSerializables.txt
@@ -888,7 +888,7 @@ 
toData,42,2a2bb700a32ab400082bb800a42ab400412bb800a52b2ab40003b900a602002b2ab400
 
 
org/apache/geode/internal/cache/CreateRegionProcessor$CreateRegionReplyMessage,2
 
fromData,161,2a2bb700062bb90007010099000e2a2bb80008c00009b5000a2bb9000b01003d1c9a000b2a01b5000ca700352abb000d591cb7000eb5000c033e1d1ca20022bb000f59b700103a0419042bb800112ab4000c1904b6001257840301a7ffdf2bb90007010099000c2a2b03b80013b500142bb9000701009900162abb001559b70016b500172ab400172bb800112a2bb900070100b500182a2bb900190100b50004b1
-toData,191,2a2bb7001a2b2ab4000ac6000704a7000403b9001b02002ab4000ac6000b2ab4000a2bb8001c2ab4000cc7000d2b03b9001d0200a700322ab4000cb6001e3d2b1cb9001d0200033e1d1ca2001c2ab4000c1db6001fc0000f3a0419042bb80020840301a7ffe52ab40014c600192b04b9001b02002b2ab40014c0002103b80022a7000a2b03b9001b02002ab40017c600152b04b9001b02002ab400172bb80020a7000a2b03b9001b02002b2ab40018b9001b02002b2ab40004b900230300b1
+toData,195,2a2bb7001a2b2ab4000ac6000704a7000403b9001b02002ab4000ac6000b2ab4000a2bb8001c2ab4000cc7000d2b03b9001d0200a700322ab4000cb6001e3d2b1cb9001d0200033e1d1ca2001c2ab4000c1db6001fc0000f3a0419042bb80020840301a7ffe52ab40014c6001d2b04b9001b02002b2ab40014c00021032ab60022b80023a7000a2b03b9001b02002ab40017c600152b04b9001b02002ab400172bb80020a7000a2b03b9001b02002b2ab40018b9001b02002b2ab40004b900240300b1
 
 org/apache/geode/internal/cache/DestroyOperation$DestroyMessage,2
 
fromData,45,2a2bb700322a2bb80033c00034b500022a2bb80033b500272bb800354d2cb6003699000b2a2bb80037b50005b1
@@ -981,8 +981,8 @@ fromData,17,2a2bb80005b500022a2bb80005b50003b1
 toData,17,2ab400022bb800042ab400032bb80004b1
 
 org/apache/geode/internal/cache/EntryEventImpl,2
-fromData,222,2a2bb80016c00017b500182bb800164d2bb800164e2abb0019592c2d01b7001ab5001b2a2bb9001c0100b8001db5001e2a2bb9001f0100b500082ab4001b2bb80016b600202a2bb80016c00021b500092bb900220100990013b200239a003fbb0024591225b70026bf2bb9002201009900242a2bb80027b500282a2ab40028b500062a2ab40028b80029b8002ab50005a7000b2a2bb80016b500052bb90022010099001c2a2bb80027b5002b2a2ab4002bb80029b8002ab50007a7000b2a2bb80016b500072a2bb8002cb5002d2a2bb8002eb5000a2a2bb8002fb50013b1
-toData,284,2ab400182bb8014f2ab600892bb8014f2ab4001bb6017c2bb8014f2b2ab4001eb4017db9017e02002b2ab4000811c03f7eb9017f02002ab6004a2bb8014f2ab400092bb8014f2b03b9018002002ab600404d2cc100803e1d99000d2cc00080b900b001003e2b1db9018002001d99003b2ab40028c6000e2ab400282bb80181a7002e2ab40006c6000e2ab400062bb80181a7001c2cc000803a041904b900be01002bb80182a700082c2bb8014f2ab600424d2cc100803e1d99000d2cc00080b900b001003e2b1db9018002001d9900292ab4002bc6000e2ab4002b2bb80181a700212cc000803a041904b900be01002bb
 [...]
+fromData,219,2a2bb80016c00017b500182bb800164d2bb800164e2abb0019592c2d01b7001ab5001b2a2bb9001c0100b8001db5001e2a2bb9001f0100b500082ab4001b2bb80016b600202a2bb80016c00021b500092bb900220100990013b200239a0040bb0024591225b70026bf2bb90022010099001b2a2bb80027b500282a2ab40028b500062a01b50005a700152a01b500282a01b500062a2bb80016b500052bb9002201009900132a2bb80027b500292a01b50007a700102a01b500292a2bb80016b500072a2bb8002ab5002b2a2bb8002cb5000a2a2bb8002db50013b1
+toData,284,2ab400182bb801502ab600882bb801502ab4001bb6017d2bb801502b2ab4001eb4017eb9017f02002b2ab4000811c03f7eb9018002002ab6004a2bb801502ab400092bb801502b03b9018102002ab600404d2cc1007f3e1d99000d2cc0007fb900b101003e2b1db9018102001d99003b2ab40028c6000e2ab400282bb80182a7002e2ab40006c6000e2ab400062bb80182a7001c2cc0007f3a041904b900bf01002bb80183a700082c2bb801502ab600424d2cc1007f3e1d99000d2cc0007fb900b101003e2b1db9018102001d9900292ab40029c6000e2ab400292bb80182a700212cc0007f3a041904b900bf01002bb
 [...]
 
 org/apache/geode/internal/cache/EntrySnapshot,2
 
fromData,50,2a03b500052bb9004201003d1c9900112abb000759b70043b50004a7000e2abb000359b70044b500042ab400042bb60045b1
@@ -1083,8 +1083,8 @@ 
fromData,33,2a2bb700162bb9001701003d1c9900132bb9001701003e2a1d2bb80018b50004b1
 
toData,51,2a2bb700092ab40004c600222b04b9000a02002b2ab40004c1000bb9000a02002ab400042bb6000ca7000a2b03b9000a0200b1
 
 org/apache/geode/internal/cache/InitialImageOperation$RegionStateMessage,2
-fromData,66,2a2bb7001c2a2bb9001d0100b500052bb9001d01003d1c99000f2a2b2ab40005b8001eb500042bb9001d01003d1c9900132bb9001d01003e2a1d2bb8001fb50006b1
-toData,97,2a2bb7000b2b2ab40005b9000c02002ab40004c600192b04b9000c02002b2ab400042ab40005b8000da7000a2b03b9000c02002ab40006c600222b04b9000c02002b2ab40006c1000eb9000c02002ab400062bb8000fa7000a2b03b9000c0200b1
+fromData,66,2a2bb7001f2a2bb900200100b500052bb9002001003d1c99000f2a2b2ab40005b80021b500042bb9002001003d1c9900132bb9002001003e2a1d2bb80022b50006b1
+toData,101,2a2bb7000d2b2ab40005b9000e02002ab40004c6001d2b04b9000e02002b2ab400042ab400052ab6000fb80010a7000a2b03b9000e02002ab40006c600222b04b9000e02002b2ab40006c10011b9000e02002ab400062bb80012a7000a2b03b9000e0200b1
 
 
org/apache/geode/internal/cache/InitialImageOperation$RequestFilterInfoMessage,2
 fromData,24,2a2bb7001e2a2bb8001fb500042a2bb900200100b50002b1
@@ -1951,7 +1951,7 @@ 
toData,40,2ab400023d2a59b400022ab4000460b500022ab400032b1c2ab400042ab400052ab400
 toDataPre_GFE_8_0_0_0,20,2ab400029a000a2ab40003b8000c2a2bb6000db1
 
 org/apache/geode/internal/cache/tx/DistTxEntryEvent,2
-fromData,99,2a2bb80019c0001ab500052a2bb8001bb500032a2bb9001c0100b8001db500092bb800194d2bb8001e4e2abb001f592c01012db70020b5000d2a2bb80019b600212bb80022b6002336041504047e9900082a2bb700241504057e9900082a2bb70025b1
+fromData,100,2a2bb80019c0001ab500052a2bb8001bb500032a2bb9001c0100b8001db500092bb800194d2bb8001e4e2abb001f592c01012db70020b5000d2a2bb8001904b600212bb80022b6002336041504047e9900082a2bb700241504057e9900082a2bb70025b1
 
toData,121,2ab400052bb800062ab40007b600082bb800062b2ab40009b4000ab9000b02002ab6000c2bb800062ab4000db6000eb8000f2bb800102ab600112bb80006033d2ab40012c600081c0480913d2ab40014c600081c0580913d1cb800152bb800162ab40012c600082a2bb700172ab40014c600082a2bb70018b1
 
 org/apache/geode/internal/cache/versions/RVVException,2

-- 
To stop receiving notification emails like this one, please contact
dschnei...@apache.org.

Reply via email to