You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by ds...@apache.org on 2016/04/26 19:15:47 UTC

[1/2] incubator-geode git commit: GEODE-1304: remove TODO OFFHEAP comments

Repository: incubator-geode
Updated Branches:
  refs/heads/develop 9fbcb93b6 -> 44f403d9d


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/44f403d9/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderQueue.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderQueue.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderQueue.java
index b4efd21..b0b1a32 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderQueue.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderQueue.java
@@ -826,7 +826,6 @@ public class ParallelGatewaySenderQueue implements RegionQueue {
                   // this.bucketToTempQueueMap.put(bucketId, tempQueue);
                   // }
                   tempQueue.add(value);
-                  // TODO OFFHEAP is value refCount ok here?
                   // For debugging purpose.
                   if (isDebugEnabled) {
                     logger.debug("The value {} is enqueued to the tempQueue for the BucketRegionQueue.", value);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/44f403d9/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/AbstractStoredObject.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/AbstractStoredObject.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/AbstractStoredObject.java
index 22e2d55..7e6ac93 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/AbstractStoredObject.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/AbstractStoredObject.java
@@ -116,7 +116,6 @@ public abstract class AbstractStoredObject implements StoredObject {
     if (!isSerialized()) {
       return false;
     }
-    // TODO OFFHEAP: what if the data is compressed?
     byte dsCode = this.readDataByte(0);
     return dsCode == DSCODE.PDX || dsCode == DSCODE.PDX_ENUM || dsCode == DSCODE.PDX_INLINE_ENUM;
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/44f403d9/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/FreeListManager.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/FreeListManager.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/FreeListManager.java
index 6de7be9..c5e17e8 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/FreeListManager.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/FreeListManager.java
@@ -304,13 +304,6 @@ public class FreeListManager {
   /**
    * Defragments memory and returns true if enough memory to allocate chunkSize
    * is freed. Otherwise returns false;
-   * TODO OFFHEAP: what should be done about contiguous chunks that end up being bigger than 2G?
-   * Currently if we are given slabs bigger than 2G or that just happen to be contiguous and add
-   * up to 2G then the FreeListManager may unify them together into a single Chunk and our 32-bit chunkSize
-   * field will overflow. This code needs to detect this and just create a chunk of 2G and then start
-   * a new one.
-   * Or to prevent it from happening we could just check the incoming slabs and throw away a few bytes
-   * to keep them from being contiguous.
    */
   boolean defragment(int chunkSize) {
     final long startDefragmentationTime = this.ma.getStats().startDefragmentation();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/44f403d9/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapStoredObject.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapStoredObject.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapStoredObject.java
index 9861a54..c2066b4 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapStoredObject.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapStoredObject.java
@@ -165,7 +165,6 @@ import com.gemstone.gemfire.internal.offheap.annotations.Unretained;
       // Hopefully the jvm is smart enough to use our stack for this short lived array.
       final byte[] dataCache1 = new byte[1024];
       final byte[] dataCache2 = new byte[dataCache1.length];
-      // TODO OFFHEAP: no need to copy to heap. Just get the address of each and compare each byte. No need to call incReads when reading from address.
       int i;
       // inc it twice since we are reading two different objects
       MemoryAllocatorImpl.getAllocator().getStats().incReads();
@@ -202,7 +201,6 @@ import com.gemstone.gemfire.internal.offheap.annotations.Unretained;
       }
       // We want to be able to do this operation without copying any of the data into the heap.
       // Hopefully the jvm is smart enough to use our stack for this short lived array.
-      // TODO OFFHEAP: no need to copy to heap. Just get the address of each and compare each byte. No need to call incReads when reading from address.
       final byte[] dataCache = new byte[1024];
       int idx=0;
       int i;
@@ -421,7 +419,6 @@ import com.gemstone.gemfire.internal.offheap.annotations.Unretained;
     }
     protected byte[] getRawBytes() {
       byte[] result = getCompressedBytes();
-      // TODO OFFHEAP: change the following to assert !isCompressed();
       if (isCompressed()) {
         throw new UnsupportedOperationException();
       }
@@ -441,10 +438,7 @@ import com.gemstone.gemfire.internal.offheap.annotations.Unretained;
     @Override
     public Object getDeserializedValue(Region r, RegionEntry re) {
       if (isSerialized()) {
-        // TODO OFFHEAP: debug deserializeChunk
         return EntryEventImpl.deserialize(getRawBytes());
-        //assert !isCompressed();
-        //return EntryEventImpl.deserializeChunk(this);
       } else {
         return getRawBytes();
       }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/44f403d9/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/TinyStoredObject.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/TinyStoredObject.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/TinyStoredObject.java
index e8878fa..aee1b15 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/TinyStoredObject.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/TinyStoredObject.java
@@ -160,7 +160,6 @@ public class TinyStoredObject extends AbstractStoredObject {
 
   @Override
   public byte readDataByte(int offset) {
-    // TODO OFFHEAP: what if the data is compressed?
     return getRawBytes()[offset];
   }
 
@@ -181,7 +180,6 @@ public class TinyStoredObject extends AbstractStoredObject {
 
   @Override
   public void readDataBytes(int offset, byte[] bytes, int bytesOffset, int size) {
-    // TODO OFFHEAP: what if the data is compressed?
     byte[] src = getRawBytes();
     int dstIdx = bytesOffset;
     for (int i = offset; i < offset+size; i++) {
@@ -206,13 +204,11 @@ public class TinyStoredObject extends AbstractStoredObject {
 
   @Override
   public boolean checkDataEquals(StoredObject so) {
-    // TODO OFFHEAP: what if the data is compressed?
     return equals(so);
   }
 
   @Override
   public boolean checkDataEquals(byte[] serializedObj) {
-    // TODO OFFHEAP: what if the data is compressed?
     byte[] myBytes = getSerializedValue();
     return Arrays.equals(myBytes, serializedObj);
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/44f403d9/geode-core/src/main/java/com/gemstone/gemfire/internal/tcp/MsgStreamer.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/tcp/MsgStreamer.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/tcp/MsgStreamer.java
index 9fb2eb8..d3941bc 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/tcp/MsgStreamer.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/tcp/MsgStreamer.java
@@ -64,12 +64,6 @@ public class MsgStreamer extends OutputStream implements
    * Any exceptions that happen during sends
    */
   private ConnectExceptions ce;
-  // TODO OFFHEAP: instead of MsgStreamer extending OutputStream
-  // we could have it extends HeapDataOutputStream.
-  // HDOS can now be given a direct ByteBuffer and told
-  // to not copy large byte sequences it is given.
-  // Also be it being a HDOS we can take advantage of code
-  // that is already optimized to pass Chunk direct ByteBuffers.
   /**
    * The byte buffer we used for preparing a chunk of the message.
    * Currently this buffer is obtained from the connection.
@@ -408,10 +402,6 @@ public class MsgStreamer extends OutputStream implements
       return;
     }
     int len = bb.remaining();
-    // TODO OFFHEAP: if len > remainingSpace and isOverflowMode() then
-    // (and the overflow HDOS has doNotCopy set?) it is probably better to not copy part of
-    // bb to this.buffer and then add the remainder of it to the HDOS. Instead
-    // we can just add the whole bb to the HDOS.
     while (len > 0) {
       int remainingSpace = this.buffer.capacity() - this.buffer.position();
       if (remainingSpace == 0) {
@@ -938,7 +928,6 @@ public class MsgStreamer extends OutputStream implements
    * will all fit into our current buffer.
    */
   public final void writeAsSerializedByteArray(Object v) throws IOException {
-    // TODO OFFHEAP: update this class to take into account the "noCopy" mode added to HDOS and that we might be adding direct ByteBuffers to this.
     if (v instanceof HeapDataOutputStream) {
       HeapDataOutputStream other = (HeapDataOutputStream)v;
       InternalDataSerializer.writeArrayLength(other.size(), this);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/44f403d9/geode-core/src/main/java/com/gemstone/gemfire/pdx/internal/PdxReaderImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/pdx/internal/PdxReaderImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/pdx/internal/PdxReaderImpl.java
index f4b133c..6771117 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/pdx/internal/PdxReaderImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/pdx/internal/PdxReaderImpl.java
@@ -889,9 +889,6 @@ public class PdxReaderImpl implements InternalPdxReader, java.io.Serializable {
       bytes = buffer.array();
     }
     else{
-      // TODO OFFHEAP: this is going to break once we have a ByteSource that is offheap.
-      // Should we just copy the offheap ByteSource to a heap byte[] here or change
-      // PdxString to work with a ByteSource?
       throw new IllegalStateException();
     }
     int offset = getPositionForField(ft) + buffer.arrayOffset();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/44f403d9/geode-core/src/test/java/com/gemstone/gemfire/cache/operations/internal/GetOperationContextImplJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/operations/internal/GetOperationContextImplJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/operations/internal/GetOperationContextImplJUnitTest.java
index 8efec6e..00aa506 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/operations/internal/GetOperationContextImplJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/operations/internal/GetOperationContextImplJUnitTest.java
@@ -287,5 +287,4 @@ public class GetOperationContextImplJUnitTest {
       }
     }
   }
-  // @TODO OFFHEAP: add coverage of "release" and the gettors methods with StoreObject and off-heap Chunk values
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/44f403d9/geode-cq/src/main/java/com/gemstone/gemfire/cache/query/internal/cq/CqServiceImpl.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/main/java/com/gemstone/gemfire/cache/query/internal/cq/CqServiceImpl.java b/geode-cq/src/main/java/com/gemstone/gemfire/cache/query/internal/cq/CqServiceImpl.java
index 05e062c..9188e56 100644
--- a/geode-cq/src/main/java/com/gemstone/gemfire/cache/query/internal/cq/CqServiceImpl.java
+++ b/geode-cq/src/main/java/com/gemstone/gemfire/cache/query/internal/cq/CqServiceImpl.java
@@ -1398,7 +1398,7 @@ public final class CqServiceImpl implements CqService  {
       
       // Get new value. If its not retrieved.
       if (cqUnfilteredEventsSet_newValue.isEmpty() && (event.getOperation().isCreate() ||  event.getOperation().isUpdate())) {
-        Object newValue = entryEvent.getNewValue(); // TODO OFFHEAP: optimize by not copying the value on to the heap
+        Object newValue = entryEvent.getNewValue();
         if (newValue != null) {
           //We have a new value to run the query on
           cqUnfilteredEventsSet_newValue.add(newValue);


[2/2] incubator-geode git commit: GEODE-1304: remove TODO OFFHEAP comments

Posted by ds...@apache.org.
GEODE-1304: remove TODO OFFHEAP comments

Tickets have been filed with the information from the removed comments.

This checkin does change LocalRegion validatedCreate/Put/Destroy
to no longer do an offheap release; instead the calling method does.


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

Branch: refs/heads/develop
Commit: 44f403d9df7964767ed86d70383d87435ece94c6
Parents: 9fbcb93
Author: Darrel Schneider <ds...@pivotal.io>
Authored: Mon Apr 25 15:23:28 2016 -0700
Committer: Darrel Schneider <ds...@pivotal.io>
Committed: Tue Apr 26 10:12:33 2016 -0700

----------------------------------------------------------------------
 .../query/internal/index/DummyQRegion.java      |  3 --
 .../cache/query/internal/index/HashIndex.java   |  1 -
 .../query/internal/index/IndexManager.java      |  8 ---
 .../gemfire/internal/HeapDataOutputStream.java  |  3 --
 .../internal/cache/AbstractRegionEntry.java     |  6 +--
 .../gemfire/internal/cache/BucketRegion.java    |  3 +-
 .../internal/cache/BucketRegionQueue.java       |  4 +-
 .../gemfire/internal/cache/DiskEntry.java       |  1 -
 .../cache/DistributedCacheOperation.java        |  4 +-
 .../gemfire/internal/cache/EntryEventImpl.java  | 24 +--------
 .../gemfire/internal/cache/LocalRegion.java     | 52 ++++++++------------
 .../gemstone/gemfire/internal/cache/Oplog.java  |  1 -
 .../gemfire/internal/cache/OverflowOplog.java   |  1 -
 .../internal/cache/RemoteDestroyMessage.java    |  2 +-
 .../internal/cache/RemotePutMessage.java        |  2 +-
 .../gemfire/internal/cache/TXEntryState.java    | 14 ------
 .../gemfire/internal/cache/UpdateOperation.java |  3 --
 .../cache/VMStatsDiskLRURegionEntryHeap.java    |  2 +-
 .../cache/VMStatsDiskLRURegionEntryOffHeap.java |  2 +-
 .../cache/VMStatsDiskRegionEntryHeap.java       |  2 +-
 .../cache/VMStatsDiskRegionEntryOffHeap.java    |  2 +-
 .../cache/VMStatsLRURegionEntryHeap.java        |  2 +-
 .../cache/VMStatsLRURegionEntryOffHeap.java     |  2 +-
 .../internal/cache/VMStatsRegionEntryHeap.java  |  2 +-
 .../cache/VMStatsRegionEntryOffHeap.java        |  2 +-
 .../cache/VMThinDiskLRURegionEntryHeap.java     |  2 +-
 .../cache/VMThinDiskLRURegionEntryOffHeap.java  |  2 +-
 .../cache/VMThinDiskRegionEntryHeap.java        |  2 +-
 .../cache/VMThinDiskRegionEntryOffHeap.java     |  2 +-
 .../cache/VMThinLRURegionEntryHeap.java         |  2 +-
 .../cache/VMThinLRURegionEntryOffHeap.java      |  2 +-
 .../internal/cache/VMThinRegionEntryHeap.java   |  2 +-
 .../cache/VMThinRegionEntryOffHeap.java         |  2 +-
 .../VersionedStatsDiskLRURegionEntryHeap.java   |  2 +-
 ...VersionedStatsDiskLRURegionEntryOffHeap.java |  2 +-
 .../VersionedStatsDiskRegionEntryHeap.java      |  2 +-
 .../VersionedStatsDiskRegionEntryOffHeap.java   |  2 +-
 .../cache/VersionedStatsLRURegionEntryHeap.java |  2 +-
 .../VersionedStatsLRURegionEntryOffHeap.java    |  2 +-
 .../cache/VersionedStatsRegionEntryHeap.java    |  2 +-
 .../cache/VersionedStatsRegionEntryOffHeap.java |  2 +-
 .../VersionedThinDiskLRURegionEntryHeap.java    |  2 +-
 .../VersionedThinDiskLRURegionEntryOffHeap.java |  2 +-
 .../cache/VersionedThinDiskRegionEntryHeap.java |  2 +-
 .../VersionedThinDiskRegionEntryOffHeap.java    |  2 +-
 .../cache/VersionedThinLRURegionEntryHeap.java  |  2 +-
 .../VersionedThinLRURegionEntryOffHeap.java     |  2 +-
 .../cache/VersionedThinRegionEntryHeap.java     |  2 +-
 .../cache/VersionedThinRegionEntryOffHeap.java  |  2 +-
 .../cache/control/InternalResourceManager.java  | 10 ----
 .../cache/partitioned/DestroyMessage.java       |  2 +-
 .../internal/cache/partitioned/PutMessage.java  |  3 +-
 .../cache/tier/sockets/BaseCommand.java         |  3 --
 .../internal/cache/tier/sockets/Message.java    | 16 ------
 .../cache/tier/sockets/command/Destroy65.java   |  2 +-
 .../cache/tier/sockets/command/Get70.java       |  1 -
 .../cache/tier/sockets/command/Request.java     |  2 -
 .../cache/wan/GatewaySenderEventImpl.java       |  5 --
 .../parallel/ParallelGatewaySenderQueue.java    |  1 -
 .../internal/offheap/AbstractStoredObject.java  |  1 -
 .../internal/offheap/FreeListManager.java       |  7 ---
 .../internal/offheap/OffHeapStoredObject.java   |  6 ---
 .../internal/offheap/TinyStoredObject.java      |  4 --
 .../gemfire/internal/tcp/MsgStreamer.java       | 11 -----
 .../gemfire/pdx/internal/PdxReaderImpl.java     |  3 --
 .../GetOperationContextImplJUnitTest.java       |  1 -
 .../cache/query/internal/cq/CqServiceImpl.java  |  2 +-
 67 files changed, 65 insertions(+), 211 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/44f403d9/geode-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/DummyQRegion.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/DummyQRegion.java b/geode-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/DummyQRegion.java
index 35005f9..aae26fd 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/DummyQRegion.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/DummyQRegion.java
@@ -136,7 +136,6 @@ public class DummyQRegion extends QRegion {
     if (val instanceof StoredObject) {
       @Retained @Released StoredObject ohval = (StoredObject) val;
       try {
-        // TODO OFFHEAP: val may be off-heap PdxInstance
         val = ohval.getDeserializedValue(getRegion(), this.entry);
       } finally {
         ohval.release();
@@ -157,7 +156,6 @@ public class DummyQRegion extends QRegion {
     if (val instanceof StoredObject) {      
       @Retained @Released StoredObject ohval = (StoredObject) val;
       try {
-        // TODO OFFHEAP: val may be off-heap PdxInstance
         val = ohval.getDeserializedValue(getRegion(), this.entry);
       } finally {
         ohval.release();
@@ -180,7 +178,6 @@ public class DummyQRegion extends QRegion {
     if (val instanceof StoredObject) {
       @Retained @Released StoredObject ohval = (StoredObject) val;
       try {
-        // TODO OFFHEAP: val may be off-heap PdxInstance
         val = ohval.getDeserializedValue(getRegion(), this.entry);
       } finally {
         ohval.release();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/44f403d9/geode-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/HashIndex.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/HashIndex.java b/geode-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/HashIndex.java
index f8a1b8d..d28b166 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/HashIndex.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/HashIndex.java
@@ -871,7 +871,6 @@ public class HashIndex extends AbstractIndex {
     return ((LocalRegion) getRegion()).new NonTXEntry(entry);
   }
   
-  // TODO OFFHEAP: may return PdxInstance
   private Object getTargetObjectForUpdate(RegionEntry entry) {
     if (this.indexOnValues) {
       Object o = entry.getValueOffHeapOrDiskWithoutFaultIn((LocalRegion) getRegion());

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/44f403d9/geode-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/IndexManager.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/IndexManager.java b/geode-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/IndexManager.java
index a284810..0e29178 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/IndexManager.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/IndexManager.java
@@ -930,14 +930,6 @@ public class IndexManager  {
         // Fault in the value once before index update so that every index
         // update does not have
         // to read the value from disk every time.
-        // TODO OFFHEAP: this optimization (calling getValue to make sure it is faulted in to disk) has a performance problem.
-        // It also decompresses and deserializes the value and then throws that away. In the case of a heap region the deserialized
-        // value would be cached in a VMCachedDeserializable. But for compression and/or off-heap the decompression and/or deserialization
-        // this call does is lost and has to be done again. We could just add a method to RegionEntry that faults the value in without returning it.
-        // Even better (but more work): could we create a wrapper around RegionEntry that we create here to wrap "entry" and pass the wrapper to addIndexMapping?
-        // Any indexes that store a reference to the RegionEntry would need to ask the wrapper for the real one but any of them
-        // that want the value could get it from the wrapper. The first time the wrapper is asked for the value it could get it from
-        // the real RegionEntry it wraps and cache a reference to that value. I think that gives us the best of both worlds.
         entry.getValue((LocalRegion)this.region);
         Iterator<Index> indexSetIterator = indexSet.iterator();
         while(indexSetIterator.hasNext()) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/44f403d9/geode-core/src/main/java/com/gemstone/gemfire/internal/HeapDataOutputStream.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/HeapDataOutputStream.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/HeapDataOutputStream.java
index bfbf449..20d01da 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/HeapDataOutputStream.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/HeapDataOutputStream.java
@@ -501,9 +501,6 @@ public class HeapDataOutputStream extends OutputStream implements
     if (size() == 0) {
       return;
     }
-    // TODO OFFHEAP: this code end up calling chan.write at least once for each DirectByteBuffer in this HDOS.
-    // It will combine consecutive heap ByteBuffers into a write call.
-    // It would be better to do one chan.write call with an array of ByteBuffers like sendTo(SocketChannel) does.
     out.clear();
     if (this.chunks != null) {
       for (ByteBuffer bb: this.chunks) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/44f403d9/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegionEntry.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegionEntry.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegionEntry.java
index debc3da..b936e3f 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegionEntry.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegionEntry.java
@@ -565,7 +565,7 @@ public abstract class AbstractRegionEntry implements RegionEntry,
     if (v == null) { // should only be possible if disk entry
       v = Token.NOT_AVAILABLE;
     }
-    @Retained Object result = OffHeapHelper.copyAndReleaseIfNeeded(v); // TODO OFFHEAP keep it offheap?
+    @Retained Object result = OffHeapHelper.copyAndReleaseIfNeeded(v);
     ReferenceCountHelper.setReferenceCountOwner(null);
     return result;
   }
@@ -1290,7 +1290,6 @@ public abstract class AbstractRegionEntry implements RegionEntry,
           }
         }
         // else it is DataAsAddress. This code just returns it as prepared.
-        // TODO OFFHEAP: Review the callers to see if they will handle DataAsAddress correctly.
       } else {
         byte[] data;
         boolean isSerialized = !(val instanceof byte[]);
@@ -1299,17 +1298,14 @@ public abstract class AbstractRegionEntry implements RegionEntry,
             data = event.getCachedSerializedNewValue();
           } else if (val instanceof CachedDeserializable) {
             data = ((CachedDeserializable)val).getSerializedValue();
-            // TODO OFFHEAP: cache data in event?
           } else if (val instanceof PdxInstance) {
             try {
               data = ((ConvertableToBytes)val).toBytes();
-              // TODO OFFHEAP: cache data in event?
             } catch (IOException e) {
               throw new PdxSerializationException("Could not convert " + val + " to bytes", e);
             }
           } else {
             data = EntryEventImpl.serialize(val);
-            // TODO OFFHEAP: cache data in event?
           }
         } else {
           data = (byte[]) val;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/44f403d9/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/BucketRegion.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/BucketRegion.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/BucketRegion.java
index e0f043b..6e4f426 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/BucketRegion.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/BucketRegion.java
@@ -1470,7 +1470,7 @@ implements Bucket
     Object v = null;
     
     try {
-      v =re.getValue(this);  // TODO OFFHEAP: todo v ends up in a RawValue. For now this can be a copy of the offheap onto the heap. But it might be easy to track lifetime of RawValue
+      v =re.getValue(this);
       if(doNotLockEntry) {
         if(v == Token.NOT_AVAILABLE || v == null) {
           return REQUIRES_ENTRY_LOCK;
@@ -1531,7 +1531,6 @@ implements Bucket
           if(doNotLockEntry) {
             return REQUIRES_ENTRY_LOCK;
           }
-          // TODO OFFHEAP: optimze
           Object value = nonTxnFindObject(keyInfo, isCreate,
               generateCallbacks, result.getRawValue(), true, true, requestingClient, clientEvent, false, allowReadFromHDFS);
           if (value != null) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/44f403d9/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/BucketRegionQueue.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/BucketRegionQueue.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/BucketRegionQueue.java
index 8b4f240..0facd93 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/BucketRegionQueue.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/BucketRegionQueue.java
@@ -479,7 +479,7 @@ public class BucketRegionQueue extends AbstractBucketRegionQueue {
   public Object take() throws InterruptedException, ForceReattemptException {
     throw new UnsupportedOperationException();
     // Currently has no callers.
-    // To support this callers need to call freeOffHeapResources on the returned GatewaySenderEventImpl.
+    // To support this callers need to call release on the returned GatewaySenderEventImpl.
 //     Object key = this.eventSeqNumQueue.remove();
 //     Object object = null;
 //     if (key != null) {
@@ -492,7 +492,7 @@ public class BucketRegionQueue extends AbstractBucketRegionQueue {
 //        */
 //       destroyKey(key);
 //     }
-//     return object; // TODO OFFHEAP: see what callers do with the returned GatewaySenderEventImpl. We need to inc its refcount before we do the destroyKey.
+//     return object;
   }
   
   /**

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/44f403d9/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DiskEntry.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DiskEntry.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DiskEntry.java
index 575e140..54ecb04 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DiskEntry.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DiskEntry.java
@@ -848,7 +848,6 @@ public interface DiskEntry extends RegionEntry {
           return createValueWrapper(rawValue, event);
         }
       }
-      // TODO OFFHEAP: No need to retain since we hold the sync on entry but we need a flavor of _getValue that will decompress
       @Retained Object value = entry._getValueRetain(region, true);
       try {
         return createValueWrapper(value, event);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/44f403d9/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DistributedCacheOperation.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DistributedCacheOperation.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DistributedCacheOperation.java
index 063f823..a6d2488 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DistributedCacheOperation.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DistributedCacheOperation.java
@@ -128,8 +128,6 @@ public abstract class DistributedCacheOperation {
         assert !so.isSerialized();
         so.sendAsByteArray(out);
       } else { // LAZY
-        // TODO OFFHEAP MERGE: cache the oldValue that is serialized here
-        // into the event
         DataSerializer.writeObjectAsByteArray(vObj, out);
       }
     } else {
@@ -529,7 +527,7 @@ public abstract class DistributedCacheOperation {
 
         // distribute to members needing the old value now
         if (needsOldValueInCacheOp.size() > 0) {
-          msg.appendOldValueToMessage((EntryEventImpl)this.event); // TODO OFFHEAP optimize
+          msg.appendOldValueToMessage((EntryEventImpl)this.event);
           msg.resetRecipients();
           msg.setRecipients(needsOldValueInCacheOp);
           Set newFailures = mgr.putOutgoing(msg);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/44f403d9/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/EntryEventImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/EntryEventImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/EntryEventImpl.java
index e3458e7..2b826ce 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/EntryEventImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/EntryEventImpl.java
@@ -799,7 +799,6 @@ public class EntryEventImpl
       }
       boolean doCopyOnRead = getRegion().isCopyOnRead();
       if (ov != null) {
-        // TODO OFFHEAP: returns off-heap PdxInstance
         if (ov instanceof CachedDeserializable) {
           CachedDeserializable cd = (CachedDeserializable)ov;
           if (doCopyOnRead) {
@@ -827,7 +826,7 @@ public class EntryEventImpl
   /**
    * Like getRawNewValue except that if the result is an off-heap reference then copy it to the heap.
    * ALERT: If there is a Delta, returns that, not the (applied) new value.
-   * TODO OFFHEAP: to prevent the heap copy use getRawNewValue instead
+   * Note: to prevent the heap copy use getRawNewValue instead
    */
   public final Object getRawNewValueAsHeapObject() {
     if (this.delta != null) {
@@ -1071,8 +1070,6 @@ public class EntryEventImpl
         // I'm not sure this can even happen
         return AbstractRegion.handleNotAvailable(nv);
       }
-      // TODO OFFHEAP currently we copy offheap new value to the heap here. Check callers of this method to see if they can be optimized to use offheap values.
-      // TODO OFFHEAP: returns off-heap PdxInstance
       if (nv instanceof CachedDeserializable) {
         CachedDeserializable cd = (CachedDeserializable)nv;
         Object v = null;
@@ -1247,7 +1244,6 @@ public class EntryEventImpl
     if (tmp instanceof CachedDeserializable) {
       CachedDeserializable cd = (CachedDeserializable) tmp;
       if (!cd.isSerialized()) {
-        // TODO OFFHEAP can we handle offheap byte[] better?
         return null;
       }
       byte[] bytes = this.newValueBytes;
@@ -1329,7 +1325,6 @@ public class EntryEventImpl
               setCachedSerializedNewValue(bytes);
             }
           } else {
-            // TODO OFFHEAP: returns off-heap PdxInstance which is not ok since isUnretainedNewReferenceOk returned false
             importer.importNewObject(so.getValueAsDeserializedHeapObject(), true);
           }
         }
@@ -1411,7 +1406,6 @@ public class EntryEventImpl
           if (!isSerialized || prefersSerialized) {
             importer.importOldBytes(so.getValueAsHeapByteArray(), isSerialized);
           } else {
-            // TODO OFFHEAP: returns off-heap PdxInstance which is not ok since isUnretainedNewReferenceOk returned false
            importer.importOldObject(so.getValueAsDeserializedHeapObject(), true);
           }
         }
@@ -2019,7 +2013,7 @@ public class EntryEventImpl
     if (this.op != Operation.LOCAL_INVALIDATE
         && this.op != Operation.LOCAL_DESTROY) {
       // fix for bug 34387
-      tx.setPendingValue(OffHeapHelper.copyIfNeeded(v)); // TODO OFFHEAP optimize
+      tx.setPendingValue(OffHeapHelper.copyIfNeeded(v));
     }
     tx.setCallbackArgument(getCallbackArgument());
   }
@@ -2462,7 +2456,6 @@ public class EntryEventImpl
     if (tmp instanceof CachedDeserializable) {
       CachedDeserializable cd = (CachedDeserializable) tmp;
       if (!cd.isSerialized()) {
-        // TODO OFFHEAP can we handle offheap byte[] better?
         return null;
       }
       return new SerializedCacheValueImpl(this, this.region, this.re, cd, this.oldValueBytes);
@@ -2851,16 +2844,13 @@ public class EntryEventImpl
       return getDeserializedValue(this.r, this.re);
     }
     public Object getDeserializedForReading() {
-      // TODO OFFHEAP: returns off-heap PdxInstance
       return OffHeapHelper.getHeapForm(getCd().getDeserializedForReading());
     }
     public Object getDeserializedWritableCopy(Region rgn, RegionEntry entry) {
-      // TODO OFFHEAP: returns off-heap PdxInstance
       return OffHeapHelper.getHeapForm(getCd().getDeserializedWritableCopy(rgn, entry));
     }
 
     public Object getDeserializedValue(Region rgn, RegionEntry reentry) {
-      // TODO OFFHEAP: returns off-heap PdxInstance
       return OffHeapHelper.getHeapForm(getCd().getDeserializedValue(rgn, reentry));
     }
     public Object getValue() {
@@ -2998,16 +2988,6 @@ public class EntryEventImpl
     // Note that this method does not set the old/new values to null but
     // leaves them set to the off-heap value so that future calls to getOld/NewValue
     // will fail with an exception.
-//    LocalRegion lr = getLocalRegion();
-//    if (lr != null) {
-//      if (lr.isCacheClosing()) {
-//        // to fix races during closing and recreating cache (see bug 47883) don't bother
-//        // trying to decrement reference counts if we are closing the cache.
-//        // TODO OFFHEAP: this will cause problems once offheap lives longer than a cache.
-//        this.offHeapOk = false;
-//        return;
-//      }
-//    }
     Object ov = basicGetOldValue();
     Object nv = basicGetNewValue();
     this.offHeapOk = false;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/44f403d9/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 4360b2a..c32a7d2 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
@@ -1121,14 +1121,16 @@ public class LocalRegion extends AbstractRegion
       throws TimeoutException, EntryExistsException, CacheWriterException {
     long startPut = CachePerfStats.getStatTime();
     @Released EntryEventImpl event = newCreateEntryEvent(key, value, aCallbackArgument);
-    validatedCreate(event, startPut);
-    // TODO OFFHEAP: validatedCreate calls release
+    try {
+      validatedCreate(event, startPut);
+    } finally {
+      event.release();
+    }
   }
 
-  public final void validatedCreate(@Released EntryEventImpl event, long startPut)
+  public final void validatedCreate(EntryEventImpl event, long startPut)
       throws TimeoutException, EntryExistsException, CacheWriterException {
 
-    try {
       if (event.getEventId() == null && generateEventID()) {
         event.setNewEventId(cache.getDistributedSystem());
       }
@@ -1152,9 +1154,6 @@ public class LocalRegion extends AbstractRegion
           getCachePerfStats().endPut(startPut, false);
         }
       }
-    } finally {
-      event.release();
-    }
   }
 
   // split into a separate newCreateEntryEvent since SQLFabric may need to
@@ -1192,18 +1191,20 @@ public class LocalRegion extends AbstractRegion
   public final Object destroy(Object key, Object aCallbackArgument)
       throws TimeoutException, EntryNotFoundException, CacheWriterException {
     @Released EntryEventImpl event = newDestroyEntryEvent(key, aCallbackArgument);
-    return validatedDestroy(key, event);
-    // TODO OFFHEAP: validatedDestroy calls release
+    try {
+      return validatedDestroy(key, event);
+    } finally {
+      event.release();
+    }
   }
 
   /**
    * Destroys entry without performing validations. Call this after validating
    * key, callback arg, and runtime state.
    */
-  public Object validatedDestroy(Object key, @Released EntryEventImpl event)
+  public Object validatedDestroy(Object key, EntryEventImpl event)
       throws TimeoutException, EntryNotFoundException, CacheWriterException
  {
-    try {
       if (event.getEventId() == null && generateEventID()) {
         event.setNewEventId(cache.getDistributedSystem());
       }
@@ -1214,9 +1215,6 @@ public class LocalRegion extends AbstractRegion
       } else {
         return handleNotAvailable(event.getOldValue());
       }
-    } finally {
-      event.release();
-    }
   }
 
   // split into a separate newDestroyEntryEvent since SQLFabric may need to
@@ -1420,8 +1418,7 @@ public class LocalRegion extends AbstractRegion
   public Object getRetained(Object key, Object aCallbackArgument,
       boolean generateCallbacks, boolean disableCopyOnRead,
       ClientProxyMembershipID requestingClient, EntryEventImpl clientEvent, boolean returnTombstones, boolean opScopeIsLocal) throws TimeoutException, CacheLoaderException {
-    // TODO OFFHEAP: the last parameter "retainResult" should be true for getRetained. Need to look into what it is being set to false.
-    return get(key, aCallbackArgument, generateCallbacks, disableCopyOnRead, true, requestingClient, clientEvent, returnTombstones, opScopeIsLocal, true, false);
+    return get(key, aCallbackArgument, generateCallbacks, disableCopyOnRead, true, requestingClient, clientEvent, returnTombstones, opScopeIsLocal, true, false/* see GEODE-1291*/);
   }
   /**
    * @param opScopeIsLocal if true then just check local storage for a value; if false then try to find the value if it is not local
@@ -1460,7 +1457,6 @@ public class LocalRegion extends AbstractRegion
                 || hasServerProxy()
                 || basicGetLoader() != null)) { 
           // serialize search/load threads if not in txn
-          // TODO OFFHEAP OPTIMIZE: findObject can be enhanced to use the retainResult flag
           value = getDataView().findObject(keyInfo,
               this, isCreate, generateCallbacks, value, disableCopyOnRead,
               preferCD, requestingClient, clientEvent, returnTombstones, false/*allowReadFromHDFS*/);
@@ -1733,17 +1729,16 @@ public class LocalRegion extends AbstractRegion
       throws TimeoutException, CacheWriterException {
     long startPut = CachePerfStats.getStatTime();
     @Released EntryEventImpl event = newUpdateEntryEvent(key, value, aCallbackArgument);
-     //Since Sqlfire directly calls validatedPut, the freeing is done in
-    // validatedPut
-     return validatedPut(event, startPut);
-     // TODO OFFHEAP: validatedPut calls release
-    
+    try {
+      return validatedPut(event, startPut);
+    } finally {
+      event.release();
+    }
   }
 
-  public final Object validatedPut(@Released EntryEventImpl event, long startPut)
+  public final Object validatedPut(EntryEventImpl event, long startPut)
       throws TimeoutException, CacheWriterException {
 
-    try {
       if (event.getEventId() == null && generateEventID()) {
         event.setNewEventId(cache.getDistributedSystem());
       }
@@ -1770,9 +1765,6 @@ public class LocalRegion extends AbstractRegion
         }
       }
       return handleNotAvailable(oldValue);
-    } finally {
-      event.release();
-    }
   }
 
   // split into a separate newUpdateEntryEvent since SQLFabric may need to
@@ -3284,7 +3276,6 @@ public class LocalRegion extends AbstractRegion
         Object key = event.getKey();
         Object value = event.getRawNewValue();
         // serverPut is called by cacheWriteBeforePut so the new value will not yet be off-heap
-        // TODO OFFHEAP: verify that the above assertion is true
         Object callbackArg = event.getRawCallbackArgument();
         boolean isCreate = event.isCreate(); 
         Object result = mySRP.put(key, value, event.getDeltaBytes(), event,
@@ -7785,10 +7776,7 @@ public class LocalRegion extends AbstractRegion
    */
   void cleanupFailedInitialization()
   {
-    // mark as destroyed
-    // TODO OFFHEAP MERGE: to fix 49905 asif commented out isDestroyed being set.
-    // But in xd it was set after closeEntries was called.
-    // Here it is set before and it fixed 49555.
+    // mark as destroyed fixes 49555.
     this.isDestroyed = true;
     // after isDestroyed is set to true call removeResourceListener to fix bug 49555
     this.cache.getResourceManager(false).removeResourceListener(this);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/44f403d9/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 affddd1..fe8813e 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
@@ -4308,7 +4308,6 @@ public final class Oplog implements CompactableOplog, Flushable {
     byte userBits = 0;
     long oplogOffset = did.getOffsetInOplog();
     ReferenceCountHelper.skipRefCountTracking();
-    // TODO OFFHEAP: no need to retain. We just use it while we have the RegionEntry synced.
     @Retained @Released Object value = entry._getValueRetain(dr, true);
     ReferenceCountHelper.unskipRefCountTracking();
     // TODO:KIRK:OK Object value = entry.getValueWithContext(dr);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/44f403d9/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/OverflowOplog.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/OverflowOplog.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/OverflowOplog.java
index 2368b4f..600f790 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/OverflowOplog.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/OverflowOplog.java
@@ -1465,7 +1465,6 @@ class OverflowOplog implements CompactableOplog, Flushable {
     long oplogOffset = did.getOffsetInOplog();
     boolean foundData = false;
     if (entry.isValueNull()) {
-      // TODO OFFHEAP: optimize BytesAndBitsForCompactor to be able to have off-heap value reference instead of copying
       // Asif: If the mode is synch it is guaranteed to be present in the disk
       foundData = basicGetForCompactor(oplogOffset, false,
                                        did.getValueLength(),

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/44f403d9/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 750953a..bb97d9c 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
@@ -113,7 +113,7 @@ public class RemoteDestroyMessage extends RemoteOperationMessageWithDirectReply
   private boolean oldValueIsSerialized = false;
   
   /** expectedOldValue used for PartitionedRegion#remove(key, value) */
-  private Object expectedOldValue; // TODO OFFHEAP make it a cd
+  private Object expectedOldValue;
   
   private byte[] oldValBytes;
   

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/44f403d9/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 3fccc9a..27f2bb9 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
@@ -170,7 +170,7 @@ public final class RemotePutMessage extends RemoteOperationMessageWithDirectRepl
    * expectedOldValue.
    * @see PartitionedRegion#replace(Object, Object, Object)
    */
-  private Object expectedOldValue; // TODO OFFHEAP make it a cd
+  private Object expectedOldValue;
   
   private VersionTag versionTag;
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/44f403d9/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/TXEntryState.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/TXEntryState.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/TXEntryState.java
index a4c6004..b6686d4 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/TXEntryState.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/TXEntryState.java
@@ -1122,20 +1122,6 @@ public class TXEntryState implements Releasable
     }
   }
   
-
-  /* TODO OFFHEAP MERGE: is this code needed?
-  @Retained
-  protected final Object getRetainedValueInTXOrRegion() {
-    @Unretained Object val = this.getValueInTXOrRegion();
-    if (val instanceof Chunk) {
-      if (!((Chunk) val).retain()) {
-        throw new IllegalStateException("Could not retain OffHeap value=" + val);
-      }
-    }
-    return val;
-  }
-  */
-
   /**
    * Perform operation algebra
    * 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/44f403d9/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/UpdateOperation.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/UpdateOperation.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/UpdateOperation.java
index fc9c7ff..730d6d7 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/UpdateOperation.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/UpdateOperation.java
@@ -465,9 +465,6 @@ public class UpdateOperation extends AbstractUpdateOperation
         DataSerializer.writeByteArray(this.event.getDeltaBytes(), out);
         this.event.getRegion().getCachePerfStats().incDeltasSent();
       } else {
-          // TODO OFFHEAP MERGE: add a writeValue that will cache in the event like so:
-          //byte[] newValueBytes = BlobHelper.serializeToBlob(this.newValueObj);
-          //this.event.setCachedSerializedNewValue(newValueBytes);
         DistributedCacheOperation.writeValue(this.deserializationPolicy, this.newValueObj, this.newValue, out);
         if ((extraFlags & HAS_DELTA_WITH_FULL_VALUE) != 0) {
           DataSerializer.writeByteArray(this.event.getDeltaBytes(), out);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/44f403d9/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VMStatsDiskLRURegionEntryHeap.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VMStatsDiskLRURegionEntryHeap.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VMStatsDiskLRURegionEntryHeap.java
index dfbc880..cb8898d 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VMStatsDiskLRURegionEntryHeap.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VMStatsDiskLRURegionEntryHeap.java
@@ -55,7 +55,7 @@ public abstract class VMStatsDiskLRURegionEntryHeap extends VMStatsDiskLRURegion
 
     public final Class getEntryClass() {
       // The class returned from this method is used to estimate the memory size.
-      // TODO OFFHEAP: This estimate will not take into account the memory saved by inlining the keys.
+      // This estimate will not take into account the memory saved by inlining the keys.
       return VMStatsDiskLRURegionEntryHeapObjectKey.class;
     }
     public RegionEntryFactory makeVersioned() {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/44f403d9/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VMStatsDiskLRURegionEntryOffHeap.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VMStatsDiskLRURegionEntryOffHeap.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VMStatsDiskLRURegionEntryOffHeap.java
index 8ddab6c..e00bcb8 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VMStatsDiskLRURegionEntryOffHeap.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VMStatsDiskLRURegionEntryOffHeap.java
@@ -55,7 +55,7 @@ public abstract class VMStatsDiskLRURegionEntryOffHeap extends VMStatsDiskLRUReg
 
     public final Class getEntryClass() {
       // The class returned from this method is used to estimate the memory size.
-      // TODO OFFHEAP: This estimate will not take into account the memory saved by inlining the keys.
+      // This estimate will not take into account the memory saved by inlining the keys.
       return VMStatsDiskLRURegionEntryOffHeapObjectKey.class;
     }
     public RegionEntryFactory makeVersioned() {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/44f403d9/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VMStatsDiskRegionEntryHeap.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VMStatsDiskRegionEntryHeap.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VMStatsDiskRegionEntryHeap.java
index 517d594..879ffb0 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VMStatsDiskRegionEntryHeap.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VMStatsDiskRegionEntryHeap.java
@@ -55,7 +55,7 @@ public abstract class VMStatsDiskRegionEntryHeap extends VMStatsDiskRegionEntry
 
     public final Class getEntryClass() {
       // The class returned from this method is used to estimate the memory size.
-      // TODO OFFHEAP: This estimate will not take into account the memory saved by inlining the keys.
+      // This estimate will not take into account the memory saved by inlining the keys.
       return VMStatsDiskRegionEntryHeapObjectKey.class;
     }
     public RegionEntryFactory makeVersioned() {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/44f403d9/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VMStatsDiskRegionEntryOffHeap.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VMStatsDiskRegionEntryOffHeap.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VMStatsDiskRegionEntryOffHeap.java
index 260ef09..fcc6c1b 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VMStatsDiskRegionEntryOffHeap.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VMStatsDiskRegionEntryOffHeap.java
@@ -55,7 +55,7 @@ public abstract class VMStatsDiskRegionEntryOffHeap extends VMStatsDiskRegionEnt
 
     public final Class getEntryClass() {
       // The class returned from this method is used to estimate the memory size.
-      // TODO OFFHEAP: This estimate will not take into account the memory saved by inlining the keys.
+      // This estimate will not take into account the memory saved by inlining the keys.
       return VMStatsDiskRegionEntryOffHeapObjectKey.class;
     }
     public RegionEntryFactory makeVersioned() {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/44f403d9/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VMStatsLRURegionEntryHeap.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VMStatsLRURegionEntryHeap.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VMStatsLRURegionEntryHeap.java
index 41c9982..51d4ab1 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VMStatsLRURegionEntryHeap.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VMStatsLRURegionEntryHeap.java
@@ -55,7 +55,7 @@ public abstract class VMStatsLRURegionEntryHeap extends VMStatsLRURegionEntry {
 
     public final Class getEntryClass() {
       // The class returned from this method is used to estimate the memory size.
-      // TODO OFFHEAP: This estimate will not take into account the memory saved by inlining the keys.
+      // This estimate will not take into account the memory saved by inlining the keys.
       return VMStatsLRURegionEntryHeapObjectKey.class;
     }
     public RegionEntryFactory makeVersioned() {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/44f403d9/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VMStatsLRURegionEntryOffHeap.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VMStatsLRURegionEntryOffHeap.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VMStatsLRURegionEntryOffHeap.java
index 555be1b..e4081ef 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VMStatsLRURegionEntryOffHeap.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VMStatsLRURegionEntryOffHeap.java
@@ -55,7 +55,7 @@ public abstract class VMStatsLRURegionEntryOffHeap extends VMStatsLRURegionEntry
 
     public final Class getEntryClass() {
       // The class returned from this method is used to estimate the memory size.
-      // TODO OFFHEAP: This estimate will not take into account the memory saved by inlining the keys.
+      // This estimate will not take into account the memory saved by inlining the keys.
       return VMStatsLRURegionEntryOffHeapObjectKey.class;
     }
     public RegionEntryFactory makeVersioned() {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/44f403d9/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VMStatsRegionEntryHeap.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VMStatsRegionEntryHeap.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VMStatsRegionEntryHeap.java
index 1f68a4b..fbde0bf 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VMStatsRegionEntryHeap.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VMStatsRegionEntryHeap.java
@@ -55,7 +55,7 @@ public abstract class VMStatsRegionEntryHeap extends VMStatsRegionEntry {
 
     public final Class getEntryClass() {
       // The class returned from this method is used to estimate the memory size.
-      // TODO OFFHEAP: This estimate will not take into account the memory saved by inlining the keys.
+      // This estimate will not take into account the memory saved by inlining the keys.
       return VMStatsRegionEntryHeapObjectKey.class;
     }
     public RegionEntryFactory makeVersioned() {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/44f403d9/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VMStatsRegionEntryOffHeap.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VMStatsRegionEntryOffHeap.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VMStatsRegionEntryOffHeap.java
index cf97a05..1922889 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VMStatsRegionEntryOffHeap.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VMStatsRegionEntryOffHeap.java
@@ -55,7 +55,7 @@ public abstract class VMStatsRegionEntryOffHeap extends VMStatsRegionEntry imple
 
     public final Class getEntryClass() {
       // The class returned from this method is used to estimate the memory size.
-      // TODO OFFHEAP: This estimate will not take into account the memory saved by inlining the keys.
+      // This estimate will not take into account the memory saved by inlining the keys.
       return VMStatsRegionEntryOffHeapObjectKey.class;
     }
     public RegionEntryFactory makeVersioned() {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/44f403d9/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VMThinDiskLRURegionEntryHeap.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VMThinDiskLRURegionEntryHeap.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VMThinDiskLRURegionEntryHeap.java
index fc53257..b987de8 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VMThinDiskLRURegionEntryHeap.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VMThinDiskLRURegionEntryHeap.java
@@ -55,7 +55,7 @@ public abstract class VMThinDiskLRURegionEntryHeap extends VMThinDiskLRURegionEn
 
     public final Class getEntryClass() {
       // The class returned from this method is used to estimate the memory size.
-      // TODO OFFHEAP: This estimate will not take into account the memory saved by inlining the keys.
+      // This estimate will not take into account the memory saved by inlining the keys.
       return VMThinDiskLRURegionEntryHeapObjectKey.class;
     }
     public RegionEntryFactory makeVersioned() {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/44f403d9/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VMThinDiskLRURegionEntryOffHeap.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VMThinDiskLRURegionEntryOffHeap.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VMThinDiskLRURegionEntryOffHeap.java
index a9f1399..d735865 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VMThinDiskLRURegionEntryOffHeap.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VMThinDiskLRURegionEntryOffHeap.java
@@ -55,7 +55,7 @@ public abstract class VMThinDiskLRURegionEntryOffHeap extends VMThinDiskLRURegio
 
     public final Class getEntryClass() {
       // The class returned from this method is used to estimate the memory size.
-      // TODO OFFHEAP: This estimate will not take into account the memory saved by inlining the keys.
+      // This estimate will not take into account the memory saved by inlining the keys.
       return VMThinDiskLRURegionEntryOffHeapObjectKey.class;
     }
     public RegionEntryFactory makeVersioned() {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/44f403d9/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VMThinDiskRegionEntryHeap.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VMThinDiskRegionEntryHeap.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VMThinDiskRegionEntryHeap.java
index 4161f11..e656576 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VMThinDiskRegionEntryHeap.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VMThinDiskRegionEntryHeap.java
@@ -55,7 +55,7 @@ public abstract class VMThinDiskRegionEntryHeap extends VMThinDiskRegionEntry {
 
     public final Class getEntryClass() {
       // The class returned from this method is used to estimate the memory size.
-      // TODO OFFHEAP: This estimate will not take into account the memory saved by inlining the keys.
+      // This estimate will not take into account the memory saved by inlining the keys.
       return VMThinDiskRegionEntryHeapObjectKey.class;
     }
     public RegionEntryFactory makeVersioned() {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/44f403d9/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VMThinDiskRegionEntryOffHeap.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VMThinDiskRegionEntryOffHeap.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VMThinDiskRegionEntryOffHeap.java
index 5b7d654..a0d72d6 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VMThinDiskRegionEntryOffHeap.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VMThinDiskRegionEntryOffHeap.java
@@ -55,7 +55,7 @@ public abstract class VMThinDiskRegionEntryOffHeap extends VMThinDiskRegionEntry
 
     public final Class getEntryClass() {
       // The class returned from this method is used to estimate the memory size.
-      // TODO OFFHEAP: This estimate will not take into account the memory saved by inlining the keys.
+      // This estimate will not take into account the memory saved by inlining the keys.
       return VMThinDiskRegionEntryOffHeapObjectKey.class;
     }
     public RegionEntryFactory makeVersioned() {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/44f403d9/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VMThinLRURegionEntryHeap.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VMThinLRURegionEntryHeap.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VMThinLRURegionEntryHeap.java
index a7f0647..186fecd 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VMThinLRURegionEntryHeap.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VMThinLRURegionEntryHeap.java
@@ -55,7 +55,7 @@ public abstract class VMThinLRURegionEntryHeap extends VMThinLRURegionEntry {
 
     public final Class getEntryClass() {
       // The class returned from this method is used to estimate the memory size.
-      // TODO OFFHEAP: This estimate will not take into account the memory saved by inlining the keys.
+      // This estimate will not take into account the memory saved by inlining the keys.
       return VMThinLRURegionEntryHeapObjectKey.class;
     }
     public RegionEntryFactory makeVersioned() {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/44f403d9/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VMThinLRURegionEntryOffHeap.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VMThinLRURegionEntryOffHeap.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VMThinLRURegionEntryOffHeap.java
index b2d2b82..7162f2f 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VMThinLRURegionEntryOffHeap.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VMThinLRURegionEntryOffHeap.java
@@ -55,7 +55,7 @@ public abstract class VMThinLRURegionEntryOffHeap extends VMThinLRURegionEntry i
 
     public final Class getEntryClass() {
       // The class returned from this method is used to estimate the memory size.
-      // TODO OFFHEAP: This estimate will not take into account the memory saved by inlining the keys.
+      // This estimate will not take into account the memory saved by inlining the keys.
       return VMThinLRURegionEntryOffHeapObjectKey.class;
     }
     public RegionEntryFactory makeVersioned() {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/44f403d9/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VMThinRegionEntryHeap.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VMThinRegionEntryHeap.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VMThinRegionEntryHeap.java
index d17d3fd..3822b39 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VMThinRegionEntryHeap.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VMThinRegionEntryHeap.java
@@ -57,7 +57,7 @@ public abstract class VMThinRegionEntryHeap extends VMThinRegionEntry {
 
     public final Class getEntryClass() {
       // The class returned from this method is used to estimate the memory size.
-      // TODO OFFHEAP: This estimate will not take into account the memory saved by inlining the keys.
+      // This estimate will not take into account the memory saved by inlining the keys.
       return VMThinRegionEntryHeapObjectKey.class;
     }
     public RegionEntryFactory makeVersioned() {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/44f403d9/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VMThinRegionEntryOffHeap.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VMThinRegionEntryOffHeap.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VMThinRegionEntryOffHeap.java
index c752156..065f65d 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VMThinRegionEntryOffHeap.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VMThinRegionEntryOffHeap.java
@@ -57,7 +57,7 @@ public abstract class VMThinRegionEntryOffHeap extends VMThinRegionEntry impleme
 
     public final Class getEntryClass() {
       // The class returned from this method is used to estimate the memory size.
-      // TODO OFFHEAP: This estimate will not take into account the memory saved by inlining the keys.
+      // This estimate will not take into account the memory saved by inlining the keys.
       return VMThinRegionEntryOffHeapObjectKey.class;
     }
     public RegionEntryFactory makeVersioned() {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/44f403d9/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VersionedStatsDiskLRURegionEntryHeap.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VersionedStatsDiskLRURegionEntryHeap.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VersionedStatsDiskLRURegionEntryHeap.java
index 51ab750..e2b9b82 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VersionedStatsDiskLRURegionEntryHeap.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VersionedStatsDiskLRURegionEntryHeap.java
@@ -56,7 +56,7 @@ public abstract class VersionedStatsDiskLRURegionEntryHeap extends
 
     public final Class getEntryClass() {
       // The class returned from this method is used to estimate the memory size.
-      // TODO OFFHEAP: This estimate will not take into account the memory saved by inlining the keys.
+      // This estimate will not take into account the memory saved by inlining the keys.
       return VersionedStatsDiskLRURegionEntryHeapObjectKey.class;
     }
     public RegionEntryFactory makeVersioned() {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/44f403d9/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VersionedStatsDiskLRURegionEntryOffHeap.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VersionedStatsDiskLRURegionEntryOffHeap.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VersionedStatsDiskLRURegionEntryOffHeap.java
index 1515fe9..6bf84f6 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VersionedStatsDiskLRURegionEntryOffHeap.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VersionedStatsDiskLRURegionEntryOffHeap.java
@@ -56,7 +56,7 @@ public abstract class VersionedStatsDiskLRURegionEntryOffHeap extends
 
     public final Class getEntryClass() {
       // The class returned from this method is used to estimate the memory size.
-      // TODO OFFHEAP: This estimate will not take into account the memory saved by inlining the keys.
+      // This estimate will not take into account the memory saved by inlining the keys.
       return VersionedStatsDiskLRURegionEntryOffHeapObjectKey.class;
     }
     public RegionEntryFactory makeVersioned() {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/44f403d9/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VersionedStatsDiskRegionEntryHeap.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VersionedStatsDiskRegionEntryHeap.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VersionedStatsDiskRegionEntryHeap.java
index 158aeee..5cdd063 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VersionedStatsDiskRegionEntryHeap.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VersionedStatsDiskRegionEntryHeap.java
@@ -56,7 +56,7 @@ public abstract class VersionedStatsDiskRegionEntryHeap extends
 
     public final Class getEntryClass() {
       // The class returned from this method is used to estimate the memory size.
-      // TODO OFFHEAP: This estimate will not take into account the memory saved by inlining the keys.
+      // This estimate will not take into account the memory saved by inlining the keys.
       return VersionedStatsDiskRegionEntryHeapObjectKey.class;
     }
     public RegionEntryFactory makeVersioned() {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/44f403d9/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VersionedStatsDiskRegionEntryOffHeap.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VersionedStatsDiskRegionEntryOffHeap.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VersionedStatsDiskRegionEntryOffHeap.java
index 2291f86..f26a631 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VersionedStatsDiskRegionEntryOffHeap.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VersionedStatsDiskRegionEntryOffHeap.java
@@ -56,7 +56,7 @@ public abstract class VersionedStatsDiskRegionEntryOffHeap extends
 
     public final Class getEntryClass() {
       // The class returned from this method is used to estimate the memory size.
-      // TODO OFFHEAP: This estimate will not take into account the memory saved by inlining the keys.
+      // This estimate will not take into account the memory saved by inlining the keys.
       return VersionedStatsDiskRegionEntryOffHeapObjectKey.class;
     }
     public RegionEntryFactory makeVersioned() {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/44f403d9/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VersionedStatsLRURegionEntryHeap.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VersionedStatsLRURegionEntryHeap.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VersionedStatsLRURegionEntryHeap.java
index d3f1b00..301d8d0 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VersionedStatsLRURegionEntryHeap.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VersionedStatsLRURegionEntryHeap.java
@@ -56,7 +56,7 @@ public abstract class VersionedStatsLRURegionEntryHeap extends
 
     public final Class getEntryClass() {
       // The class returned from this method is used to estimate the memory size.
-      // TODO OFFHEAP: This estimate will not take into account the memory saved by inlining the keys.
+      // This estimate will not take into account the memory saved by inlining the keys.
       return VersionedStatsLRURegionEntryHeapObjectKey.class;
     }
     public RegionEntryFactory makeVersioned() {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/44f403d9/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VersionedStatsLRURegionEntryOffHeap.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VersionedStatsLRURegionEntryOffHeap.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VersionedStatsLRURegionEntryOffHeap.java
index b12d8dd..92eef07 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VersionedStatsLRURegionEntryOffHeap.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VersionedStatsLRURegionEntryOffHeap.java
@@ -56,7 +56,7 @@ public abstract class VersionedStatsLRURegionEntryOffHeap extends
 
     public final Class getEntryClass() {
       // The class returned from this method is used to estimate the memory size.
-      // TODO OFFHEAP: This estimate will not take into account the memory saved by inlining the keys.
+      // This estimate will not take into account the memory saved by inlining the keys.
       return VersionedStatsLRURegionEntryOffHeapObjectKey.class;
     }
     public RegionEntryFactory makeVersioned() {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/44f403d9/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VersionedStatsRegionEntryHeap.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VersionedStatsRegionEntryHeap.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VersionedStatsRegionEntryHeap.java
index e6a1bf0..863f0c7 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VersionedStatsRegionEntryHeap.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VersionedStatsRegionEntryHeap.java
@@ -55,7 +55,7 @@ public abstract class VersionedStatsRegionEntryHeap extends VersionedStatsRegion
 
     public final Class getEntryClass() {
       // The class returned from this method is used to estimate the memory size.
-      // TODO OFFHEAP: This estimate will not take into account the memory saved by inlining the keys.
+      // This estimate will not take into account the memory saved by inlining the keys.
       return VersionedStatsRegionEntryHeapObjectKey.class;
     }
     public RegionEntryFactory makeVersioned() {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/44f403d9/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VersionedStatsRegionEntryOffHeap.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VersionedStatsRegionEntryOffHeap.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VersionedStatsRegionEntryOffHeap.java
index eb4ac39..6e3d033 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VersionedStatsRegionEntryOffHeap.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VersionedStatsRegionEntryOffHeap.java
@@ -55,7 +55,7 @@ public abstract class VersionedStatsRegionEntryOffHeap extends VersionedStatsReg
 
     public final Class getEntryClass() {
       // The class returned from this method is used to estimate the memory size.
-      // TODO OFFHEAP: This estimate will not take into account the memory saved by inlining the keys.
+      // This estimate will not take into account the memory saved by inlining the keys.
       return VersionedStatsRegionEntryOffHeapObjectKey.class;
     }
     public RegionEntryFactory makeVersioned() {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/44f403d9/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VersionedThinDiskLRURegionEntryHeap.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VersionedThinDiskLRURegionEntryHeap.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VersionedThinDiskLRURegionEntryHeap.java
index dedbfc0..9e7d4e1 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VersionedThinDiskLRURegionEntryHeap.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VersionedThinDiskLRURegionEntryHeap.java
@@ -56,7 +56,7 @@ public abstract class VersionedThinDiskLRURegionEntryHeap extends
 
     public final Class getEntryClass() {
       // The class returned from this method is used to estimate the memory size.
-      // TODO OFFHEAP: This estimate will not take into account the memory saved by inlining the keys.
+      // This estimate will not take into account the memory saved by inlining the keys.
       return VersionedThinDiskLRURegionEntryHeapObjectKey.class;
     }
     public RegionEntryFactory makeVersioned() {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/44f403d9/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VersionedThinDiskLRURegionEntryOffHeap.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VersionedThinDiskLRURegionEntryOffHeap.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VersionedThinDiskLRURegionEntryOffHeap.java
index 43cec01..1f838a1 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VersionedThinDiskLRURegionEntryOffHeap.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VersionedThinDiskLRURegionEntryOffHeap.java
@@ -56,7 +56,7 @@ public abstract class VersionedThinDiskLRURegionEntryOffHeap extends
 
     public final Class getEntryClass() {
       // The class returned from this method is used to estimate the memory size.
-      // TODO OFFHEAP: This estimate will not take into account the memory saved by inlining the keys.
+      // This estimate will not take into account the memory saved by inlining the keys.
       return VersionedThinDiskLRURegionEntryOffHeapObjectKey.class;
     }
     public RegionEntryFactory makeVersioned() {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/44f403d9/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VersionedThinDiskRegionEntryHeap.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VersionedThinDiskRegionEntryHeap.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VersionedThinDiskRegionEntryHeap.java
index 2c15b68..eb4955f 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VersionedThinDiskRegionEntryHeap.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VersionedThinDiskRegionEntryHeap.java
@@ -56,7 +56,7 @@ public abstract class VersionedThinDiskRegionEntryHeap extends
 
     public final Class getEntryClass() {
       // The class returned from this method is used to estimate the memory size.
-      // TODO OFFHEAP: This estimate will not take into account the memory saved by inlining the keys.
+      // This estimate will not take into account the memory saved by inlining the keys.
       return VersionedThinDiskRegionEntryHeapObjectKey.class;
     }
     public RegionEntryFactory makeVersioned() {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/44f403d9/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VersionedThinDiskRegionEntryOffHeap.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VersionedThinDiskRegionEntryOffHeap.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VersionedThinDiskRegionEntryOffHeap.java
index ebd3dc5..6a02e94 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VersionedThinDiskRegionEntryOffHeap.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VersionedThinDiskRegionEntryOffHeap.java
@@ -56,7 +56,7 @@ public abstract class VersionedThinDiskRegionEntryOffHeap extends
 
     public final Class getEntryClass() {
       // The class returned from this method is used to estimate the memory size.
-      // TODO OFFHEAP: This estimate will not take into account the memory saved by inlining the keys.
+      // This estimate will not take into account the memory saved by inlining the keys.
       return VersionedThinDiskRegionEntryOffHeapObjectKey.class;
     }
     public RegionEntryFactory makeVersioned() {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/44f403d9/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VersionedThinLRURegionEntryHeap.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VersionedThinLRURegionEntryHeap.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VersionedThinLRURegionEntryHeap.java
index aaa5929..cebc28a 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VersionedThinLRURegionEntryHeap.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VersionedThinLRURegionEntryHeap.java
@@ -55,7 +55,7 @@ public abstract class VersionedThinLRURegionEntryHeap extends VersionedThinLRURe
 
     public final Class getEntryClass() {
       // The class returned from this method is used to estimate the memory size.
-      // TODO OFFHEAP: This estimate will not take into account the memory saved by inlining the keys.
+      // This estimate will not take into account the memory saved by inlining the keys.
       return VersionedThinLRURegionEntryHeapObjectKey.class;
     }
     public RegionEntryFactory makeVersioned() {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/44f403d9/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VersionedThinLRURegionEntryOffHeap.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VersionedThinLRURegionEntryOffHeap.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VersionedThinLRURegionEntryOffHeap.java
index 47515ad..6963620 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VersionedThinLRURegionEntryOffHeap.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VersionedThinLRURegionEntryOffHeap.java
@@ -55,7 +55,7 @@ public abstract class VersionedThinLRURegionEntryOffHeap extends VersionedThinLR
 
     public final Class getEntryClass() {
       // The class returned from this method is used to estimate the memory size.
-      // TODO OFFHEAP: This estimate will not take into account the memory saved by inlining the keys.
+      // This estimate will not take into account the memory saved by inlining the keys.
       return VersionedThinLRURegionEntryOffHeapObjectKey.class;
     }
     public RegionEntryFactory makeVersioned() {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/44f403d9/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VersionedThinRegionEntryHeap.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VersionedThinRegionEntryHeap.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VersionedThinRegionEntryHeap.java
index e43ce40..1da7d30 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VersionedThinRegionEntryHeap.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VersionedThinRegionEntryHeap.java
@@ -55,7 +55,7 @@ public abstract class VersionedThinRegionEntryHeap extends VersionedThinRegionEn
 
     public final Class getEntryClass() {
       // The class returned from this method is used to estimate the memory size.
-      // TODO OFFHEAP: This estimate will not take into account the memory saved by inlining the keys.
+      // This estimate will not take into account the memory saved by inlining the keys.
       return VersionedThinRegionEntryHeapObjectKey.class;
     }
     public RegionEntryFactory makeVersioned() {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/44f403d9/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VersionedThinRegionEntryOffHeap.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VersionedThinRegionEntryOffHeap.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VersionedThinRegionEntryOffHeap.java
index 29db900..b9c5a5c 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VersionedThinRegionEntryOffHeap.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/VersionedThinRegionEntryOffHeap.java
@@ -55,7 +55,7 @@ public abstract class VersionedThinRegionEntryOffHeap extends VersionedThinRegio
 
     public final Class getEntryClass() {
       // The class returned from this method is used to estimate the memory size.
-      // TODO OFFHEAP: This estimate will not take into account the memory saved by inlining the keys.
+      // This estimate will not take into account the memory saved by inlining the keys.
       return VersionedThinRegionEntryOffHeapObjectKey.class;
     }
     public RegionEntryFactory makeVersioned() {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/44f403d9/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/control/InternalResourceManager.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/control/InternalResourceManager.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/control/InternalResourceManager.java
index 96d2b87..9d242aa 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/control/InternalResourceManager.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/control/InternalResourceManager.java
@@ -253,16 +253,6 @@ public class InternalResourceManager implements ResourceManager {
   }
   
   void deliverLocalEvent(ResourceEvent event) {
-    // TODO OFFHEAP MERGE: the fix for 49555 did the following:
-//       if (listener instanceof LocalRegion) {
-//         LocalRegion lr = (LocalRegion)listener;
-//         if (lr.isDestroyed()) {
-//           // do not added destroyed region to fix bug 49555
-//           return;
-//         }
-//       }
-// need to figure out where this code should now be    
-
     // Wait for an event to be handled by all listeners before starting to send another event
     synchronized (this.listeners) {
       this.resourceMonitors.get(event.getType()).notifyListeners(this.listeners.get(event.getType()), event);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/44f403d9/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/DestroyMessage.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/DestroyMessage.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/DestroyMessage.java
index 3a6f04e..c706a3c 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/DestroyMessage.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/DestroyMessage.java
@@ -97,7 +97,7 @@ public class DestroyMessage extends PartitionMessageWithDirectReply {
   InternalDistributedMember originalSender;
   
   /** expectedOldValue used for PartitionedRegion#remove(key, value) */
-  private Object expectedOldValue; // TODO OFFHEAP make it a cd
+  private Object expectedOldValue;
   
   /** client routing information for notificationOnly=true messages */
   protected FilterRoutingInfo filterInfo;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/44f403d9/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/PutMessage.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/PutMessage.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/PutMessage.java
index db11a8e..d5abaa1 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/PutMessage.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/PutMessage.java
@@ -152,7 +152,7 @@ public final class PutMessage extends PartitionMessageWithDirectReply implements
    * expectedOldValue.
    * @see PartitionedRegion#replace(Object, Object, Object)
    */
-  private Object expectedOldValue; // TODO OFFHEAP make it a cd
+  private Object expectedOldValue;
 
   private transient InternalDistributedSystem internalDs;
 
@@ -729,7 +729,6 @@ public final class PutMessage extends PartitionMessageWithDirectReply implements
       region.getCachePerfStats().incDeltasSent();
     }
     else {
-      // TODO OFFHEAP MERGE: cache serialized blob in event
       DistributedCacheOperation.writeValue(this.deserializationPolicy, this.valObj, getValBytes(), out);
       if ((extraFlags & HAS_DELTA_WITH_FULL_VALUE) != 0) {
         DataSerializer.writeByteArray(this.event.getDeltaBytes(), out);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/44f403d9/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/BaseCommand.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/BaseCommand.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/BaseCommand.java
index c264616..e6c07d9 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/BaseCommand.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/BaseCommand.java
@@ -1389,9 +1389,6 @@ public abstract class BaseCommand implements Command {
           try {
             updateValues(values, key, value, vt);
           } finally {
-            // TODO OFFHEAP: in the future we might want to delay this release
-            // until the "values" VersionedObjectList is released.
-            // But for now "updateValues" copies the off-heap value to the heap.
             OffHeapHelper.release(value);
           }
         }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/44f403d9/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/Message.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/Message.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/Message.java
index 94b4953..a011875 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/Message.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/Message.java
@@ -326,22 +326,6 @@ public class Message  {
     }
     // create the HDOS with a flag telling it that it can keep any byte[] or ByteBuffers/ByteSources passed to it.
     hdos = new HeapDataOutputStream(chunkSize, v, true);
-    // TODO OFFHEAP: Change Part to look for an HDOS and just pass a reference to its DirectByteBuffer.
-    // Then change HDOS sendTo(SocketChannel...) to use the GatheringByteChannel to write a bunch of bbs.
-    // TODO OFFHEAP This code optimizes one part which works pretty good for getAll since all the values are
-    // returned in one part. But the following seems even better...
-    // BETTER: change Message to consolidate all the part hdos bb lists into a single bb array and have it do the GatheringByteChannel write.
-    // Message can use slice for the small parts (msg header and part header) that are not in the parts data (its a byte array, Chunk, or HDOS).
-    // EVEN BETTER: the message can have a single HDOS which owns a direct comm buffer. It can reserve space if it does not yet know the value to write (for example the size of the message or part).
-    // If we write something to the HDOS that is direct then it does not need to be copied.
-    // But large heap byte arrays will need to be copied to the hdos (the socket write does this anyway).
-    // If the direct buffer is full then we can allocate another one. If a part is already in a heap byte array
-    // then we could defer copying it by slicing the current direct bb and then adding the heap byte array
-    // as bb using ByteBuffer.wrap. Once we have all the data in the HDOS we can finally generate the header
-    // and then start working on sending the ByteBuffers to the channel. If we have room in a direct bb then
-    // we can copy a heap bb to it. Otherwise we can write the bb ahead of it which would free up room to copy
-    // the heap bb to the existing direct bb without needing to allocate extra direct bbs.
-    // Delaying the flush uses more direct memory but reduces the number of system calls.
     try {
       BlobHelper.serializeTo(o, hdos);
     } catch (IOException ex) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/44f403d9/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/command/Destroy65.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/command/Destroy65.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/command/Destroy65.java
index 1da422a..27ebbd9 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/command/Destroy65.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/command/Destroy65.java
@@ -135,7 +135,7 @@ public class Destroy65 extends BaseCommand {
         		|| ((operation instanceof Byte) && (Byte)operation == OpType.DESTROY ))
         		
         {        	
-          expectedOldValue = expectedOldValuePart.getObject(); // TODO OFFHEAP create a cachedDeserializable here       
+          expectedOldValue = expectedOldValuePart.getObject();
         }
     } catch (Exception e) {
       writeException(msg, e, false, servConn);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/44f403d9/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/command/Get70.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/command/Get70.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/command/Get70.java
index b2be3c3..7898b3c 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/command/Get70.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/command/Get70.java
@@ -305,7 +305,6 @@ public class Get70 extends BaseCommand {
 //    } else {
       ClientProxyMembershipID id = servConn == null ? null : servConn.getProxyID();
       VersionTagHolder versionHolder = new VersionTagHolder();
-        // TODO OFFHEAP: optimize
       data  = ((LocalRegion) region).get(key, callbackArg, true, true, true, id, versionHolder, true, true /*allowReadFromHDFS*/);
 //    }
     versionTag = versionHolder.getVersionTag();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/44f403d9/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/command/Request.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/command/Request.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/command/Request.java
index b40b6e5..2a617a8 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/command/Request.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/command/Request.java
@@ -242,7 +242,6 @@ public class Request extends BaseCommand {
 
     boolean isObject = true;
     ClientProxyMembershipID id = servConn == null ? null : servConn.getProxyID();
-    // TODO OFFHEAP: optimize
     Object data  = ((LocalRegion) region).get(key, callbackArg, true, true, true, id, null, false, true/*allowReadFromHDFS*/);
     
     // If the value in the VM is a CachedDeserializable,
@@ -250,7 +249,6 @@ public class Request extends BaseCommand {
     // Token.INVALID, or Token.LOCAL_INVALID
     // set it to null. If it is NOT_AVAILABLE, get the value from
     // disk. If it is already a byte[], set isObject to false.
-    // TODO OFFHEAP: optimize
     if (data instanceof CachedDeserializable) {
       CachedDeserializable cd = (CachedDeserializable) data;
       if (!cd.isSerialized()) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/44f403d9/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/GatewaySenderEventImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/GatewaySenderEventImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/GatewaySenderEventImpl.java
index abbea45..09d68f5 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/GatewaySenderEventImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/GatewaySenderEventImpl.java
@@ -590,7 +590,6 @@ public class GatewaySenderEventImpl implements
           throw new IllegalStateException("Value is no longer available. getDeserializedValue must be called before processEvents returns.");
         }
         if (so instanceof StoredObject) {
-          // TODO OFFHEAP: returns off-heap PdxInstance
           return ((StoredObject)so).getValueAsDeserializedHeapObject();
         } else {
           throw new IllegalStateException("expected valueObj field to be an instance of StoredObject but it was " + so);
@@ -604,7 +603,6 @@ public class GatewaySenderEventImpl implements
         if (vo instanceof StoredObject) {
           @Unretained(OffHeapIdentifier.GATEWAY_SENDER_EVENT_IMPL_VALUE)
           StoredObject so = (StoredObject)vo;
-          // TODO OFFHEAP: returns off-heap PdxInstance
           return so.getValueAsDeserializedHeapObject();
         } else {
           return vo; // it is already deserialized
@@ -955,9 +953,6 @@ public class GatewaySenderEventImpl implements
       ReferenceCountHelper.setReferenceCountOwner(this);
       so = event.getOffHeapNewValue();
       ReferenceCountHelper.setReferenceCountOwner(null);      
-        // TODO OFFHEAP MERGE: check for a cached serialized value first
-        // so we can use it instead of reading offheap
-        // If we do read offheap then add the serialize new value to the event cache
     }
     
     if (so != null) {