You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by hi...@apache.org on 2016/03/10 18:47:13 UTC

[1/4] incubator-geode git commit: GEODE-1005 When multiple locator started same time, they endup creating two DS

Repository: incubator-geode
Updated Branches:
  refs/heads/develop 8700acca6 -> b31347054


GEODE-1005 When multiple locator started same time, they endup creating two DS

Now we make sure in findCoordinater call that we give prefernce to member which
are in view.


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

Branch: refs/heads/develop
Commit: 5fcf03706cfd703012ddddbd728ea240966747c3
Parents: 8700acc
Author: Hitesh Khamesra <hk...@pivotal.io>
Authored: Tue Mar 1 16:17:31 2016 -0800
Committer: Hitesh Khamesra <hk...@pivotal.io>
Committed: Thu Mar 10 09:47:23 2016 -0800

----------------------------------------------------------------------
 .../membership/gms/membership/GMSJoinLeave.java | 20 ++++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/5fcf0370/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeave.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeave.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeave.java
index 3d8b2e5..85d76d6 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeave.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeave.java
@@ -933,7 +933,8 @@ public class GMSJoinLeave implements JoinLeave, MessageHandler {
     }
 
     FindCoordinatorRequest request = new FindCoordinatorRequest(this.localAddress, state.alreadyTried, state.viewId);
-    Set<InternalDistributedMember> coordinators = new HashSet<InternalDistributedMember>();
+    Set<InternalDistributedMember> possibleCoordinators = new HashSet<InternalDistributedMember>();
+    Set<InternalDistributedMember> coordinatorsWithView = new HashSet<InternalDistributedMember>();
 
     long giveUpTime = System.currentTimeMillis() + ((long) services.getConfig().getLocatorWaitTime() * 1000L);
 
@@ -971,7 +972,11 @@ public class GMSJoinLeave implements JoinLeave, MessageHandler {
                   state.registrants.addAll(response.getRegistrants());
                 }
               }
-              coordinators.add(response.getCoordinator());
+              if (viewId > -1) {
+                coordinatorsWithView.add(response.getCoordinator());
+              }
+              
+              possibleCoordinators.add(response.getCoordinator());
               if (!flagsSet) {
                 flagsSet = true;
                 inheritSettingsFromLocator(addr, response);
@@ -982,13 +987,16 @@ public class GMSJoinLeave implements JoinLeave, MessageHandler {
         }
       }
     } while (!anyResponses && System.currentTimeMillis() < giveUpTime);
-
-    if (coordinators.isEmpty()) {
+    if (possibleCoordinators.isEmpty()) {
       return false;
     }
 
-    Iterator<InternalDistributedMember> it = coordinators.iterator();
-    if (coordinators.size() == 1) {
+    if (coordinatorsWithView.size() > 0) {
+      possibleCoordinators = coordinatorsWithView;// lets check current coordinators in view only
+    }
+    
+    Iterator<InternalDistributedMember> it = possibleCoordinators.iterator();
+    if (possibleCoordinators.size() == 1) {
       state.possibleCoordinator = it.next();
     } else {
       InternalDistributedMember oldest = it.next();


[4/4] incubator-geode git commit: GEODE-1064 Now we pass correct sever in getCredentail call

Posted by hi...@apache.org.
GEODE-1064 Now we pass correct sever in getCredentail call


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

Branch: refs/heads/develop
Commit: 41f4f14ae683021f5e3ba77a1cb7c4673928a9f4
Parents: b91a22b
Author: Hitesh Khamesra <hk...@pivotal.io>
Authored: Wed Mar 9 12:20:31 2016 -0800
Committer: Hitesh Khamesra <hk...@pivotal.io>
Committed: Thu Mar 10 09:47:24 2016 -0800

----------------------------------------------------------------------
 .../gemstone/gemfire/internal/cache/tier/sockets/HandShake.java   | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/41f4f14a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/HandShake.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/HandShake.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/HandShake.java
old mode 100755
new mode 100644
index 100549a..2ea6ca0
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/HandShake.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/HandShake.java
@@ -1837,8 +1837,7 @@ public class HandShake implements ClientHandShake
   public void sendCredentialsForWan(OutputStream out, InputStream in) {
 
     try {
-      Properties wanCredentials = getCredentials(this.system
-          .getDistributedMember());
+      Properties wanCredentials = getCredentials(this.id.getDistributedMember());
       DataOutputStream dos = new DataOutputStream(out);
       DataInputStream dis = new DataInputStream(in);
       writeCredentials(dos, dis, wanCredentials, false, this.system.getDistributedMember());


[2/4] incubator-geode git commit: GEODE-1063 Now during cacheClose we CacheCloseException..

Posted by hi...@apache.org.
GEODE-1063 Now during  cacheClose we CacheCloseException..


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

Branch: refs/heads/develop
Commit: b91a22bece37dd670be742e2891fcd05f3bb91b3
Parents: 5fcf037
Author: Hitesh Khamesra <hk...@pivotal.io>
Authored: Wed Mar 9 12:19:36 2016 -0800
Committer: Hitesh Khamesra <hk...@pivotal.io>
Committed: Thu Mar 10 09:47:24 2016 -0800

----------------------------------------------------------------------
 .../java/com/gemstone/gemfire/internal/cache/LocalRegion.java   | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b91a22be/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 830d47d..c727a53 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
@@ -10366,7 +10366,10 @@ public class LocalRegion extends AbstractRegion
           txException = txException.getCause();
         }
         if (e == null) {
-          e = new ServerOperationException(LocalizedStrings.Region_PutAll_Applied_PartialKeys_At_Server_0.toLocalizedString(getFullPath()), e1.getFailure());
+          e = getCancelCriterion().generateCancelledException(e1.getFailure());//for cache close
+          if(e == null) {
+            e = new ServerOperationException(LocalizedStrings.Region_PutAll_Applied_PartialKeys_At_Server_0.toLocalizedString(getFullPath()), e1.getFailure());
+          }
         }
       }
     }


[3/4] incubator-geode git commit: GEODE-1030 remove multicast ops check before region ops.

Posted by hi...@apache.org.
GEODE-1030 remove multicast ops check before region ops.

Some time test can get packet from other test.


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

Branch: refs/heads/develop
Commit: b3134705480b4b14d51c15d83477c44ba5a2a282
Parents: 41f4f14
Author: Hitesh Khamesra <hk...@pivotal.io>
Authored: Wed Mar 9 14:40:39 2016 -0800
Committer: Hitesh Khamesra <hk...@pivotal.io>
Committed: Thu Mar 10 09:47:24 2016 -0800

----------------------------------------------------------------------
 .../gemfire/cache30/DistributedMulticastRegionDUnitTest.java  | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b3134705/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedMulticastRegionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedMulticastRegionDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedMulticastRegionDUnitTest.java
index 9a0a6dd..01632a4 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedMulticastRegionDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedMulticastRegionDUnitTest.java
@@ -97,7 +97,8 @@ public class DistributedMulticastRegionDUnitTest extends CacheTestCase {
     //1. start locator with mcast port
     vm0.invoke(create);
     vm1.invoke(create);
-    
+    //There is possibility that you may get this packet from other tests
+    /*
     SerializableRunnable validateMulticastBeforeRegionOps =
         new CacheSerializableRunnable("validateMulticast before region ops") {
             public void run2() throws CacheException {
@@ -107,6 +108,7 @@ public class DistributedMulticastRegionDUnitTest extends CacheTestCase {
       
     vm0.invoke(validateMulticastBeforeRegionOps);
     vm1.invoke(validateMulticastBeforeRegionOps);
+    */
     
     SerializableRunnable doPuts =
       new CacheSerializableRunnable("do put") {
@@ -181,6 +183,8 @@ public class DistributedMulticastRegionDUnitTest extends CacheTestCase {
       vm0.invoke(create);
       vm1.invoke(create);
       
+    //There is possibility that you may get this packet from other tests
+      /*
       SerializableRunnable validateMulticastBeforeRegionOps =
           new CacheSerializableRunnable("validateMulticast before region ops") {
               public void run2() throws CacheException {
@@ -190,6 +194,7 @@ public class DistributedMulticastRegionDUnitTest extends CacheTestCase {
         
       vm0.invoke(validateMulticastBeforeRegionOps);
       vm1.invoke(validateMulticastBeforeRegionOps);
+      */
       
       SerializableRunnable doPuts =
         new CacheSerializableRunnable("do put") {