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/02 19:02:37 UTC

incubator-geode git commit: GEODE-77 bugfixes from code review

Repository: incubator-geode
Updated Branches:
  refs/heads/feature/GEODE-77 a40121106 -> b08159fbb


GEODE-77 bugfixes from code review

ClientProxyMembershipID's clientVersion may be null.  toData was
assuming that it was never null and caused NPEs.

InternalDistributedSystem needs to tell the locator whether there was
a forced-disconnect but was using the wrong value.  It needs to use
its forcedDisconnect boolean instead of the preparingForReconnect
parameter.


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

Branch: refs/heads/feature/GEODE-77
Commit: b08159fbb952252f6c4087d59e94133291544d94
Parents: a401211
Author: Bruce Schuchardt <bs...@pivotal.io>
Authored: Fri Oct 2 10:01:05 2015 -0700
Committer: Bruce Schuchardt <bs...@pivotal.io>
Committed: Fri Oct 2 10:01:05 2015 -0700

----------------------------------------------------------------------
 .../gemfire/distributed/internal/InternalDistributedSystem.java   | 2 +-
 .../internal/cache/tier/sockets/ClientProxyMembershipID.java      | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b08159fb/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystem.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystem.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystem.java
index 0138095..c7d3fdb 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystem.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystem.java
@@ -1324,7 +1324,7 @@ public final class InternalDistributedSystem
           // we close the locator after the DM so that when split-brain detection
           // is enabled, loss of the locator doesn't cause the DM to croak
           if (this.startedLocator != null) {
-            this.startedLocator.stop(preparingForReconnect, preparingForReconnect, false);
+            this.startedLocator.stop(forcedDisconnect, preparingForReconnect, false);
             this.startedLocator = null;
           }
         } finally { // timer canceled

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b08159fb/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientProxyMembershipID.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientProxyMembershipID.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientProxyMembershipID.java
index f318abd..54e5587 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientProxyMembershipID.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientProxyMembershipID.java
@@ -341,6 +341,9 @@ public final class ClientProxyMembershipID
 //    }
     Version v = InternalDataSerializer.getVersionForDataStream(out);
     if (v.compareTo(Version.GFE_90) >= 0) {
+      if (clientVersion == null) {
+        clientVersion = Version.CURRENT;
+      }
       clientVersion.writeOrdinal(out, true);
     }
     DataSerializer.writeByteArray(this.identity, out);