geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jinmeil...@apache.org
Subject [01/50] [abbrv] incubator-geode git commit: GEODE-1081 remove becomeCoordinator from JoinResponseMessage
Date Tue, 29 Mar 2016 22:25:31 GMT
Repository: incubator-geode
Updated Branches:
  refs/heads/feature/GEODE-17-3 34d16d0e0 -> 11c7e86af


GEODE-1081 remove becomeCoordinator from JoinResponseMessage

We no longer use becomeCoordinator so it is not needed in JoinResponseMessage.
The code reacting to becomeCoordinator in GMSJoinLeave is also not needed
and has been removed.


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

Branch: refs/heads/feature/GEODE-17-3
Commit: d25e445988501052258b14a167221f6b6e8d1c0b
Parents: 7971a77
Author: Bruce Schuchardt <bschuchardt@pivotal.io>
Authored: Mon Mar 14 09:28:58 2016 -0700
Committer: Bruce Schuchardt <bschuchardt@pivotal.io>
Committed: Mon Mar 14 09:34:51 2016 -0700

----------------------------------------------------------------------
 .../membership/gms/membership/GMSJoinLeave.java      |  9 ---------
 .../membership/gms/messages/JoinResponseMessage.java | 15 ---------------
 .../codeAnalysis/sanctionedDataSerializables.txt     |  4 ++--
 3 files changed, 2 insertions(+), 26 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d25e4459/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 85d76d6..2b7893e 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
@@ -395,15 +395,6 @@ public class GMSJoinLeave implements JoinLeave, MessageHandler {
       return isJoined;
     }
 
-    if (response.getBecomeCoordinator()) {
-      logger.info("I am being told to become the membership coordinator by {}", coord);
-      synchronized (viewInstallationLock) {
-        this.currentView = response.getCurrentView();
-        becomeCoordinator(null);
-      }
-      return true;
-    }
-
     this.birthViewId = response.getMemberID().getVmViewId();
     this.localAddress.setVmViewId(this.birthViewId);
     GMSMember me = (GMSMember) this.localAddress.getNetMember();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d25e4459/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messages/JoinResponseMessage.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messages/JoinResponseMessage.java
b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messages/JoinResponseMessage.java
index c01353a..ad9c319 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messages/JoinResponseMessage.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messages/JoinResponseMessage.java
@@ -37,7 +37,6 @@ public class JoinResponseMessage extends HighPriorityDistributionMessage
{
   private String rejectionMessage;
   private InternalDistributedMember memberID;
   private byte[] messengerData;
-  private boolean becomeCoordinator;
   
   public JoinResponseMessage(InternalDistributedMember memberID, NetView view) {
     this.currentView = view;
@@ -45,13 +44,6 @@ public class JoinResponseMessage extends HighPriorityDistributionMessage
{
     setRecipient(memberID);
   }
   
-  public JoinResponseMessage(InternalDistributedMember memberID, NetView view, boolean becomeCoordinator)
{
-    this.currentView = view;
-    this.memberID = memberID;
-    setRecipient(memberID);
-    this.becomeCoordinator = becomeCoordinator;
-  }
-  
   public JoinResponseMessage(String rejectionMessage) {
     this.rejectionMessage = rejectionMessage;
   }
@@ -68,10 +60,6 @@ public class JoinResponseMessage extends HighPriorityDistributionMessage
{
     return memberID;
   }
   
-  public boolean getBecomeCoordinator() {
-    return becomeCoordinator;
-  }
-
   public String getRejectionMessage() {
     return rejectionMessage;
   }
@@ -94,7 +82,6 @@ public class JoinResponseMessage extends HighPriorityDistributionMessage
{
     return getShortClassName() + "("+memberID + "; "
         + (currentView==null? "" : currentView.toString())
         + (rejectionMessage==null? "" : ("; "+rejectionMessage))
-        + (becomeCoordinator? "; becomeCoordinator" : "")
         + ")";
   }
   
@@ -112,7 +99,6 @@ public class JoinResponseMessage extends HighPriorityDistributionMessage
{
   public void toData(DataOutput out) throws IOException {
     DataSerializer.writeObject(currentView, out);
     DataSerializer.writeObject(memberID, out);
-    out.writeBoolean(becomeCoordinator);
     DataSerializer.writeString(rejectionMessage, out);
     DataSerializer.writeByteArray(messengerData, out);
   }
@@ -121,7 +107,6 @@ public class JoinResponseMessage extends HighPriorityDistributionMessage
{
   public void fromData(DataInput in) throws IOException, ClassNotFoundException {
     currentView = DataSerializer.readObject(in);
     memberID = DataSerializer.readObject(in);
-    becomeCoordinator = in.readBoolean();
     rejectionMessage = DataSerializer.readString(in);
     messengerData = DataSerializer.readByteArray(in);
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d25e4459/geode-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/sanctionedDataSerializables.txt
----------------------------------------------------------------------
diff --git a/geode-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/sanctionedDataSerializables.txt
b/geode-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/sanctionedDataSerializables.txt
index bb9f350..a6e951a 100644
--- a/geode-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/sanctionedDataSerializables.txt
+++ b/geode-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/sanctionedDataSerializables.txt
@@ -373,8 +373,8 @@ fromData,38,2a2bb80019c0001ab500042a2bb80019b500052a2bb8001bb500022a2bb9001c0100
 toData,35,2ab400042bb800152ab400052bb800152ab400022bb800162b2ab60017b900180200b1
 
 com/gemstone/gemfire/distributed/internal/membership/gms/messages/JoinResponseMessage,2
-fromData,49,2a2bb8001cc0001db500022a2bb8001cc0001eb500032a2bb9001f0100b500052a2bb80020b500062a2bb80021b50007b1
-toData,43,2ab400022bb800182ab400032bb800182b2ab40005b9001902002ab400062bb8001a2ab400072bb8001bb1
+fromData,39,2a2bb80019c0001ab500022a2bb80019c0001bb500032a2bb8001cb500052a2bb8001db50006b1
+toData,33,2ab400022bb800162ab400032bb800162ab400052bb800172ab400062bb80018b1
 
 com/gemstone/gemfire/distributed/internal/membership/gms/messages/LeaveRequestMessage,2
 fromData,20,2a2bb8000cc0000db500032a2bb8000eb50004b1


Mime
View raw message