geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dschnei...@apache.org
Subject incubator-geode git commit: GEODE-471: figure out why entry is not expiring
Date Fri, 23 Oct 2015 23:09:11 GMT
Repository: incubator-geode
Updated Branches:
  refs/heads/feature/GEODE-409 6aadbf81c -> 2aec6a54b


GEODE-471: figure out why entry is not expiring

Enhanced the test to do additional validation.


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

Branch: refs/heads/feature/GEODE-409
Commit: 2aec6a54b9aa71d06b195e57991d0134cd2af096
Parents: 6aadbf8
Author: Darrel Schneider <dschneider@pivotal.io>
Authored: Fri Oct 23 16:03:36 2015 -0700
Committer: Darrel Schneider <dschneider@pivotal.io>
Committed: Fri Oct 23 16:03:36 2015 -0700

----------------------------------------------------------------------
 .../gemstone/gemfire/internal/cache/AbstractRegionMap.java    | 1 +
 .../src/test/java/com/gemstone/gemfire/TXExpiryJUnitTest.java | 2 +-
 .../gemfire/internal/cache/RemoteTransactionDUnitTest.java    | 7 +++++--
 3 files changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/2aec6a54/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegionMap.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegionMap.java
b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegionMap.java
index 494efaf..515a690 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegionMap.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegionMap.java
@@ -1649,6 +1649,7 @@ RETRY_LOOP:
                 retry = true;
                 continue RETRY_LOOP;
               }
+              logger.info("DARREL: destroy " + re.getKey() + " event.isOriginRemote()=" +
event.isOriginRemote() + " event.getOperation().isExpiration()=" + event.getOperation().isExpiration()
+ " re.isInUseByTransaction()=" + re.isInUseByTransaction());
               if (!event.isOriginRemote() && event.getOperation().isExpiration())
{
                 // If this expiration started locally then only do it if the RE is not being
used by a tx.
                 if (re.isInUseByTransaction()) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/2aec6a54/gemfire-core/src/test/java/com/gemstone/gemfire/TXExpiryJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/TXExpiryJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/TXExpiryJUnitTest.java
index 514d45b..76008bd 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/TXExpiryJUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/TXExpiryJUnitTest.java
@@ -242,7 +242,7 @@ public class TXExpiryJUnitTest {
     DistributedTestCase.waitForCriterion(waitForExpire, 3000, 10, true);
   }
   
-  private void waitForEntryExpiration(LocalRegion lr, String key) {
+  public static void waitForEntryExpiration(LocalRegion lr, String key) {
     try {
       ExpirationDetector detector;
       do {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/2aec6a54/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/RemoteTransactionDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/RemoteTransactionDUnitTest.java
b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/RemoteTransactionDUnitTest.java
index ccff0c6..c1b77c7 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/RemoteTransactionDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/RemoteTransactionDUnitTest.java
@@ -23,6 +23,7 @@ import javax.transaction.RollbackException;
 import javax.transaction.Status;
 import javax.transaction.UserTransaction;
 
+import com.gemstone.gemfire.TXExpiryJUnitTest;
 import com.gemstone.gemfire.cache.AttributesFactory;
 import com.gemstone.gemfire.cache.AttributesMutator;
 import com.gemstone.gemfire.cache.CacheEvent;
@@ -4083,13 +4084,15 @@ protected static class ClientListener extends CacheListenerAdapter
{
         ExpiryTask.suspendExpiration();
         Region.Entry entry = null;
         long tilt;
+        EntryExpiryTask eet;
         try {
           r.put("key", "value");
+          LocalRegion lr = (LocalRegion) r;
           r.put("nonTXkey", "nonTXvalue");
           getCache().getCacheTransactionManager().begin();
           r.put("key", "newvalue");
-        } 
-        finally {
+          TXExpiryJUnitTest.waitForEntryExpiration(lr, "key");
+        } finally {
           ExpiryTask.permitExpiration();
         }
         TransactionId tx = getCache().getCacheTransactionManager().suspend();


Mime
View raw message