geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From upthewatersp...@apache.org
Subject [4/4] incubator-geode git commit: GEODE-1422: Removing check to skip enqueuing temp events
Date Mon, 13 Jun 2016 17:51:10 GMT
GEODE-1422: Removing check to skip enqueuing temp events

This check was performed outside of synchronizing on the lock, which
means that some events could be added to the temp events after the
check. This caused the test to fail due to temp events being left in the
map.

Also, fixing two race conditions in testParallelPropagationSenderStartAfterStop_Scenario2

1) It did some puts and stopped the sender without waiting for the
puts to complete. So they may not be available on the remote side

2) It started some puts asynchronously, and then started the sender
later. The puts performed before the sender started may not be present
on the remote side.


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

Branch: refs/heads/develop
Commit: be0f7cfb396d1f55301ad75bd5398c3d482d193d
Parents: 615e643
Author: Dan Smith <upthewaterspout@apache.org>
Authored: Thu Jun 9 11:56:58 2016 -0700
Committer: Dan Smith <upthewaterspout@apache.org>
Committed: Mon Jun 13 10:45:14 2016 -0700

----------------------------------------------------------------------
 .../asyncqueue/internal/ParallelAsyncEventQueueImpl.java    | 4 +---
 .../cache/wan/parallel/ParallelGatewaySenderImpl.java       | 4 +---
 .../parallel/ParallelGatewaySenderOperationsDUnitTest.java  | 9 +++++----
 3 files changed, 7 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/be0f7cfb/geode-core/src/main/java/com/gemstone/gemfire/cache/asyncqueue/internal/ParallelAsyncEventQueueImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/asyncqueue/internal/ParallelAsyncEventQueueImpl.java
b/geode-core/src/main/java/com/gemstone/gemfire/cache/asyncqueue/internal/ParallelAsyncEventQueueImpl.java
index aa3e71c..4b708b8 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/cache/asyncqueue/internal/ParallelAsyncEventQueueImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/cache/asyncqueue/internal/ParallelAsyncEventQueueImpl.java
@@ -112,9 +112,7 @@ public class ParallelAsyncEventQueueImpl extends AbstractGatewaySender
{
       
       logger.info(LocalizedMessage.create(LocalizedStrings.ParallelGatewaySenderImpl_STARTED__0,
this));
       
-      if (!tmpQueuedEvents.isEmpty()) {
-        enqueueTempEvents();
-      }
+      enqueueTempEvents();
     }
     finally {
       this.getLifeCycleLock().writeLock().unlock();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/be0f7cfb/geode-wan/src/main/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderImpl.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/main/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderImpl.java
b/geode-wan/src/main/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderImpl.java
index b313403..8f5b728 100644
--- a/geode-wan/src/main/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderImpl.java
+++ b/geode-wan/src/main/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderImpl.java
@@ -111,9 +111,7 @@ public class ParallelGatewaySenderImpl extends AbstractRemoteGatewaySender
{
       
       logger.info(LocalizedMessage.create(LocalizedStrings.ParallelGatewaySenderImpl_STARTED__0,
this));
       
-      if (!tmpQueuedEvents.isEmpty()) {
-        enqueueTempEvents();
-      }
+      enqueueTempEvents();
     }
     finally {
       this.getLifeCycleLock().writeLock().unlock();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/be0f7cfb/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderOperationsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderOperationsDUnitTest.java
b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderOperationsDUnitTest.java
index cda5ba3..a1036f4 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderOperationsDUnitTest.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderOperationsDUnitTest.java
@@ -323,7 +323,11 @@ public class ParallelGatewaySenderOperationsDUnitTest extends WANTestBase
{
     vm4.invoke(() -> WANTestBase.doPuts( getTestMethodName() + "_PR", 200 ));
     
     LogWriterUtils.getLogWriter().info("Done few puts");
-    
+
+    //Make sure the puts make it to the remote side
+    vm2.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() + "_PR", 200,
120000));
+    vm3.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() + "_PR", 200,
120000));
+
     //now, stop all of the senders
     stopSenders();
     
@@ -350,9 +354,6 @@ public class ParallelGatewaySenderOperationsDUnitTest extends WANTestBase
{
     
     async.join();
 
-    vm2.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() + "_PR", 5000,
120000));
-    vm3.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() + "_PR", 5000,
120000));
-    
     //verify all the buckets on all the sender nodes are drained
     validateParallelSenderQueueAllBucketsDrained();
     


Mime
View raw message