You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by bs...@apache.org on 2015/10/14 18:07:27 UTC

[1/6] incubator-geode git commit: GEODE-372: Change FindBugs reportLevel to 'low' so all bugs are reported

Repository: incubator-geode
Updated Branches:
  refs/heads/feature/GEODE-77 9f556046e -> 4f1a943f5


GEODE-372: Change FindBugs reportLevel to 'low' so all bugs are reported


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

Branch: refs/heads/feature/GEODE-77
Commit: 48360fe7e3ceb4cf22e3754dadaa276d043091e3
Parents: e1c2d8e
Author: Mark Bretl <mb...@pivotal.io>
Authored: Thu Sep 24 15:40:34 2015 -0700
Committer: Mark Bretl <mb...@pivotal.io>
Committed: Mon Sep 28 15:33:19 2015 -0700

----------------------------------------------------------------------
 build.gradle | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/48360fe7/build.gradle
----------------------------------------------------------------------
diff --git a/build.gradle b/build.gradle
index d7b4965..eda7642 100755
--- a/build.gradle
+++ b/build.gradle
@@ -160,7 +160,7 @@ subprojects {
         dep.transitive = true
       }
       findbugs.effort = 'max'
-      findbugs.reportLevel = 'high'
+      findbugs.reportLevel = 'low'
     }
  
     tasks.withType(FindBugs) {


[5/6] incubator-geode git commit: [GEODE-329] fix ShutdownAllDUnitTest failure

Posted by bs...@apache.org.
[GEODE-329] fix ShutdownAllDUnitTest failure

There's a race condition that there will be 2 distributed systems are
created in one JVM.

When a DS is disconnecting, the current thread stays in wait(500) and
release the lock. Thread2 comes and found a disconnected DS, so it will
create a new DS. When the current thread waked up, it should double check
if the DS has been changed.


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

Branch: refs/heads/feature/GEODE-77
Commit: 27eceb1f49647df2207bcc966ba11631a4f5832e
Parents: f50ca04
Author: zhouxh <gz...@pivotal.io>
Authored: Mon Sep 21 14:56:17 2015 -0700
Committer: zhouxh <gz...@pivotal.io>
Committed: Tue Sep 29 15:21:55 2015 -0700

----------------------------------------------------------------------
 .../gemfire/distributed/DistributedSystem.java  | 38 ++++++++++----------
 1 file changed, 20 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/27eceb1f/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/DistributedSystem.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/DistributedSystem.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/DistributedSystem.java
index b7b2cd8..21be43f 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/DistributedSystem.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/DistributedSystem.java
@@ -1584,32 +1584,34 @@ public abstract class DistributedSystem implements StatisticsFactory {
         }
 
       } else {
-        if (!existingSystems.isEmpty()) {
+        boolean existingSystemDisconnecting = true;
+        while (!existingSystems.isEmpty() && existingSystemDisconnecting) {
           Assert.assertTrue(existingSystems.size() == 1);
 
           InternalDistributedSystem existingSystem =
-            (InternalDistributedSystem) existingSystems.get(0);
-          if (existingSystem.isDisconnecting()) {
-            while (existingSystem.isConnected()) {
-              boolean interrupted = Thread.interrupted();
-              try {
-                existingSystemsLock.wait(500);
-              } 
-              catch (InterruptedException ex) {
-                interrupted = true;
-              }
-              finally {
-                if (interrupted) {
-                  Thread.currentThread().interrupt();
-                }
+              (InternalDistributedSystem) existingSystems.get(0);
+          existingSystemDisconnecting = existingSystem.isDisconnecting();
+          if (existingSystemDisconnecting) {
+            boolean interrupted = Thread.interrupted();
+            try {
+              // no notify for existingSystemsLock, just to release the sync
+              existingSystemsLock.wait(50);
+            } 
+            catch (InterruptedException ex) {
+              interrupted = true;
+            }
+            finally {
+              if (interrupted) {
+                Thread.currentThread().interrupt();
               }
             }
-          }
-
-          if (existingSystem.isConnected()) {
+          } else if (existingSystem.isConnected()) {
             existingSystem.validateSameProperties(config,
                 existingSystem.isConnected());
             return existingSystem;
+          } else {
+          // This should not happen: existingSystem.isConnected()==false && existingSystem.isDisconnecting()==false 
+            throw new AssertionError("system should not be disconnecting==false and isConnected==falsed");
           }
         }
       }


[4/6] incubator-geode git commit: GEODE-350: fixing suspect string from testReplaceOfflineMemberAndRestartCreateColocatedPRLate

Posted by bs...@apache.org.
GEODE-350: fixing suspect string from testReplaceOfflineMemberAndRestartCreateColocatedPRLate

This test shuts down members, so it's reasonable to see a
RegionDestroyedException in the logs.


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

Branch: refs/heads/feature/GEODE-77
Commit: 9a027efba471ee96f015d35d0d292cd416b2e73e
Parents: 48360fe
Author: Dan Smith <up...@apache.org>
Authored: Thu Sep 24 15:55:06 2015 -0700
Committer: Dan Smith <up...@apache.org>
Committed: Tue Sep 29 13:11:27 2015 -0700

----------------------------------------------------------------------
 .../partitioned/PersistentColocatedPartitionedRegionDUnitTest.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/9a027efb/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PersistentColocatedPartitionedRegionDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PersistentColocatedPartitionedRegionDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PersistentColocatedPartitionedRegionDUnitTest.java
index 4dcc2cb..8e45a8f 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PersistentColocatedPartitionedRegionDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PersistentColocatedPartitionedRegionDUnitTest.java
@@ -797,7 +797,7 @@ public class PersistentColocatedPartitionedRegionDUnitTest extends
    */
   public void replaceOfflineMemberAndRestartCreateColocatedPRLate(SerializableRunnable createParentPR, SerializableRunnable createChildPR) throws Throwable {
     addExpectedException("PartitionOfflineException");
-    addExpectedException("PartitionOfflineException");
+    addExpectedException("RegionDestroyedException");
     Host host = Host.getHost(0);
     VM vm0 = host.getVM(0);
     VM vm1 = host.getVM(1);


[6/6] incubator-geode git commit: Merge branch 'develop' into feature/GEODE-77

Posted by bs...@apache.org.
Merge branch 'develop' into feature/GEODE-77


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

Branch: refs/heads/feature/GEODE-77
Commit: 4f1a943f521efcf2c23ef40396608782240437c8
Parents: 9f55604 27eceb1
Author: Bruce Schuchardt <bs...@pivotal.io>
Authored: Tue Oct 13 12:46:05 2015 -0700
Committer: Bruce Schuchardt <bs...@pivotal.io>
Committed: Tue Oct 13 12:46:05 2015 -0700

----------------------------------------------------------------------
 build.gradle                                    |  2 +-
 .../client/internal/ConnectionFactoryImpl.java  |  7 ++--
 .../cache/client/internal/ConnectionImpl.java   |  6 ++--
 .../gemfire/distributed/DistributedSystem.java  | 38 ++++++++++----------
 .../batterytest/greplogs/ExpectedStrings.java   |  1 +
 ...tentColocatedPartitionedRegionDUnitTest.java |  2 +-
 6 files changed, 29 insertions(+), 27 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4f1a943f/build.gradle
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4f1a943f/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/DistributedSystem.java
----------------------------------------------------------------------


[2/6] incubator-geode git commit: GEODE-352: Ingoring SocketTimeoutException in dunit runs

Posted by bs...@apache.org.
GEODE-352: Ingoring SocketTimeoutException in dunit runs

I believe this may also be the root cause of GEODE-270, GEODE-355,
GEODE-298, and GEODE-326.

The problem is that during tearDown, we start shutting down the cache
servers first, resulting in connectivity errors on the client.


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

Branch: refs/heads/feature/GEODE-77
Commit: f50ca04c9e8f30f290851a3cd419f2a834b5c6e2
Parents: 9ecb91a
Author: Dan Smith <up...@apache.org>
Authored: Thu Sep 24 16:18:30 2015 -0700
Committer: Dan Smith <up...@apache.org>
Committed: Tue Sep 29 13:11:27 2015 -0700

----------------------------------------------------------------------
 .../src/test/java/batterytest/greplogs/ExpectedStrings.java         | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f50ca04c/gemfire-core/src/test/java/batterytest/greplogs/ExpectedStrings.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/batterytest/greplogs/ExpectedStrings.java b/gemfire-core/src/test/java/batterytest/greplogs/ExpectedStrings.java
index 3bb47d4..1888fbe 100644
--- a/gemfire-core/src/test/java/batterytest/greplogs/ExpectedStrings.java
+++ b/gemfire-core/src/test/java/batterytest/greplogs/ExpectedStrings.java
@@ -146,6 +146,7 @@ public class ExpectedStrings {
       expected.add(Pattern.compile("Could not find any server to create redundant client"));
       expected.add(Pattern.compile("Could not find any server to create primary client"));
       expected.add(Pattern.compile("Pool unexpected closed socket on server"));
+      expected.add(Pattern.compile("SocketTimeoutException"));
       expected.add(Pattern.compile("Could not initialize a primary queue on startup"));
       expected.add(Pattern.compile("java.lang.IllegalArgumentException: Sample timestamp must be greater than previous timestamp"));
       //The following 2 strings are ignored due to bug 52042


[3/6] incubator-geode git commit: GEODE-352: Fixing NPEs seen in the logs for PRClientServer tests

Posted by bs...@apache.org.
GEODE-352: Fixing NPEs seen in the logs for PRClientServer tests

Some code that was added to the client server handshake was looking up
connected distributed system when one might be in the process of being
closed.


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

Branch: refs/heads/feature/GEODE-77
Commit: 9ecb91a0e65f9bb6295bde30832b88b35a4badf9
Parents: 9a027ef
Author: Dan Smith <up...@apache.org>
Authored: Thu Sep 24 16:05:18 2015 -0700
Committer: Dan Smith <up...@apache.org>
Committed: Tue Sep 29 13:11:27 2015 -0700

----------------------------------------------------------------------
 .../gemfire/cache/client/internal/ConnectionFactoryImpl.java  | 7 +++----
 .../gemfire/cache/client/internal/ConnectionImpl.java         | 6 +++---
 2 files changed, 6 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/9ecb91a0/gemfire-core/src/main/java/com/gemstone/gemfire/cache/client/internal/ConnectionFactoryImpl.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/client/internal/ConnectionFactoryImpl.java b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/client/internal/ConnectionFactoryImpl.java
index 7538b04..02a1fc0 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/client/internal/ConnectionFactoryImpl.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/client/internal/ConnectionFactoryImpl.java
@@ -20,9 +20,8 @@ import com.gemstone.gemfire.cache.client.ServerRefusedConnectionException;
 import com.gemstone.gemfire.cache.client.internal.ServerBlackList.FailureTracker;
 import com.gemstone.gemfire.cache.wan.GatewaySender;
 import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.PoolCancelledException;
+import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
 import com.gemstone.gemfire.distributed.internal.ServerLocation;
-import com.gemstone.gemfire.internal.cache.PoolManagerImpl;
 import com.gemstone.gemfire.internal.cache.tier.Acceptor;
 import com.gemstone.gemfire.internal.cache.tier.sockets.CacheClientUpdater;
 import com.gemstone.gemfire.internal.cache.tier.sockets.ClientProxyMembershipID;
@@ -54,7 +53,7 @@ public class ConnectionFactoryImpl implements ConnectionFactory {
   private final CancelCriterion cancelCriterion;
   private ConnectionSource source;
   private int readTimeout;
-  private DistributedSystem ds;
+  private InternalDistributedSystem ds;
   private EndpointManager endpointManager;
   private GatewaySender gatewaySender;
   private PoolImpl pool;
@@ -67,7 +66,7 @@ public class ConnectionFactoryImpl implements ConnectionFactory {
   public static boolean testFailedConnectionToServer = false;
     
   public ConnectionFactoryImpl(ConnectionSource source,
-      EndpointManager endpointManager, DistributedSystem sys,
+      EndpointManager endpointManager, InternalDistributedSystem sys,
       int socketBufferSize, int handShakeTimeout, int readTimeout,
       ClientProxyMembershipID proxyId, CancelCriterion cancelCriterion,
       boolean usedByGateway, GatewaySender sender,long pingInterval,

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/9ecb91a0/gemfire-core/src/main/java/com/gemstone/gemfire/cache/client/internal/ConnectionImpl.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/client/internal/ConnectionImpl.java b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/client/internal/ConnectionImpl.java
index 43cff54..749a765 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/client/internal/ConnectionImpl.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/client/internal/ConnectionImpl.java
@@ -71,7 +71,7 @@ public class ConnectionImpl implements Connection {
   private short wanSiteVersion = -1;//In Gateway communication version of connected wan site
                                    //will be stored after successful handshake
 //  private final CancelCriterion cancelCriterion;
-  private final DistributedSystem ds;
+  private final InternalDistributedSystem ds;
 
   private OutputStream out;
   private InputStream in;
@@ -80,7 +80,7 @@ public class ConnectionImpl implements Connection {
 
   private HandShake handShake;
 
-  public ConnectionImpl(DistributedSystem ds, CancelCriterion cancelCriterion) {
+  public ConnectionImpl(InternalDistributedSystem ds, CancelCriterion cancelCriterion) {
 //    this.cancelCriterion = cancelCriterion;
     this.ds = ds;
   }
@@ -90,7 +90,7 @@ public class ConnectionImpl implements Connection {
       int handShakeTimeout, int readTimeout, byte communicationMode, GatewaySender sender)
       throws IOException {
     SocketCreator sc = SocketCreator.getDefaultInstance();
-    DistributionConfig config = InternalDistributedSystem.getConnectedInstance().getConfig();
+    DistributionConfig config = ds.getConfig();
     if (communicationMode == Acceptor.GATEWAY_TO_GATEWAY) {
       sc = SocketCreator.createNonDefaultInstance(config.getGatewaySSLEnabled(),
           config.getGatewaySSLRequireAuthentication(), config.getGatewaySSLProtocols(),