geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dschnei...@apache.org
Subject [10/16] geode git commit: GEODE-2485: fix leak in tx suspend/resume
Date Tue, 11 Apr 2017 17:52:42 GMT
GEODE-2485: fix leak in tx suspend/resume

The CCPTimer is now purged for every 1000 cancels done.
So we will now no longer have more than 1000
cancelled tasks eating up memory.
Now uses internalSuspend in two places the previously used suspend.
Since internalSuspend does not schedule a timer task
these places will have no more issues with leaking memory
and these code paths will perform better.

renamed resume(TxStateProxy) to internalResume for clarity.

internalResume no longer checks for a TimerTask to cancel
since internalSuspend does not add one.
Instead the only code that checks for a TimerTask is "resume".


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

Branch: refs/heads/feature/GEODE-2485
Commit: 344f93dfd07e6ace79cedfb474bf524b97232281
Parents: 8183b1f
Author: Darrel Schneider <dschneider@pivotal.io>
Authored: Wed Apr 5 16:51:29 2017 -0700
Committer: Darrel Schneider <dschneider@pivotal.io>
Committed: Mon Apr 10 14:16:29 2017 -0700

----------------------------------------------------------------------
 .../cache/query/internal/DefaultQuery.java      |  2 +-
 .../query/internal/index/IndexManager.java      |  4 +-
 .../org/apache/geode/internal/SystemTimer.java  |  2 +-
 .../geode/internal/cache/DistributedRegion.java |  6 +-
 .../geode/internal/cache/GemFireCacheImpl.java  | 28 +++++-
 .../geode/internal/cache/LocalRegion.java       |  6 +-
 .../cache/PartitionedRegionDataView.java        |  4 +-
 .../geode/internal/cache/TXManagerImpl.java     | 32 +++++--
 .../apache/geode/internal/cache/TXState.java    |  4 +-
 .../geode/internal/cache/TXStateProxy.java      |  4 +-
 .../geode/internal/cache/TXStateProxyImpl.java  |  8 +-
 .../cache/tier/sockets/CacheClientProxy.java    |  8 +-
 .../pdx/internal/PeerTypeRegistration.java      |  2 +-
 .../org/apache/geode/TXExpiryJUnitTest.java     |  2 +-
 .../test/java/org/apache/geode/TXJUnitTest.java | 98 ++++++++++----------
 .../geode/cache30/MultiVMRegionTestCase.java    |  6 +-
 .../cache/ClientServerTransactionDUnitTest.java | 12 +--
 .../internal/cache/GemFireCacheImplTest.java    | 23 +++++
 .../cache/RemoteTransactionDUnitTest.java       | 50 +++++-----
 .../cache/TransactionsWithDeltaDUnitTest.java   |  2 +-
 .../cache/execute/MyTransactionFunction.java    |  8 +-
 21 files changed, 188 insertions(+), 123 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode/blob/344f93df/geode-core/src/main/java/org/apache/geode/cache/query/internal/DefaultQuery.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/cache/query/internal/DefaultQuery.java b/geode-core/src/main/java/org/apache/geode/cache/query/internal/DefaultQuery.java
index a721091..544fc13 100644
--- a/geode-core/src/main/java/org/apache/geode/cache/query/internal/DefaultQuery.java
+++ b/geode-core/src/main/java/org/apache/geode/cache/query/internal/DefaultQuery.java
@@ -599,7 +599,7 @@ public class DefaultQuery implements Query {
       updateStatistics(endTime - startTime);
       pdxClassToFieldsMap.remove();
       pdxClassToMethodsMap.remove();
-      ((TXManagerImpl) this.cache.getCacheTransactionManager()).resume(tx);
+      ((TXManagerImpl) this.cache.getCacheTransactionManager()).internalResume(tx);
     }
   }
 

http://git-wip-us.apache.org/repos/asf/geode/blob/344f93df/geode-core/src/main/java/org/apache/geode/cache/query/internal/index/IndexManager.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/cache/query/internal/index/IndexManager.java b/geode-core/src/main/java/org/apache/geode/cache/query/internal/index/IndexManager.java
index 6cf9a3f..ed4f47f 100644
--- a/geode-core/src/main/java/org/apache/geode/cache/query/internal/index/IndexManager.java
+++ b/geode-core/src/main/java/org/apache/geode/cache/query/internal/index/IndexManager.java
@@ -407,7 +407,7 @@ public class IndexManager {
       DefaultQuery.setPdxReadSerialized(this.region.getCache(), oldReadSerialized);
 
       if (tx != null) {
-        ((TXManagerImpl) this.region.getCache().getCacheTransactionManager()).resume(tx);
+        ((TXManagerImpl) this.region.getCache().getCacheTransactionManager()).internalResume(tx);
       }
     }
   }
@@ -1138,7 +1138,7 @@ public class IndexManager {
     } finally {
       DefaultQuery.setPdxReadSerialized(this.region.getCache(), false);
       if (tx != null) {
-        ((TXManagerImpl) this.region.getCache().getCacheTransactionManager()).resume(tx);
+        ((TXManagerImpl) this.region.getCache().getCacheTransactionManager()).internalResume(tx);
       }
       getCachePerfStats().endIndexUpdate(startPA);
     }

http://git-wip-us.apache.org/repos/asf/geode/blob/344f93df/geode-core/src/main/java/org/apache/geode/internal/SystemTimer.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/SystemTimer.java b/geode-core/src/main/java/org/apache/geode/internal/SystemTimer.java
index bddd062..16227d2 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/SystemTimer.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/SystemTimer.java
@@ -43,7 +43,7 @@ import org.apache.geode.internal.logging.log4j.LocalizedMessage;
  *      TODO -- with Java 1.5, this will be a template type so that the swarm's class can be
  *      specified.
  */
-public final class SystemTimer {
+public class SystemTimer {
   private static final Logger logger = LogService.getLogger();
 
   final static private boolean isIBM =

http://git-wip-us.apache.org/repos/asf/geode/blob/344f93df/geode-core/src/main/java/org/apache/geode/internal/cache/DistributedRegion.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/DistributedRegion.java b/geode-core/src/main/java/org/apache/geode/internal/cache/DistributedRegion.java
index c12a652..8cdc517 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/DistributedRegion.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/DistributedRegion.java
@@ -3949,7 +3949,7 @@ public class DistributedRegion extends LocalRegion implements CacheDistributionA
   protected VersionTag fetchRemoteVersionTag(Object key) {
     VersionTag tag = null;
     assert this.dataPolicy != DataPolicy.REPLICATE;
-    TransactionId txId = cache.getCacheTransactionManager().suspend();
+    final TXStateProxy tx = cache.getTXMgr().internalSuspend();
     try {
       boolean retry = true;
       InternalDistributedMember member = getRandomReplicate();
@@ -3971,8 +3971,8 @@ public class DistributedRegion extends LocalRegion implements CacheDistributionA
         }
       }
     } finally {
-      if (txId != null) {
-        cache.getCacheTransactionManager().resume(txId);
+      if (tx != null) {
+        cache.getTXMgr().internalResume(tx);
       }
     }
     return tag;

http://git-wip-us.apache.org/repos/asf/geode/blob/344f93df/geode-core/src/main/java/org/apache/geode/internal/cache/GemFireCacheImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/GemFireCacheImpl.java b/geode-core/src/main/java/org/apache/geode/internal/cache/GemFireCacheImpl.java
index 1575517..08f916b 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/GemFireCacheImpl.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/GemFireCacheImpl.java
@@ -2437,7 +2437,7 @@ public class GemFireCacheImpl
         }
         ((DynamicRegionFactoryImpl) DynamicRegionFactory.get()).close();
         if (this.txMgr != null) {
-          this.txMgr.resume(tx);
+          this.txMgr.internalResume(tx);
         }
         TXCommitMessage.getTracker().clearForCacheClose();
       }
@@ -3937,6 +3937,32 @@ public class GemFireCacheImpl
   }
 
   /**
+   * For use by unit tests to inject a mocked ccpTimer
+   */
+  void setCCPTimer(SystemTimer ccpTimer) {
+    this.ccpTimer = ccpTimer;
+  }
+
+  static final int PURGE_INTERVAL = 1000;
+  private int cancelCount = 0;
+
+  /**
+   * Does a periodic purge of the CCPTimer to prevent a large number of cancelled tasks from
+   * building up in it. See GEODE-2485.
+   */
+  public void purgeCCPTimer() {
+    synchronized (ccpTimerMutex) {
+      if (ccpTimer != null) {
+        cancelCount++;
+        if (cancelCount == PURGE_INTERVAL) {
+          cancelCount = 0;
+          ccpTimer.timerPurge();
+        }
+      }
+    }
+  }
+
+  /**
    * @see LocalRegion
    */
   private final ExpirationScheduler expirationScheduler;

http://git-wip-us.apache.org/repos/asf/geode/blob/344f93df/geode-core/src/main/java/org/apache/geode/internal/cache/LocalRegion.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/LocalRegion.java b/geode-core/src/main/java/org/apache/geode/internal/cache/LocalRegion.java
index 957038c..d0aacc2 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/LocalRegion.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/LocalRegion.java
@@ -6556,7 +6556,7 @@ public class LocalRegion extends AbstractRegion implements LoaderHelperFactory,
         }
       }
     } finally {
-      this.cache.getTXMgr().resume(tx);
+      this.cache.getTXMgr().internalResume(tx);
     }
   }
 
@@ -7180,7 +7180,7 @@ public class LocalRegion extends AbstractRegion implements LoaderHelperFactory,
         dispatchListenerEvent(EnumListenerEvent.AFTER_REGION_INVALIDATE, event);
       }
     } finally {
-      this.cache.getTXMgr().resume(tx);
+      this.cache.getTXMgr().internalResume(tx);
     }
   }
 
@@ -9572,7 +9572,7 @@ public class LocalRegion extends AbstractRegion implements LoaderHelperFactory,
                       key);
                 }
               } finally {
-                this.cache.getTXMgr().resume(tx);
+                this.cache.getTXMgr().internalResume(tx);
               }
               getCachePerfStats().endPut(startPut, event.isOriginRemote());
             }

http://git-wip-us.apache.org/repos/asf/geode/blob/344f93df/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionDataView.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionDataView.java b/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionDataView.java
index 263df0f..998f944 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionDataView.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionDataView.java
@@ -58,7 +58,7 @@ public class PartitionedRegionDataView extends LocalRegionDataView {
       PartitionedRegion pr = (PartitionedRegion) localRegion;
       return pr.nonTXGetEntry(keyInfo, false, allowTombstones);
     } finally {
-      localRegion.cache.getTXMgr().resume(tx);
+      localRegion.cache.getTXMgr().internalResume(tx);
     }
   }
 
@@ -72,7 +72,7 @@ public class PartitionedRegionDataView extends LocalRegionDataView {
       return r.findObjectInSystem(key, isCreate, tx, generateCallbacks, value, disableCopyOnRead,
           preferCD, requestingClient, clientEvent, returnTombstones);
     } finally {
-      r.cache.getTXMgr().resume(tx);
+      r.cache.getTXMgr().internalResume(tx);
     }
   }
 

http://git-wip-us.apache.org/repos/asf/geode/blob/344f93df/geode-core/src/main/java/org/apache/geode/internal/cache/TXManagerImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/TXManagerImpl.java b/geode-core/src/main/java/org/apache/geode/internal/cache/TXManagerImpl.java
index 14fdf99..2948a48 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/TXManagerImpl.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/TXManagerImpl.java
@@ -675,7 +675,7 @@ public class TXManagerImpl implements CacheTransactionManager, MembershipListene
    * @param tx the transaction to activate.
    * @throws IllegalStateException if this thread already has an active transaction
    */
-  public final void resume(TXStateProxy tx) {
+  public void internalResume(TXStateProxy tx) {
     if (tx != null) {
       TransactionId tid = getTransactionId();
       if (tid != null) {
@@ -683,18 +683,18 @@ public class TXManagerImpl implements CacheTransactionManager, MembershipListene
             LocalizedStrings.TXManagerImpl_TRANSACTION_0_ALREADY_IN_PROGRESS
                 .toLocalizedString(tid));
       }
-      if (tx instanceof TXState) {
-        throw new java.lang.IllegalStateException("Found instance of TXState: " + tx);
-      }
       setTXState(tx);
       tx.resume();
-      SystemTimerTask task = this.expiryTasks.remove(tx.getTransactionId());
-      if (task != null) {
-        task.cancel();
-      }
     }
   }
 
+  /**
+   * @deprecated use internalResume instead
+   */
+  public final void resume(TXStateProxy tx) {
+    internalResume(tx);
+  }
+
   public final boolean isClosed() {
     return this.closed;
   }
@@ -1265,7 +1265,7 @@ public class TXManagerImpl implements CacheTransactionManager, MembershipListene
       throw new IllegalStateException(
           LocalizedStrings.TXManagerImpl_UNKNOWN_TRANSACTION_OR_RESUMED.toLocalizedString());
     }
-    resume(txProxy);
+    resumeProxy(txProxy);
   }
 
   public boolean isSuspended(TransactionId transactionId) {
@@ -1278,12 +1278,24 @@ public class TXManagerImpl implements CacheTransactionManager, MembershipListene
     }
     TXStateProxy txProxy = this.suspendedTXs.remove(transactionId);
     if (txProxy != null) {
-      resume(txProxy);
+      resumeProxy(txProxy);
       return true;
     }
     return false;
   }
 
+  private void resumeProxy(TXStateProxy txProxy) {
+    assert txProxy != null;
+    internalResume(txProxy);
+    SystemTimerTask task = this.expiryTasks.remove(txProxy.getTransactionId());
+    if (task != null) {
+      if (task.cancel()) {
+        GemFireCacheImpl cache = (GemFireCacheImpl) this.cache;
+        cache.purgeCCPTimer();
+      }
+    }
+  }
+
   /**
    * this map keeps track of all the threads that are waiting in
    * {@link #tryResume(TransactionId, long, TimeUnit)} for a particular transactionId

http://git-wip-us.apache.org/repos/asf/geode/blob/344f93df/geode-core/src/main/java/org/apache/geode/internal/cache/TXState.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/TXState.java b/geode-core/src/main/java/org/apache/geode/internal/cache/TXState.java
index d577f39..234baee 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/TXState.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/TXState.java
@@ -1679,11 +1679,11 @@ public class TXState implements TXStateInterface {
       if (!pr.getBucketPrimary(curr.getBucketId()).equals(pr.cache.getMyId())) {
         // to fix bug 47893 suspend the tx before calling nonTXGetEntry
         final TXManagerImpl txmgr = pr.getGemFireCache().getTXMgr();
-        TransactionId tid = txmgr.suspend();
+        final TXStateProxy tx = txmgr.internalSuspend();
         try {
           return pr.nonTXGetEntry(curr, false, allowTombstones);
         } finally {
-          txmgr.resume(tid);
+          txmgr.internalResume(tx);
         }
       }
     }

http://git-wip-us.apache.org/repos/asf/geode/blob/344f93df/geode-core/src/main/java/org/apache/geode/internal/cache/TXStateProxy.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/TXStateProxy.java b/geode-core/src/main/java/org/apache/geode/internal/cache/TXStateProxy.java
index c5e7cf6..d392c41 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/TXStateProxy.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/TXStateProxy.java
@@ -70,8 +70,8 @@ public interface TXStateProxy extends TXStateInterface {
   public void suspend();
 
   /**
-   * Called by {@link TXManagerImpl#resume(TXStateProxy)} to perform additional tasks required to
-   * resume a transaction
+   * Called by {@link TXManagerImpl#internalResume(TXStateProxy)} to perform additional tasks
+   * required to resume a transaction
    */
   public void resume();
 

http://git-wip-us.apache.org/repos/asf/geode/blob/344f93df/geode-core/src/main/java/org/apache/geode/internal/cache/TXStateProxyImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/TXStateProxyImpl.java b/geode-core/src/main/java/org/apache/geode/internal/cache/TXStateProxyImpl.java
index a89cdc4..49922a0 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/TXStateProxyImpl.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/TXStateProxyImpl.java
@@ -677,7 +677,7 @@ public class TXStateProxyImpl implements TXStateProxy {
       return getRealDeal(null, localRegion).entryCount(localRegion);
     } finally {
       if (resetTXState) {
-        getTxMgr().resume(txp);
+        getTxMgr().internalResume(txp);
       } else if (txUnlocked) {
         getLock().lock();
       }
@@ -742,7 +742,7 @@ public class TXStateProxyImpl implements TXStateProxy {
           allowTombstones);
     } finally {
       if (resetTxState) {
-        getTxMgr().resume(txp);
+        getTxMgr().internalResume(txp);
       }
     }
 
@@ -770,7 +770,7 @@ public class TXStateProxyImpl implements TXStateProxy {
           allowTombstones);
     } finally {
       if (resetTxState) {
-        getTxMgr().resume(txp);
+        getTxMgr().internalResume(txp);
       }
     }
   }
@@ -940,7 +940,7 @@ public class TXStateProxyImpl implements TXStateProxy {
       return getRealDeal(null, localRegion).getBucketKeys(localRegion, bucketId, false);
     } finally {
       if (resetTxState) {
-        getTxMgr().resume(txp);
+        getTxMgr().internalResume(txp);
       }
     }
   }

http://git-wip-us.apache.org/repos/asf/geode/blob/344f93df/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/CacheClientProxy.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/CacheClientProxy.java b/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/CacheClientProxy.java
index d7b923c..3b0c2ff 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/CacheClientProxy.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/CacheClientProxy.java
@@ -1970,7 +1970,9 @@ public class CacheClientProxy implements ClientSession {
          */
         Object task = _durableExpirationTask.getAndSet(null);
         if (task != null) {
-          ((SystemTimerTask) task).cancel();
+          if (((SystemTimerTask) task).cancel()) {
+            _cache.purgeCCPTimer();
+          }
         }
       }
 
@@ -1988,7 +1990,9 @@ public class CacheClientProxy implements ClientSession {
             LocalizedStrings.CacheClientProxy_0_CANCELLING_EXPIRATION_TASK_SINCE_THE_CLIENT_HAS_RECONNECTED,
             this));
       }
-      task.cancel();
+      if (task.cancel()) {
+        _cache.purgeCCPTimer();
+      }
     }
   }
 

http://git-wip-us.apache.org/repos/asf/geode/blob/344f93df/geode-core/src/main/java/org/apache/geode/pdx/internal/PeerTypeRegistration.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/pdx/internal/PeerTypeRegistration.java b/geode-core/src/main/java/org/apache/geode/pdx/internal/PeerTypeRegistration.java
index 653cafb..ed94c0c 100644
--- a/geode-core/src/main/java/org/apache/geode/pdx/internal/PeerTypeRegistration.java
+++ b/geode-core/src/main/java/org/apache/geode/pdx/internal/PeerTypeRegistration.java
@@ -642,7 +642,7 @@ public class PeerTypeRegistration implements TypeRegistration {
   private void resumeTX(TXStateProxy state) {
     if (state != null) {
       TXManagerImpl txManager = state.getTxMgr();
-      txManager.resume(state);
+      txManager.internalResume(state);
     }
   }
 

http://git-wip-us.apache.org/repos/asf/geode/blob/344f93df/geode-core/src/test/java/org/apache/geode/TXExpiryJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/TXExpiryJUnitTest.java b/geode-core/src/test/java/org/apache/geode/TXExpiryJUnitTest.java
index f55926a..077d3e6 100644
--- a/geode-core/src/test/java/org/apache/geode/TXExpiryJUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/TXExpiryJUnitTest.java
@@ -200,7 +200,7 @@ public class TXExpiryJUnitTest {
           final TXManagerImpl txMgrImpl = (TXManagerImpl) this.txMgr;
           TXStateProxy tx = txMgrImpl.internalSuspend();
           exprReg.put("key0", checkVal);
-          txMgrImpl.resume(tx);
+          txMgrImpl.internalResume(tx);
           try {
             this.txMgr.commit();
             fail("Expected CommitConflictException!");

http://git-wip-us.apache.org/repos/asf/geode/blob/344f93df/geode-core/src/test/java/org/apache/geode/TXJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/TXJUnitTest.java b/geode-core/src/test/java/org/apache/geode/TXJUnitTest.java
index 5166a16..54d9e50 100644
--- a/geode-core/src/test/java/org/apache/geode/TXJUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/TXJUnitTest.java
@@ -4363,7 +4363,7 @@ public class TXJUnitTest {
       assertTrue(!reg1.containsKey("key1"));
       assertEquals("LV 4", reg1.get("key1"));
       assertTrue(reg1.containsKey("key1"));
-      txMgrImpl.resume(tx);
+      txMgrImpl.internalResume(tx);
       assertEquals("txValue", reg1.getEntry("key1").getValue());
       assertEquals("txValue", reg1.get("key1"));
       try {
@@ -4409,7 +4409,7 @@ public class TXJUnitTest {
       reg1.create("key1", "txValue");
       assertTrue(reg1.containsKey("key1"));
       assertEquals("txValue", reg1.get("key1"));
-      txMgrImpl.resume(tx);
+      txMgrImpl.internalResume(tx);
       assertEquals("LV 8", reg1.getEntry("key1").getValue());
       try {
         this.txMgr.commit(); // should conflict
@@ -4440,7 +4440,7 @@ public class TXJUnitTest {
       assertTrue(reg1.containsKey("key1"));
       assertEquals("txValue2", reg1.get("key1"));
       assertEquals("txValue2", reg1.getEntry("key1").getValue());
-      txMgrImpl.resume(tx);
+      txMgrImpl.internalResume(tx);
       assertEquals("txValue", reg1.getEntry("key1").getValue());
       assertEquals("txValue", reg1.get("key1"));
       try {
@@ -4785,7 +4785,7 @@ public class TXJUnitTest {
     TXStateProxy tx = txMgrImpl.internalSuspend();
     this.region.put("stats1", "stats success1");
     this.region.put("stats2", "stats success2");
-    txMgrImpl.resume(tx);
+    txMgrImpl.internalResume(tx);
     // end other tx simulation
     pause(SLEEP_MS);
     try {
@@ -4937,7 +4937,7 @@ public class TXJUnitTest {
     assertTrue(!this.txMgr.exists());
     assertEquals(null, txMgrImpl.internalSuspend());
     TXStateProxy txProxy = null;
-    txMgrImpl.resume(txProxy);
+    txMgrImpl.internalResume(txProxy);
     assertTrue(!this.txMgr.exists());
 
     this.txMgr.begin();
@@ -4948,13 +4948,13 @@ public class TXJUnitTest {
       assertTrue(!this.txMgr.exists());
       this.txMgr.begin();
       try {
-        txMgrImpl.resume(tx);
+        txMgrImpl.internalResume(tx);
         fail("expected IllegalStateException");
       } catch (IllegalStateException expected) {
       }
       this.txMgr.rollback();
       assertTrue(!this.txMgr.exists());
-      txMgrImpl.resume(tx);
+      txMgrImpl.internalResume(tx);
     }
     assertTrue(this.txMgr.exists());
     assertEquals(origId, this.txMgr.getTransactionId());
@@ -5069,7 +5069,7 @@ public class TXJUnitTest {
     assertEquals("value1", this.region.get("key1"));
     tx = txMgrImpl.internalSuspend();
     this.region.put("key1", "value2"); // non-tx
-    txMgrImpl.resume(tx);
+    txMgrImpl.internalResume(tx);
 
     assertEquals("value1", this.region.get("key1"));
     txMgrImpl.commit();
@@ -5080,7 +5080,7 @@ public class TXJUnitTest {
     assertEquals("value1", this.region.get("key1"));
     tx = txMgrImpl.internalSuspend();
     this.region.put("key1", "value2"); // non-tx
-    txMgrImpl.resume(tx);
+    txMgrImpl.internalResume(tx);
     assertEquals("value1", this.region.get("key1"));
     this.region.put("key1", "value3");
     assertEquals("value3", this.region.get("key1"));
@@ -5096,7 +5096,7 @@ public class TXJUnitTest {
     this.region.getEntry("key1");
     tx = txMgrImpl.internalSuspend();
     this.region.put("key1", "value2"); // non-tx
-    txMgrImpl.resume(tx);
+    txMgrImpl.internalResume(tx);
 
     assertEquals("value1", this.region.get("key1"));
     txMgrImpl.commit();
@@ -5107,7 +5107,7 @@ public class TXJUnitTest {
     this.region.getEntry("key1");
     tx = txMgrImpl.internalSuspend();
     this.region.put("key1", "value2"); // non-tx
-    txMgrImpl.resume(tx);
+    txMgrImpl.internalResume(tx);
     this.region.put("key1", "value3");
     try {
       txMgrImpl.commit();
@@ -5122,7 +5122,7 @@ public class TXJUnitTest {
     this.region.entrySet(false).iterator().next();
     tx = txMgrImpl.internalSuspend();
     this.region.put("key1", "value2"); // non-tx
-    txMgrImpl.resume(tx);
+    txMgrImpl.internalResume(tx);
 
     assertEquals("value1", this.region.get("key1"));
     txMgrImpl.commit();
@@ -5134,7 +5134,7 @@ public class TXJUnitTest {
     this.region.entrySet(false).iterator().next();
     tx = txMgrImpl.internalSuspend();
     this.region.put("key1", "value2"); // non-tx
-    txMgrImpl.resume(tx);
+    txMgrImpl.internalResume(tx);
     assertEquals("value1", this.region.get("key1"));
     this.region.put("key1", "value3");
     try {
@@ -5149,7 +5149,7 @@ public class TXJUnitTest {
     assertEquals(true, this.region.containsKey("key1"));
     tx = txMgrImpl.internalSuspend();
     this.region.remove("key1"); // non-tx
-    txMgrImpl.resume(tx);
+    txMgrImpl.internalResume(tx);
     assertEquals(true, this.region.containsKey("key1"));
     txMgrImpl.commit();
     this.region.put("key1", "value1"); // non-tx
@@ -5157,7 +5157,7 @@ public class TXJUnitTest {
     assertEquals(true, this.region.containsKey("key1"));
     tx = txMgrImpl.internalSuspend();
     this.region.remove("key1"); // non-tx
-    txMgrImpl.resume(tx);
+    txMgrImpl.internalResume(tx);
     assertEquals(true, this.region.containsKey("key1"));
     this.region.put("key1", "value3");
     assertEquals(true, this.region.containsKey("key1"));
@@ -5172,7 +5172,7 @@ public class TXJUnitTest {
     assertEquals(true, this.region.containsValueForKey("key1"));
     tx = txMgrImpl.internalSuspend();
     this.region.remove("key1"); // non-tx
-    txMgrImpl.resume(tx);
+    txMgrImpl.internalResume(tx);
     assertEquals(true, this.region.containsValueForKey("key1"));
     txMgrImpl.commit();
     this.region.put("key1", "value1"); // non-tx
@@ -5180,7 +5180,7 @@ public class TXJUnitTest {
     assertEquals(true, this.region.containsValueForKey("key1"));
     tx = txMgrImpl.internalSuspend();
     this.region.remove("key1"); // non-tx
-    txMgrImpl.resume(tx);
+    txMgrImpl.internalResume(tx);
     assertEquals(true, this.region.containsValueForKey("key1"));
     this.region.put("key1", "value3");
     assertEquals(true, this.region.containsValueForKey("key1"));
@@ -5198,7 +5198,7 @@ public class TXJUnitTest {
     assertEquals(null, this.region.get("key1"));
     tx = txMgrImpl.internalSuspend();
     this.region.put("key1", "value2"); // non-tx
-    txMgrImpl.resume(tx);
+    txMgrImpl.internalResume(tx);
 
     assertEquals(null, this.region.get("key1"));
     txMgrImpl.commit();
@@ -5209,7 +5209,7 @@ public class TXJUnitTest {
     assertEquals(null, this.region.get("key1"));
     tx = txMgrImpl.internalSuspend();
     this.region.put("key1", "value2"); // non-tx
-    txMgrImpl.resume(tx);
+    txMgrImpl.internalResume(tx);
     assertEquals(null, this.region.get("key1"));
     this.region.put("key1", "value3");
     assertEquals("value3", this.region.get("key1"));
@@ -5225,7 +5225,7 @@ public class TXJUnitTest {
     assertEquals(null, this.region.getEntry("key1"));
     tx = txMgrImpl.internalSuspend();
     this.region.put("key1", "value2"); // non-tx
-    txMgrImpl.resume(tx);
+    txMgrImpl.internalResume(tx);
 
     assertEquals(null, this.region.getEntry("key1"));
     txMgrImpl.commit();
@@ -5236,7 +5236,7 @@ public class TXJUnitTest {
     assertEquals(null, this.region.getEntry("key1"));
     tx = txMgrImpl.internalSuspend();
     this.region.put("key1", "value2"); // non-tx
-    txMgrImpl.resume(tx);
+    txMgrImpl.internalResume(tx);
     assertEquals(null, this.region.getEntry("key1"));
     this.region.put("key1", "value3");
     try {
@@ -5251,7 +5251,7 @@ public class TXJUnitTest {
     assertEquals(false, this.region.containsKey("key1"));
     tx = txMgrImpl.internalSuspend();
     this.region.put("key1", "value2"); // non-tx
-    txMgrImpl.resume(tx);
+    txMgrImpl.internalResume(tx);
     assertEquals(false, this.region.containsKey("key1"));
     txMgrImpl.commit();
     this.region.remove("key1"); // non-tx
@@ -5259,7 +5259,7 @@ public class TXJUnitTest {
     assertEquals(false, this.region.containsKey("key1"));
     tx = txMgrImpl.internalSuspend();
     this.region.put("key1", "value2"); // non-tx
-    txMgrImpl.resume(tx);
+    txMgrImpl.internalResume(tx);
     assertEquals(false, this.region.containsKey("key1"));
     this.region.put("key1", "value3");
     assertEquals(true, this.region.containsKey("key1"));
@@ -5275,7 +5275,7 @@ public class TXJUnitTest {
     assertEquals(false, this.region.containsValueForKey("key1"));
     tx = txMgrImpl.internalSuspend();
     this.region.put("key1", "value2"); // non-tx
-    txMgrImpl.resume(tx);
+    txMgrImpl.internalResume(tx);
     assertEquals(false, this.region.containsValueForKey("key1"));
     txMgrImpl.commit();
     this.region.remove("key1"); // non-tx
@@ -5283,7 +5283,7 @@ public class TXJUnitTest {
     assertEquals(false, this.region.containsValueForKey("key1"));
     tx = txMgrImpl.internalSuspend();
     this.region.put("key1", "value2"); // non-tx
-    txMgrImpl.resume(tx);
+    txMgrImpl.internalResume(tx);
     assertEquals(false, this.region.containsValueForKey("key1"));
     this.region.put("key1", "value3");
     assertEquals(true, this.region.containsValueForKey("key1"));
@@ -5301,7 +5301,7 @@ public class TXJUnitTest {
     this.region.localInvalidate("key1"); // should be a noop since it is already invalid
     tx = txMgrImpl.internalSuspend();
     this.region.remove("key1"); // non-tx
-    txMgrImpl.resume(tx);
+    txMgrImpl.internalResume(tx);
     txMgrImpl.commit();
     assertEquals(false, this.region.containsKey("key1"));
 
@@ -5312,7 +5312,7 @@ public class TXJUnitTest {
     this.region.localInvalidate("key1"); // should be a noop since it is already invalid
     tx = txMgrImpl.internalSuspend();
     this.region.remove("key1"); // non-tx
-    txMgrImpl.resume(tx);
+    txMgrImpl.internalResume(tx);
     assertEquals(true, this.region.containsKey("key1"));
     assertEquals(false, this.region.containsValueForKey("key1"));
     txMgrImpl.commit();
@@ -5328,7 +5328,7 @@ public class TXJUnitTest {
     }
     tx = txMgrImpl.internalSuspend();
     this.region.create("key1", "value1"); // non-tx
-    txMgrImpl.resume(tx);
+    txMgrImpl.internalResume(tx);
     assertEquals(false, this.region.containsKey("key1"));
     txMgrImpl.commit();
     assertEquals(true, this.region.containsKey("key1"));
@@ -5344,7 +5344,7 @@ public class TXJUnitTest {
     }
     tx = txMgrImpl.internalSuspend();
     this.region.remove("key1"); // non-tx
-    txMgrImpl.resume(tx);
+    txMgrImpl.internalResume(tx);
     assertEquals(true, this.region.containsKey("key1"));
     txMgrImpl.commit();
     assertEquals(false, this.region.containsKey("key1"));
@@ -5366,7 +5366,7 @@ public class TXJUnitTest {
     this.region.put("key1", "value1");
     tx = txMgrImpl.internalSuspend();
     this.region.put("key1", "value2"); // do a non-tx put to force conflict
-    txMgrImpl.resume(tx);
+    txMgrImpl.internalResume(tx);
     try {
       txMgrImpl.commit();
       fail("expected CommitConflictException");
@@ -5389,7 +5389,7 @@ public class TXJUnitTest {
     this.region.put("key1", "value1");
     tx = txMgrImpl.internalSuspend();
     this.region.put("key1", "value2"); // do a non-tx put to force conflict
-    txMgrImpl.resume(tx);
+    txMgrImpl.internalResume(tx);
     try {
       txMgrImpl.commit();
       fail("expected CommitConflictException");
@@ -5410,7 +5410,7 @@ public class TXJUnitTest {
     this.region.create("key1", "value1");
     tx = txMgrImpl.internalSuspend();
     this.region.put("key1", "value2"); // do a non-tx put to force conflict
-    txMgrImpl.resume(tx);
+    txMgrImpl.internalResume(tx);
     try {
       txMgrImpl.commit();
       fail("expected CommitConflictException");
@@ -5433,7 +5433,7 @@ public class TXJUnitTest {
     this.region.localInvalidate("key1");
     tx = txMgrImpl.internalSuspend();
     this.region.put("key1", "value2"); // do a non-tx put to force conflict
-    txMgrImpl.resume(tx);
+    txMgrImpl.internalResume(tx);
     try {
       txMgrImpl.commit();
       fail("expected CommitConflictException");
@@ -5456,7 +5456,7 @@ public class TXJUnitTest {
     this.region.invalidate("key1");
     tx = txMgrImpl.internalSuspend();
     this.region.put("key1", "value2"); // do a non-tx put to force conflict
-    txMgrImpl.resume(tx);
+    txMgrImpl.internalResume(tx);
     try {
       txMgrImpl.commit();
       fail("expected CommitConflictException");
@@ -5470,7 +5470,7 @@ public class TXJUnitTest {
     this.region.create("newKey", "valueTX");
     tx = txMgrImpl.internalSuspend();
     this.region.create("newKey", "valueNONTX");
-    txMgrImpl.resume(tx);
+    txMgrImpl.internalResume(tx);
     this.region.destroy("newKey");
     assertTrue(!this.region.containsKey("key1"));
     try {
@@ -5486,7 +5486,7 @@ public class TXJUnitTest {
     this.region.create("newKey", "valueTX");
     tx = txMgrImpl.internalSuspend();
     this.region.create("newKey", "valueNONTX");
-    txMgrImpl.resume(tx);
+    txMgrImpl.internalResume(tx);
     this.region.localDestroy("newKey");
     assertTrue(!this.region.containsKey("key1"));
     try {
@@ -5510,7 +5510,7 @@ public class TXJUnitTest {
     this.region.localDestroy("key1");
     tx = txMgrImpl.internalSuspend();
     this.region.put("key1", "value2"); // do a non-tx put to force conflict
-    txMgrImpl.resume(tx);
+    txMgrImpl.internalResume(tx);
     try {
       txMgrImpl.commit();
       fail("expected CommitConflictException");
@@ -5532,7 +5532,7 @@ public class TXJUnitTest {
     this.region.destroy("key1");
     tx = txMgrImpl.internalSuspend();
     this.region.put("key1", "value2"); // do a non-tx put to force conflict
-    txMgrImpl.resume(tx);
+    txMgrImpl.internalResume(tx);
     try {
       txMgrImpl.commit();
       fail("expected CommitConflictException");
@@ -5551,7 +5551,7 @@ public class TXJUnitTest {
     this.region.put("key1", "txVal1");
     tx = txMgrImpl.internalSuspend();
     this.region.invalidate("key1");
-    txMgrImpl.resume(tx);
+    txMgrImpl.internalResume(tx);
     txMgrImpl.commit();
     assertEquals("txVal1", this.region.getEntry("key1").getValue());
     this.region.destroy("key1");
@@ -5561,7 +5561,7 @@ public class TXJUnitTest {
     this.region.create("key1", "value1");
     TXStateProxy tis = txMgrImpl.internalSuspend();
     this.region.localDestroyRegion(); // non-tx
-    txMgrImpl.resume(tis);
+    txMgrImpl.internalResume(tis);
 
     try {
       txMgrImpl.commit();
@@ -5842,7 +5842,7 @@ public class TXJUnitTest {
       assertLRUEntries(lruRegion.entrySet(false), lruSize, "key", LRUENTRY_INTEGER);
       assertNull(lruRegion.get("non-tx key0"));
 
-      txMgrImpl.resume(tx);
+      txMgrImpl.internalResume(tx);
       this.txMgr.commit();
       assertLRUEntries(lruRegion.entrySet(false), lruSize, "key", LRUENTRY_LONG);
     }
@@ -5885,7 +5885,7 @@ public class TXJUnitTest {
       assertLRUEntries(lruRegion.entrySet(false), lruSize, "key", LRUENTRY_NULL);
       assertNull(lruRegion.getEntry("non-tx key0"));
 
-      txMgrImpl.resume(tx);
+      txMgrImpl.internalResume(tx);
       this.txMgr.commit();
       assertLRUEntries(lruRegion.entrySet(false), lruSize, "key", LRUENTRY_STRING);
       Iterator it = lruRegion.keySet().iterator();
@@ -5946,13 +5946,13 @@ public class TXJUnitTest {
       assertNull(lruRegion.get("non-tx key0"));
       assertLRUEntries(lruRegion.entrySet(false), lruSize, "key", LRUENTRY_INTEGER);
 
-      txMgrImpl.resume(tx1);
+      txMgrImpl.internalResume(tx1);
       assertLRUEntries(lruRegion.entrySet(false), numToPut, "key", LRUENTRY_LONG);
       // Check to make sure no conflict was caused by non-TX put evictions
       // This should remove all references for each committed entry
       this.txMgr.commit();
       assertLRUEntries(lruRegion.entrySet(false), lruSize, "key", LRUENTRY_LONG);
-      txMgrImpl.resume(tx2);
+      txMgrImpl.internalResume(tx2);
       assertLRUEntries(lruRegion.entrySet(false), numToPut, "key", LRUENTRY_DOUBLE);
       this.txMgr.rollback();
       assertLRUEntries(lruRegion.entrySet(false), lruSize, "key", LRUENTRY_LONG);
@@ -5997,7 +5997,7 @@ public class TXJUnitTest {
       assertNull(lruRegion.get("non-tx key0"));
       assertLRUEntries(lruRegion.entrySet(false), lruSize, "key", LRUENTRY_INTEGER);
 
-      txMgrImpl.resume(tx);
+      txMgrImpl.internalResume(tx);
       assertLRUEntries(lruRegion.entrySet(false), numToPut, "key", LRUENTRY_LONG);
       // This should remove all references for each committed entry
       this.txMgr.rollback();
@@ -6037,7 +6037,7 @@ public class TXJUnitTest {
       // Cause a conflict
       lruRegion.put("key" + (numToPut - 1), new Integer(numToPut - 1));
 
-      txMgrImpl.resume(tx);
+      txMgrImpl.internalResume(tx);
       assertLRUEntries(lruRegion.entrySet(false), numToPut, "key", LRUENTRY_LONG);
       // This should remove all references for each committed entry
       try {
@@ -6143,7 +6143,7 @@ public class TXJUnitTest {
       assertNull(jtaTxMgr.getTransaction());
       this.region.put("syncKey3", "syncVal4");
       assertEquals("syncVal4", this.region.getEntry("syncKey3").getValue());
-      gfTxMgrImpl.resume(gfTx);
+      gfTxMgrImpl.internalResume(gfTx);
       try {
         jtaTxMgr.resume(jtaTx);
       } catch (Exception failure) {
@@ -6389,7 +6389,7 @@ public class TXJUnitTest {
       } catch (Exception failure) {
         fail("JTA resume failed");
       }
-      gfTxMgrImpl.resume(gfTx);
+      gfTxMgrImpl.internalResume(gfTx);
     }
     assertEquals("enlistVal", this.region.get("enlistKey"));
     try {
@@ -6837,7 +6837,7 @@ public class TXJUnitTest {
     TXStateProxy tx = ctm.internalSuspend();
     assertTrue(!pr.containsKey("stuff"));
     assertTrue(!r.containsKey("stuff"));
-    ctm.resume(tx);
+    ctm.internalResume(tx);
     ctm.commit();
     assertTrue(pr.containsKey("stuff"));
     assertTrue(r.containsKey("stuff"));

http://git-wip-us.apache.org/repos/asf/geode/blob/344f93df/geode-core/src/test/java/org/apache/geode/cache30/MultiVMRegionTestCase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/cache30/MultiVMRegionTestCase.java b/geode-core/src/test/java/org/apache/geode/cache30/MultiVMRegionTestCase.java
index c51c9cc..f57bc96 100644
--- a/geode-core/src/test/java/org/apache/geode/cache30/MultiVMRegionTestCase.java
+++ b/geode-core/src/test/java/org/apache/geode/cache30/MultiVMRegionTestCase.java
@@ -6345,7 +6345,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
         TXStateProxy tx = ((TXManagerImpl) txMgr).internalSuspend();
         assertTrue(rgn.containsKey("key"));
         assertEquals("LV 1", rgn.getEntry("key").getValue());
-        ((TXManagerImpl) txMgr).resume(tx);
+        ((TXManagerImpl) txMgr).internalResume(tx);
       }
       // make sure transactional view is still correct
       assertEquals("txValue", rgn.getEntry("key").getValue());
@@ -6394,7 +6394,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
         // do a get outside of the transaction to force a net load
         Object v3 = rgn.get("key3");
         assertEquals("LV 3", v3);
-        ((TXManagerImpl) txMgr).resume(tx);
+        ((TXManagerImpl) txMgr).internalResume(tx);
       }
       // make sure transactional view is still correct
       assertEquals("txValue3", rgn.getEntry("key3").getValue());
@@ -6452,7 +6452,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
         // do a get outside of the transaction to force a netsearch
         assertEquals("txValue", rgn.get("key")); // does a netsearch
         assertEquals("txValue", rgn.getEntry("key").getValue());
-        ((TXManagerImpl) txMgr).resume(tx);
+        ((TXManagerImpl) txMgr).internalResume(tx);
       }
       // make sure transactional view is still correct
       assertEquals("new txValue", rgn.getEntry("key").getValue());

http://git-wip-us.apache.org/repos/asf/geode/blob/344f93df/geode-core/src/test/java/org/apache/geode/internal/cache/ClientServerTransactionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/ClientServerTransactionDUnitTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/ClientServerTransactionDUnitTest.java
index 3771fa8..95c09b6 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/ClientServerTransactionDUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/ClientServerTransactionDUnitTest.java
@@ -738,7 +738,7 @@ public class ClientServerTransactionDUnitTest extends RemoteTransactionDUnitTest
             assertNull(pr.get(new CustId(i)));
           }
           org.apache.geode.test.dunit.LogWriterUtils.getLogWriter().info("resuming transaction");
-          mgr.resume(tx);
+          mgr.internalResume(tx);
         }
         assertEquals("r sized should be " + MAX_ENTRIES + " but it is:" + r.size(), MAX_ENTRIES,
             r.size());
@@ -839,7 +839,7 @@ public class ClientServerTransactionDUnitTest extends RemoteTransactionDUnitTest
         TXManagerImpl mgr = getGemfireCache().getTxManager();
         TXStateProxy tx = mgr.internalSuspend();
         assertNotNull(tx);
-        mgr.resume(tx);
+        mgr.internalResume(tx);
         if (commit) {
           mgr.commit();
         } else {
@@ -1622,7 +1622,7 @@ public class ClientServerTransactionDUnitTest extends RemoteTransactionDUnitTest
         TXStateProxy txState = mgr.internalSuspend();
         assertNull(pr.get(custId));
         assertNull(r.get(10));
-        mgr.resume(txState);
+        mgr.internalResume(txState);
         mgr.commit();
         return null;
       }
@@ -2373,7 +2373,7 @@ public class ClientServerTransactionDUnitTest extends RemoteTransactionDUnitTest
         assertEquals(new Customer("oldname1", "oldaddress1"), pr.get(new CustId(1)));
         assertNull(pr.get(new CustId(10)));
         assertNull(r.get(new CustId(10)));
-        mgr.resume(tx);
+        mgr.internalResume(tx);
         mgr.commit();
         assertEquals(new Customer("name0", "address0"), pr.get(new CustId(0)));
         assertEquals(new Customer("name1", "address1"), pr.get(new CustId(1)));
@@ -2440,7 +2440,7 @@ public class ClientServerTransactionDUnitTest extends RemoteTransactionDUnitTest
         final CountDownLatch latch = new CountDownLatch(1);
         Thread t = new Thread(new Runnable() {
           public void run() {
-            mgr.resume(txState);
+            mgr.internalResume(txState);
             mgr.commit();
             latch.countDown();
           }
@@ -2927,7 +2927,7 @@ public class ClientServerTransactionDUnitTest extends RemoteTransactionDUnitTest
                 }
               }
             });
-            mgr.resume(tx);
+            mgr.internalResume(tx);
             mgr.commit();
           }
         });

http://git-wip-us.apache.org/repos/asf/geode/blob/344f93df/geode-core/src/test/java/org/apache/geode/internal/cache/GemFireCacheImplTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/GemFireCacheImplTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/GemFireCacheImplTest.java
index 288a3e1..85bc6a9 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/GemFireCacheImplTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/GemFireCacheImplTest.java
@@ -27,6 +27,7 @@ import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
 import org.apache.geode.distributed.internal.InternalDistributedSystem;
+import org.apache.geode.internal.SystemTimer;
 import org.apache.geode.pdx.internal.TypeRegistry;
 import org.apache.geode.test.fake.Fakes;
 import org.apache.geode.test.junit.categories.UnitTest;
@@ -35,6 +36,28 @@ import org.apache.geode.test.junit.categories.UnitTest;
 public class GemFireCacheImplTest {
 
   @Test
+  public void checkPurgeCCPTimer() {
+    InternalDistributedSystem ds = Fakes.distributedSystem();
+    CacheConfig cc = new CacheConfig();
+    TypeRegistry typeRegistry = mock(TypeRegistry.class);
+    SystemTimer ccpTimer = mock(SystemTimer.class);
+    GemFireCacheImpl gfc = GemFireCacheImpl.createWithAsyncEventListeners(ds, cc, typeRegistry);
+    gfc.setCCPTimer(ccpTimer);
+    for (int i = 1; i < GemFireCacheImpl.PURGE_INTERVAL; i++) {
+      gfc.purgeCCPTimer();
+      verify(ccpTimer, times(0)).timerPurge();
+    }
+    gfc.purgeCCPTimer();
+    verify(ccpTimer, times(1)).timerPurge();
+    for (int i = 1; i < GemFireCacheImpl.PURGE_INTERVAL; i++) {
+      gfc.purgeCCPTimer();
+      verify(ccpTimer, times(1)).timerPurge();
+    }
+    gfc.purgeCCPTimer();
+    verify(ccpTimer, times(2)).timerPurge();
+  }
+
+  @Test
   public void checkThatAsyncEventListenersUseAllThreadsInPool() {
     InternalDistributedSystem ds = Fakes.distributedSystem();
     CacheConfig cc = new CacheConfig();

http://git-wip-us.apache.org/repos/asf/geode/blob/344f93df/geode-core/src/test/java/org/apache/geode/internal/cache/RemoteTransactionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/RemoteTransactionDUnitTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/RemoteTransactionDUnitTest.java
index 751bcd1..bc8bfb6 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/RemoteTransactionDUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/RemoteTransactionDUnitTest.java
@@ -555,7 +555,7 @@ public class RemoteTransactionDUnitTest extends JUnit4CacheTestCase {
         TXManagerImpl mgr = getGemfireCache().getTxManager();
         TXStateProxy tx = mgr.internalSuspend();
         assertNotNull(tx);
-        mgr.resume(tx);
+        mgr.internalResume(tx);
         if (commit) {
           mgr.commit();
         } else {
@@ -662,7 +662,7 @@ public class RemoteTransactionDUnitTest extends JUnit4CacheTestCase {
         assertTrue(cust.containsKey(new CustId(8)));
         TXStateProxy tx = ((TXManagerImpl) mgr).internalSuspend();
         assertFalse(cust.containsKey(new CustId(8)));
-        ((TXManagerImpl) mgr).resume(tx);
+        ((TXManagerImpl) mgr).internalResume(tx);
         mgr.commit();
         Customer s2 = (Customer) cust.get(new CustId(8));
         Customer ex = new Customer("sup dawg", "add");
@@ -935,7 +935,7 @@ public class RemoteTransactionDUnitTest extends JUnit4CacheTestCase {
         TXStateProxy tx = mgr.internalSuspend();
         assertNull(cust.get(newCustId));
         assertNull(rr.get(newCustId));
-        mgr.resume(tx);
+        mgr.internalResume(tx);
         cust.put(oldCustId, new Customer("foo", "bar"));
         rr.put(oldCustId, new Customer("foo", "bar"));
         return mgr.getTransactionId();
@@ -980,7 +980,7 @@ public class RemoteTransactionDUnitTest extends JUnit4CacheTestCase {
         cust.putIfAbsent(conflictCust, new Customer("name11", "address11"));
         TXStateProxy tx = mgr.internalSuspend();
         cust.put(conflictCust, new Customer("foo", "bar"));
-        mgr.resume(tx);
+        mgr.internalResume(tx);
         try {
           mgr.commit();
           fail("expected exception not thrown");
@@ -1020,7 +1020,7 @@ public class RemoteTransactionDUnitTest extends JUnit4CacheTestCase {
         TXStateProxy tx = mgr.internalSuspend();
         assertNotNull(cust.get(custId));
         assertNotNull(ref.get(custId));
-        mgr.resume(tx);
+        mgr.internalResume(tx);
         return mgr.getTransactionId();
       }
     });
@@ -1060,7 +1060,7 @@ public class RemoteTransactionDUnitTest extends JUnit4CacheTestCase {
         assertTrue(cust.remove(conflictCust, customer));
         TXStateProxy tx = mgr.internalSuspend();
         cust.put(conflictCust, new Customer("foo", "bar"));
-        mgr.resume(tx);
+        mgr.internalResume(tx);
         try {
           mgr.commit();
           fail("expected exception not thrown");
@@ -1096,7 +1096,7 @@ public class RemoteTransactionDUnitTest extends JUnit4CacheTestCase {
         TXStateProxy tx = mgr.internalSuspend();
         assertNotNull(cust.get(custId1));
         assertNotNull(ref.get(custId2));
-        mgr.resume(tx);
+        mgr.internalResume(tx);
         return mgr.getTransactionId();
       }
     });
@@ -1141,7 +1141,7 @@ public class RemoteTransactionDUnitTest extends JUnit4CacheTestCase {
         cust.put(custId20, new Customer("foo", "bar"));
         assertNotNull(cust.get(custId20));
         cust.put(custId4, new Customer("foo", "bar"));
-        mgr.resume(tx);
+        mgr.internalResume(tx);
         try {
           mgr.commit();
           fail("expected exception not thrown");
@@ -1158,7 +1158,7 @@ public class RemoteTransactionDUnitTest extends JUnit4CacheTestCase {
         cust.removeAll(Arrays.asList(custId2, custId3));
         tx = mgr.internalSuspend();
         cust.put(custId2, new Customer("foo", "bar"));
-        mgr.resume(tx);
+        mgr.internalResume(tx);
         mgr.commit();
         assertNotNull(cust.get(custId2));
         assertNull(cust.get(custId3));
@@ -1286,7 +1286,7 @@ public class RemoteTransactionDUnitTest extends JUnit4CacheTestCase {
         TXStateProxy tx = mgr.internalSuspend();
         assertEquals(cust.get(custId), customer);
         assertEquals(ref.get(custId), customer);
-        mgr.resume(tx);
+        mgr.internalResume(tx);
         return mgr.getTransactionId();
       }
     });
@@ -1326,7 +1326,7 @@ public class RemoteTransactionDUnitTest extends JUnit4CacheTestCase {
         assertTrue(cust.replace(conflictCust, customer, new Customer("conflict", "conflict")));
         TXStateProxy tx = mgr.internalSuspend();
         cust.put(conflictCust, new Customer("foo", "bar"));
-        mgr.resume(tx);
+        mgr.internalResume(tx);
         try {
           mgr.commit();
           fail("expected exception not thrown");
@@ -2209,7 +2209,7 @@ public class RemoteTransactionDUnitTest extends JUnit4CacheTestCase {
         assertEquals(getCustIdSet(5), rr.keySet());
         assertEquals(5, rr.keySet().size());
         assertNull(rr.get(custId));
-        mgr.resume(tx);
+        mgr.internalResume(tx);
         mgr.commit();
         return null;
       }
@@ -2259,7 +2259,7 @@ public class RemoteTransactionDUnitTest extends JUnit4CacheTestCase {
         assertEquals(getCustomerSet(5), rr.values());
         assertEquals(5, rr.values().size());
         assertNull(rr.get(custId));
-        mgr.resume(tx);
+        mgr.internalResume(tx);
         mgr.commit();
         return null;
       }
@@ -2309,7 +2309,7 @@ public class RemoteTransactionDUnitTest extends JUnit4CacheTestCase {
         // assertIndexDetailsEquals(getCustIdSet(5), rr.entrySet());
         assertEquals(5, rr.entrySet().size());
         assertNull(rr.get(custId));
-        mgr.resume(tx);
+        mgr.internalResume(tx);
         mgr.commit();
         return null;
       }
@@ -2525,7 +2525,7 @@ public class RemoteTransactionDUnitTest extends JUnit4CacheTestCase {
         TXStateProxy tx = mgr.internalSuspend();
         GemFireCacheImpl.getInstance().getLogger().warning("TX SUSPENDO:" + tx);
         assertNull(custRegion.get(expectedCustId));
-        mgr.resume(tx);
+        mgr.internalResume(tx);
         return null;
       }
     });
@@ -2570,7 +2570,7 @@ public class RemoteTransactionDUnitTest extends JUnit4CacheTestCase {
         }
         TXStateProxy tx = mgr.internalSuspend();
         custRegion.put(expectedCustId, new Customer("Cust6", "updated6"));
-        mgr.resume(tx);
+        mgr.internalResume(tx);
         try {
           mgr.commit();
           fail("expected commit conflict not thrown");
@@ -2719,7 +2719,7 @@ public class RemoteTransactionDUnitTest extends JUnit4CacheTestCase {
         getGemfireCache().getLogger().fine("SWAP:callingget");
         assertNull("expected null but was:" + custRegion.get(expectedCustId),
             custRegion.get(expectedCustId));
-        mgr.resume(tx);
+        mgr.internalResume(tx);
         mgr.commit();
         assertEquals(expectedCustomer, custRegion.get(expectedCustId));
         return null;
@@ -2746,7 +2746,7 @@ public class RemoteTransactionDUnitTest extends JUnit4CacheTestCase {
         }).getResult();
         TXStateProxy tx = mgr.internalSuspend();
         assertEquals(custRegion.get(expectedCustId), expectedCustomer);
-        mgr.resume(tx);
+        mgr.internalResume(tx);
         mgr.commit();
         assertNull(custRegion.get(expectedCustId));
         return null;
@@ -2789,7 +2789,7 @@ public class RemoteTransactionDUnitTest extends JUnit4CacheTestCase {
         assertEquals(expectedCustomer, custRegion.get(expectedCustId));
         TXStateProxy tx = mgr.internalSuspend();
         assertNull(custRegion.get(expectedCustId));
-        mgr.resume(tx);
+        mgr.internalResume(tx);
         return null;
       }
     });
@@ -2841,7 +2841,7 @@ public class RemoteTransactionDUnitTest extends JUnit4CacheTestCase {
         assertEquals(expectedCustomer, pr.get(expectedCustId));
         TXStateProxy tx = mgr.internalSuspend();
         assertNull(pr.get(expectedCustId));
-        mgr.resume(tx);
+        mgr.internalResume(tx);
         return null;
       }
     });
@@ -2880,7 +2880,7 @@ public class RemoteTransactionDUnitTest extends JUnit4CacheTestCase {
         assertEquals(expectedCustomer, pr.get(expectedCustId));
         TXStateProxy tx = mgr.internalSuspend();
         assertNull(pr.get(expectedCustId));
-        mgr.resume(tx);
+        mgr.internalResume(tx);
         return null;
       }
     };
@@ -3094,7 +3094,7 @@ public class RemoteTransactionDUnitTest extends JUnit4CacheTestCase {
         TXManagerImpl mgr = getGemfireCache().getTxManager();
         TXStateProxy tx = mgr.internalSuspend();
         assertNotNull(tx);
-        mgr.resume(tx);
+        mgr.internalResume(tx);
         mgr.commit();
         return null;
       }
@@ -3107,7 +3107,7 @@ public class RemoteTransactionDUnitTest extends JUnit4CacheTestCase {
         TXManagerImpl mgr = getGemfireCache().getTxManager();
         TXStateProxy tx = mgr.internalSuspend();
         assertNotNull(tx);
-        mgr.resume(tx);
+        mgr.internalResume(tx);
         mgr.commit();
         return null;
       }
@@ -3121,7 +3121,7 @@ public class RemoteTransactionDUnitTest extends JUnit4CacheTestCase {
         TXManagerImpl mgr = getGemfireCache().getTxManager();
         TXStateProxy tx = mgr.internalSuspend();
         assertNotNull(tx);
-        mgr.resume(tx);
+        mgr.internalResume(tx);
         mgr.commit();
         return null;
       }
@@ -3165,7 +3165,7 @@ public class RemoteTransactionDUnitTest extends JUnit4CacheTestCase {
         TXManagerImpl mgr = getGemfireCache().getTxManager();
         TXStateProxy tx = mgr.internalSuspend();
         assertNotNull(tx);
-        mgr.resume(tx);
+        mgr.internalResume(tx);
         mgr.commit();
         return null;
       }

http://git-wip-us.apache.org/repos/asf/geode/blob/344f93df/geode-core/src/test/java/org/apache/geode/internal/cache/TransactionsWithDeltaDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/TransactionsWithDeltaDUnitTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/TransactionsWithDeltaDUnitTest.java
index c6aa376..c3aa056 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/TransactionsWithDeltaDUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/TransactionsWithDeltaDUnitTest.java
@@ -367,7 +367,7 @@ public class TransactionsWithDeltaDUnitTest extends JUnit4CacheTestCase {
         assertEquals("updatedName", pr.get(cust1).getName());
         TXStateProxy tx = mgr.internalSuspend();
         assertEquals("name1", pr.get(cust1).getName());
-        mgr.resume(tx);
+        mgr.internalResume(tx);
         mgr.commit();
         assertTrue(c.isToDeltaCalled());
         assertEquals(c, pr.get(cust1));

http://git-wip-us.apache.org/repos/asf/geode/blob/344f93df/geode-core/src/test/java/org/apache/geode/internal/cache/execute/MyTransactionFunction.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/execute/MyTransactionFunction.java b/geode-core/src/test/java/org/apache/geode/internal/cache/execute/MyTransactionFunction.java
index 9a0f3e6..0970836 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/execute/MyTransactionFunction.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/execute/MyTransactionFunction.java
@@ -420,7 +420,7 @@ public class MyTransactionFunction implements Function {
     Assert.assertTrue(lr instanceof BucketRegion);
     TXRegionState txRegion = txState.readRegion(lr);
     TXEntryState txEntry = txRegion.readEntry(txRegion.getEntryKeys().iterator().next());
-    mImp.resume(txState);
+    mImp.internalResume(txState);
     orderPR.put(vOrderId, new Order("foo"));
     txState = mImp.internalSuspend();
     // since both puts were on same key, verify that
@@ -436,7 +436,7 @@ public class MyTransactionFunction implements Function {
     orderPR.put(vOrderId, new Order("foobar"));
     mImp.commit();
     // now begin the first
-    mImp.resume(txState);
+    mImp.internalResume(txState);
     boolean caughtException = false;
     try {
       mImp.commit();
@@ -462,7 +462,7 @@ public class MyTransactionFunction implements Function {
     Assert.assertTrue(cust.equals(custPR.get(custId)));
     TXStateProxy txState = mImp.internalSuspend();
     Assert.assertTrue(custPR.get(custId) == null);
-    mImp.resume(txState);
+    mImp.internalResume(txState);
     mImp.commit();
     // change value
     mImp.begin();
@@ -471,7 +471,7 @@ public class MyTransactionFunction implements Function {
     txState = mImp.internalSuspend();
     Customer newCust = new Customer("fooNew", "barNew");
     custPR.put(custId, newCust);
-    mImp.resume(txState);
+    mImp.internalResume(txState);
     Assert.assertTrue(oldCust.equals(custPR.get(custId)));
     mImp.commit();
   }


Mime
View raw message