geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bschucha...@apache.org
Subject incubator-geode git commit: GEODE-77: minor bug fixes
Date Tue, 13 Oct 2015 18:14:06 GMT
Repository: incubator-geode
Updated Branches:
  refs/heads/feature/GEODE-77 bca5ff311 -> 9f556046e


GEODE-77: minor bug fixes

Member weights were not being installed into member identifiers, nor serialized with them.
 This wasn't an issue with GemFire because the weights were only important for JGroups IpAddresses
but we now use Geode member IDs in membership views so the weights need to be included.

During startup if a member was told to become the membership coordinator it wasn't correctly
setting its membership ID's view ID.  This caused some unnecessary confusion in other members.

During view preparation we don't wait for acks from members who are going to be removed in
the next view but we weren't aborting the view when this happened.  This caused us to not
detect a network partition.  The reply processor now adds these member IDs to the set of members
that didn't respond to view preparation.

Multicast testing showed that JGroups was not dispatching a received message, probably due
to problems with the message digest installed during startup.  We now send all messages out-of-band
so NAKACK2 will not queue them for ordered delivery.  We also turn off bundling so that all
messages are immediatly sent (no jitter for cache operations).

Other changes are in tests, which had timing issues or misspelled identifiers (this affected
some constants in CliStrings, too).


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

Branch: refs/heads/feature/GEODE-77
Commit: 9f556046e6389244915835f0173c8c436905de01
Parents: bca5ff3
Author: Bruce Schuchardt <bschuchardt@pivotal.io>
Authored: Tue Oct 13 11:13:06 2015 -0700
Committer: Bruce Schuchardt <bschuchardt@pivotal.io>
Committed: Tue Oct 13 11:13:06 2015 -0700

----------------------------------------------------------------------
 .../internal/DistributionConfig.java            |  6 +-
 .../internal/membership/gms/GMSMember.java      |  2 +
 .../membership/gms/fd/GMSHealthMonitor.java     | 12 ++--
 .../membership/gms/interfaces/Service.java      |  4 +-
 .../membership/gms/membership/GMSJoinLeave.java | 60 ++++++++++++--------
 .../gms/messenger/JGroupsMessenger.java         | 10 +++-
 .../gms/mgr/GMSMembershipManager.java           |  2 +-
 .../internal/cli/commands/ClientCommands.java   | 44 +++++++-------
 .../internal/cli/i18n/CliStrings.java           | 42 +++++++-------
 .../gemfire/cache30/TXDistributedDUnitTest.java | 24 ++++++--
 .../gemfire/distributed/LocatorDUnitTest.java   |  2 +-
 .../messenger/JGroupsMessengerJUnitTest.java    | 17 ++++++
 12 files changed, 139 insertions(+), 86 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/9f556046/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java
b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java
index 4916fe3..0f9f8d0 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java
@@ -317,7 +317,7 @@ public interface DistributionConfig extends Config, LogConfig {
    */
   public String getStartLocator();
   /**
-   * Sets the start-locators property.  This is a string in the form
+   * Sets the start-locator property.  This is a string in the form
    * bindAddress[port] and, if set, tells the distributed system to start
    * a locator prior to connecting
    * @param value must be of the form <code>hostName[portNum]</code>
@@ -329,11 +329,11 @@ public interface DistributionConfig extends Config, LogConfig {
    */
   public boolean isStartLocatorModifiable();
   /**
-   * The name of the "start-locators" property
+   * The name of the "start-locator" property
    */
   public static final String START_LOCATOR_NAME = "start-locator";
   /**
-   * The default value of the "start-locators" property
+   * The default value of the "start-locator" property
    */
   public static final String DEFAULT_START_LOCATOR = "";
   

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/9f556046/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/GMSMember.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/GMSMember.java
b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/GMSMember.java
index 038bdce..d5b2e6b 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/GMSMember.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/GMSMember.java
@@ -447,6 +447,7 @@ public class GMSMember implements NetMember, DataSerializableFixedID {
     // note: member weight and other GMS-only info is not included here
     out.writeLong(uuidMSBs);
     out.writeLong(uuidLSBs);
+    out.write(memberWeight);
   }
 
   @Override
@@ -454,5 +455,6 @@ public class GMSMember implements NetMember, DataSerializableFixedID {
       IOException {
     this.uuidMSBs = in.readLong();
     this.uuidLSBs = in.readLong();
+    memberWeight = (byte)(in.readByte() & 0xFF);
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/9f556046/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitor.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitor.java
b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitor.java
index 0b566e3..ae79fc5 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitor.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitor.java
@@ -402,7 +402,8 @@ public class GMSHealthMonitor implements HealthMonitor, MessageHandler
{
     synchronized (viewVsSuspectedMembers) {
       viewVsSuspectedMembers.clear();
     }
-    currentSuspects.clear();
+    currentSuspects.removeAll(newView.getCrashedMembers());
+    currentSuspects.removeAll(newView.getShutdownMembers());
     currentView = newView;
     setNextNeighbor(newView, null);
   }
@@ -603,11 +604,14 @@ public class GMSHealthMonitor implements HealthMonitor, MessageHandler
{
     
     // only respond if the intended recipient is this member
     InternalDistributedMember me = localAddress;
+    // TODO the first part of this check should be removed.
+    // because a restarted server will probably have the same
+    // membership port as it had in its last incarnation, causing
+    // delays in removing the old member ID from the view.
     if (me.getVmViewId() < 0 || m.getTarget().equals(me)) {
       CheckResponseMessage prm = new CheckResponseMessage(m.getRequestId());
       prm.setRecipient(m.getSender());
       Set<InternalDistributedMember> membersNotReceivedMsg = services.getMessenger().send(prm);
-      // TODO: send is throwing exception right now
       if (membersNotReceivedMsg != null && membersNotReceivedMsg.contains(m.getSender()))
{
         logger.debug("Unable to send check response to member: {}", m.getSender());
       }
@@ -752,8 +756,8 @@ public class GMSHealthMonitor implements HealthMonitor, MessageHandler
{
                 }
               }
               // whether it's alive or not, at this point we allow it to
-              // be a suspect again
-              currentSuspects.remove(mbr);
+              // be watched again
+              contactedBy(mbr);
             } catch (DistributedSystemDisconnectedException e) {
               return;
             } catch (Exception e) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/9f556046/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/interfaces/Service.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/interfaces/Service.java
b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/interfaces/Service.java
index 86ff500..56833fb 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/interfaces/Service.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/interfaces/Service.java
@@ -59,8 +59,8 @@ public interface Service {
   
   /**
    * a member is suspected of having crashed
-   * @param initiator
-   * @param suspect
    */
   void memberSuspected(InternalDistributedMember initiator, InternalDistributedMember suspect);
+
+
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/9f556046/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeave.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeave.java
b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeave.java
index 5ed3e88..933f802 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeave.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeave.java
@@ -1,14 +1,14 @@
 package com.gemstone.gemfire.distributed.internal.membership.gms.membership;
 
+import static com.gemstone.gemfire.internal.DataSerializableFixedID.FIND_COORDINATOR_REQ;
+import static com.gemstone.gemfire.internal.DataSerializableFixedID.FIND_COORDINATOR_RESP;
 import static com.gemstone.gemfire.internal.DataSerializableFixedID.INSTALL_VIEW_MESSAGE;
 import static com.gemstone.gemfire.internal.DataSerializableFixedID.JOIN_REQUEST;
 import static com.gemstone.gemfire.internal.DataSerializableFixedID.JOIN_RESPONSE;
 import static com.gemstone.gemfire.internal.DataSerializableFixedID.LEAVE_REQUEST_MESSAGE;
+import static com.gemstone.gemfire.internal.DataSerializableFixedID.NETWORK_PARTITION_MESSAGE;
 import static com.gemstone.gemfire.internal.DataSerializableFixedID.REMOVE_MEMBER_REQUEST;
 import static com.gemstone.gemfire.internal.DataSerializableFixedID.VIEW_ACK_MESSAGE;
-import static com.gemstone.gemfire.internal.DataSerializableFixedID.FIND_COORDINATOR_REQ;
-import static com.gemstone.gemfire.internal.DataSerializableFixedID.FIND_COORDINATOR_RESP;
-import static com.gemstone.gemfire.internal.DataSerializableFixedID.NETWORK_PARTITION_MESSAGE;
 
 import java.io.IOException;
 import java.net.InetSocketAddress;
@@ -313,16 +313,16 @@ public class GMSJoinLeave implements JoinLeave, MessageHandler {
         throw new AuthenticationFailedException(failReason);
       }
       if (response.getCurrentView() != null) {
-        this.birthViewId = response.getMemberID().getVmViewId();
-        this.localAddress.setVmViewId(this.birthViewId);
-        GMSMember me = (GMSMember)this.localAddress.getNetMember();
-        me.setBirthViewId(birthViewId);
-        installView(response.getCurrentView());
-
         if (response.getBecomeCoordinator()) {
           logger.info("I am being told to become the membership coordinator by {}", coord);
           this.currentView = response.getCurrentView();
           becomeCoordinator(null);
+        } else {
+          this.birthViewId = response.getMemberID().getVmViewId();
+          this.localAddress.setVmViewId(this.birthViewId);
+          GMSMember me = (GMSMember)this.localAddress.getNetMember();
+          me.setBirthViewId(birthViewId);
+          installView(response.getCurrentView());
         }
 
         return true;
@@ -546,6 +546,10 @@ public class GMSJoinLeave implements JoinLeave, MessageHandler {
         synchronized(viewInstallationLock) {
           int rand = testing? 0 : NetView.RANDOM.nextInt(10);
           int viewNumber = currentView.getViewId() + 5 + rand;
+          if (this.localAddress.getVmViewId() < 0) {
+            this.localAddress.setVmViewId(viewNumber);
+          }
+
           List<InternalDistributedMember> mbrs = new ArrayList<>(currentView.getMembers());
           if (!mbrs.contains(localAddress)) {
             mbrs.add(localAddress);
@@ -573,7 +577,6 @@ public class GMSJoinLeave implements JoinLeave, MessageHandler {
     }
   }
   
-  
   private void sendJoinResponses(List<InternalDistributedMember> newMbrs, NetView newView)
{
     for (InternalDistributedMember mbr: newMbrs) {
       JoinResponseMessage response = new JoinResponseMessage(mbr, newView);
@@ -832,7 +835,7 @@ public class GMSJoinLeave implements JoinLeave, MessageHandler {
     ArrayList<FindCoordinatorResponse> result;
     SearchState state = searchState;
     NetView v = state.view;
-    List<InternalDistributedMember> recipients = new ArrayList(v.getMembers());
+    List<InternalDistributedMember> recipients = new ArrayList<>(v.getMembers());
 
     if (recipients.size() > MAX_DISCOVERY_NODES && MAX_DISCOVERY_NODES > 0)
{
       recipients = recipients.subList(0, MAX_DISCOVERY_NODES);
@@ -1384,8 +1387,13 @@ public class GMSJoinLeave implements JoinLeave, MessageHandler {
       // We don't want to mix the two because pending removals
       // aren't reflected as having crashed in the current view
       // and need to cause a new view to be generated
-      synchronized(this.pendingRemovals) {
-        this.pendingRemovals.addAll(pendingRemovals);
+      for (InternalDistributedMember mbr: pendingLeaves) {
+        notRepliedYet.remove(mbr);
+      }
+      for (InternalDistributedMember mbr: pendingRemovals) {
+        if (this.notRepliedYet.contains(mbr)) {
+          this.pendingRemovals.add(mbr);
+        }
       }
     }
     
@@ -1395,8 +1403,10 @@ public class GMSJoinLeave implements JoinLeave, MessageHandler {
         // we will do a final check on this member if it hasn't already
         // been done, so stop waiting for it now
         logger.debug("view response processor recording suspect status for {}", suspect);
-        pendingRemovals.add(suspect);
-        checkIfDone();
+        if (notRepliedYet.contains(suspect) && !pendingRemovals.contains(suspect))
{
+          pendingRemovals.add(suspect);
+          checkIfDone();
+        }
       }
     }
     
@@ -1473,8 +1483,9 @@ public class GMSJoinLeave implements JoinLeave, MessageHandler {
           // if we've set waiting to false due to incoming messages then
           // we've discounted receiving any other responses from the
           // remaining members due to leave/crash notification
-          result = Collections.emptySet();
+          result = pendingRemovals;
         } else {
+          result.addAll(pendingRemovals);
           this.waiting = false;
         }
       }
@@ -1641,8 +1652,8 @@ public class GMSJoinLeave implements JoinLeave, MessageHandler {
         logger.debug("processing request {}", msg);
 
         InternalDistributedMember mbr = null;
-        
-        if (msg instanceof JoinRequestMessage) {
+        switch (msg.getDSFID()) {
+        case JOIN_REQUEST:
           mbr = ((JoinRequestMessage)msg).getMemberID();
           // see if an old member ID is being reused.  If
           // so we'll remove it from the new view
@@ -1655,22 +1666,23 @@ public class GMSJoinLeave implements JoinLeave, MessageHandler {
           if (!joinReqs.contains(mbr)) {
             joinReqs.add(mbr);
           }
-        }
-        else if (msg instanceof LeaveRequestMessage) {
+          break;
+        case LEAVE_REQUEST_MESSAGE:
           mbr = ((LeaveRequestMessage) msg).getMemberID();
           if (oldMembers.contains(mbr) && !leaveReqs.contains(mbr)) {
             leaveReqs.add(mbr);
           }
-        }
-        else if (msg instanceof RemoveMemberMessage) {
+          break;
+        case REMOVE_MEMBER_REQUEST:
           mbr = ((RemoveMemberMessage) msg).getMemberID();
           if (oldMembers.contains(mbr) && !leaveReqs.contains(mbr) && !removalReqs.contains(mbr))
{
             removalReqs.add(mbr);
             removalReasons.add(((RemoveMemberMessage) msg).getReason());
           }
-        }
-        else {
+          break;
+        default: 
           logger.warn("Unknown membership request encountered: {}", msg);
+          break;
         }
       }
       

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/9f556046/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessenger.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessenger.java
b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessenger.java
index 92f9d38..556f974 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessenger.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessenger.java
@@ -654,11 +654,16 @@ public class JGroupsMessenger implements Messenger {
     Message msg = new Message();
     msg.setDest(null);
     msg.setSrc(src);
+    // GemFire uses its own reply processors so there is no need
+    // to maintain message order
+    msg.setFlag(Flag.OOB);
+    // Bundling is mostly only useful if we're doing no-ack work,
+    // which is fairly rare
+    msg.setFlag(Flag.DONT_BUNDLE);
+
     //log.info("Creating message with payload " + gfmsg);
     if (gfmsg.getProcessorType() == DistributionManager.HIGH_PRIORITY_EXECUTOR
         || gfmsg instanceof HighPriorityDistributionMessage) {
-      msg.setFlag(Flag.OOB);
-      msg.setFlag(Flag.DONT_BUNDLE);
       msg.setFlag(Flag.NO_FC);
       msg.setFlag(Flag.SKIP_BARRIER);
     }
@@ -778,6 +783,7 @@ public class JGroupsMessenger implements Messenger {
           &&  services.getConfig().getTransport().isMcastEnabled()) {
         Digest digest = (Digest)jrsp.getMessengerData();
         if (digest != null) {
+          logger.trace("installing JGroups message digest {}", digest);
           this.myChannel.getProtocolStack()
               .getTopProtocol().down(new Event(Event.SET_DIGEST, digest));
         }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/9f556046/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/mgr/GMSMembershipManager.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/mgr/GMSMembershipManager.java
b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/mgr/GMSMembershipManager.java
index 76c3165..c7a4743 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/mgr/GMSMembershipManager.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/mgr/GMSMembershipManager.java
@@ -1101,7 +1101,7 @@ public class GMSMembershipManager implements MembershipManager, Manager
         return true;
       }
       if (member.getVmViewId() < 0) {
-        logger.error("attempt to add a surprise member that has not yet joined the distributed
system", new Exception("stack trace"));
+        logger.warn("attempt to add a surprise member that has not yet joined the distributed
system: " + member, new Exception("stack trace"));
       }
       if (latestView.getViewId() > member.getVmViewId()) {
         // tell the process that it should shut down distribution.

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/9f556046/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/ClientCommands.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/ClientCommands.java
b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/ClientCommands.java
index 2eb1318..858a487 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/ClientCommands.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/ClientCommands.java
@@ -179,10 +179,10 @@ public class ClientCommands implements CommandMarker {
             try{
               clientHealthStatus = serverMbean.showClientStats(clientId);       
               if(clientHealthStatus == null){
-                return ResultBuilder.createGemFireErrorResult(CliStrings.format(CliStrings.DECRIBE_CLIENT_COULD_NOT_RETRIEVE_STATS_FOR_CLIENT_0,
clientId));
+                return ResultBuilder.createGemFireErrorResult(CliStrings.format(CliStrings.DESCRIBE_CLIENT_COULD_NOT_RETRIEVE_STATS_FOR_CLIENT_0,
clientId));
               }                      
             }catch(Exception eee){
-              return ResultBuilder.createGemFireErrorResult(CliStrings.format(CliStrings.DECRIBE_CLIENT_COULD_NOT_RETRIEVE_STATS_FOR_CLIENT_0_REASON_1,
clientId, eee.getMessage()));               
+              return ResultBuilder.createGemFireErrorResult(CliStrings.format(CliStrings.DESCRIBE_CLIENT_COULD_NOT_RETRIEVE_STATS_FOR_CLIENT_0_REASON_1,
clientId, eee.getMessage()));               
             }           
           }         
         }      
@@ -237,19 +237,19 @@ public class ClientCommands implements CommandMarker {
               
             }
           }catch(Exception e){
-            LogWrapper.getInstance().info(CliStrings.DECRIBE_CLIENT_ERROR_FETCHING_STATS_0
+ " :: " + CliUtil.stackTraceAsString(e));
-            return ResultBuilder.createGemFireErrorResult(CliStrings.format(CliStrings.DECRIBE_CLIENT_ERROR_FETCHING_STATS_0,
e.getMessage()));            
+            LogWrapper.getInstance().info(CliStrings.DESCRIBE_CLIENT_ERROR_FETCHING_STATS_0
+ " :: " + CliUtil.stackTraceAsString(e));
+            return ResultBuilder.createGemFireErrorResult(CliStrings.format(CliStrings.DESCRIBE_CLIENT_ERROR_FETCHING_STATS_0,
e.getMessage()));            
           }
         }
         
         buildTableResult(sectionResult, clientHealthStatus, isDurable, primaryServers, secondaryServers);
      
         result = ResultBuilder.buildResult(compositeResultData);
       }else{
-        return ResultBuilder.createGemFireErrorResult(CliStrings.DECRIBE_CLIENT_NO_MEMBERS);
+        return ResultBuilder.createGemFireErrorResult(CliStrings.DESCRIBE_CLIENT_NO_MEMBERS);
       }
     } catch (Exception e) {      
       LogWrapper.getInstance().info("Error in decribe clients. stack trace" + CliUtil.stackTraceAsString(e));
     
-      result = ResultBuilder.createGemFireErrorResult(CliStrings.format(CliStrings.DECRIBE_CLIENT_COULD_NOT_RETRIEVE_CLIENT_0,
e.getMessage()));
+      result = ResultBuilder.createGemFireErrorResult(CliStrings.format(CliStrings.DESCRIBE_CLIENT_COULD_NOT_RETRIEVE_CLIENT_0,
e.getMessage()));
     }    
     LogWrapper.getInstance().info("decribe client result " + result);    
     return result;
@@ -269,18 +269,18 @@ public class ClientCommands implements CommandMarker {
     }   
     if(clientHealthStatus != null){
       sectionResult.addSeparator('-');
-      sectionResult.addData(CliStrings.DECRIBE_CLIENT_COLUMN_PRIMARY_SERVERS, primServers);
-      sectionResult.addData(CliStrings.DECRIBE_CLIENT_COLUMN_SECONDARY_SERVERS, secondServers);
-      sectionResult.addData(CliStrings.DECRIBE_CLIENT_COLUMN_CPU, clientHealthStatus.getCpus());
-      sectionResult.addData(CliStrings.DECRIBE_CLIENT_COLUMN_LISTNER_CALLS, clientHealthStatus.getNumOfCacheListenerCalls());
-      sectionResult.addData(CliStrings.DECRIBE_CLIENT_COLUMN_GETS, clientHealthStatus.getNumOfGets());
-      sectionResult.addData(CliStrings.DECRIBE_CLIENT_COLUMN_MISSES, clientHealthStatus.getNumOfMisses());
-      sectionResult.addData(CliStrings.DECRIBE_CLIENT_COLUMN_PUTS, clientHealthStatus.getNumOfPuts());
-      sectionResult.addData(CliStrings.DECRIBE_CLIENT_COLUMN_THREADS, clientHealthStatus.getNumOfThreads());
-      sectionResult.addData(CliStrings.DECRIBE_CLIENT_COLUMN_PROCESS_CPU_TIME, clientHealthStatus.getProcessCpuTime());
-      sectionResult.addData(CliStrings.DECRIBE_CLIENT_COLUMN_QUEUE_SIZE, clientHealthStatus.getQueueSize());
-      sectionResult.addData(CliStrings.DECRIBE_CLIENT_COLUMN_UP_TIME, clientHealthStatus.getUpTime());
     
-      sectionResult.addData(CliStrings.DECRIBE_CLIENT_COLUMN_DURABLE, isDurable);      
+      sectionResult.addData(CliStrings.DESCRIBE_CLIENT_COLUMN_PRIMARY_SERVERS, primServers);
+      sectionResult.addData(CliStrings.DESCRIBE_CLIENT_COLUMN_SECONDARY_SERVERS, secondServers);
+      sectionResult.addData(CliStrings.DESCRIBE_CLIENT_COLUMN_CPU, clientHealthStatus.getCpus());
+      sectionResult.addData(CliStrings.DESCRIBE_CLIENT_COLUMN_LISTNER_CALLS, clientHealthStatus.getNumOfCacheListenerCalls());
+      sectionResult.addData(CliStrings.DESCRIBE_CLIENT_COLUMN_GETS, clientHealthStatus.getNumOfGets());
+      sectionResult.addData(CliStrings.DESCRIBE_CLIENT_COLUMN_MISSES, clientHealthStatus.getNumOfMisses());
+      sectionResult.addData(CliStrings.DESCRIBE_CLIENT_COLUMN_PUTS, clientHealthStatus.getNumOfPuts());
+      sectionResult.addData(CliStrings.DESCRIBE_CLIENT_COLUMN_THREADS, clientHealthStatus.getNumOfThreads());
+      sectionResult.addData(CliStrings.DESCRIBE_CLIENT_COLUMN_PROCESS_CPU_TIME, clientHealthStatus.getProcessCpuTime());
+      sectionResult.addData(CliStrings.DESCRIBE_CLIENT_COLUMN_QUEUE_SIZE, clientHealthStatus.getQueueSize());
+      sectionResult.addData(CliStrings.DESCRIBE_CLIENT_COLUMN_UP_TIME, clientHealthStatus.getUpTime());
     
+      sectionResult.addData(CliStrings.DESCRIBE_CLIENT_COLUMN_DURABLE, isDurable);      
       sectionResult.addSeparator('-');
       
       Map<String, String > poolStats = clientHealthStatus.getPoolStats();
@@ -299,10 +299,10 @@ public class ClientCommands implements CommandMarker {
           LogWrapper.getInstance().info("decribe client clientHealthStatus redundancy ="
+ str[2].substring(str[2].indexOf("=")+1 ));
           LogWrapper.getInstance().info("decribe client clientHealthStatus CQs =" +     
  str[3].substring(str[3].indexOf("=")+1 ));         
           
-          poolStatsResultTable.accumulate(CliStrings.DECRIBE_CLIENT_MIN_CONN, str[0].substring(str[0].indexOf("=")+1
));
-          poolStatsResultTable.accumulate(CliStrings.DECRIBE_CLIENT_MAX_CONN, str[1].substring(str[1].indexOf("=")+1
));
-          poolStatsResultTable.accumulate(CliStrings.DECRIBE_CLIENT_REDUDANCY,          
str[2].substring(str[2].indexOf("=")+1 ));
-          poolStatsResultTable.accumulate(CliStrings.DECRIBE_CLIENT_CQs,       str[3].substring(str[3].indexOf("=")+1
));          
+          poolStatsResultTable.accumulate(CliStrings.DESCRIBE_CLIENT_MIN_CONN, str[0].substring(str[0].indexOf("=")+1
));
+          poolStatsResultTable.accumulate(CliStrings.DESCRIBE_CLIENT_MAX_CONN, str[1].substring(str[1].indexOf("=")+1
));
+          poolStatsResultTable.accumulate(CliStrings.DESCRIBE_CLIENT_REDUDANCY,         
 str[2].substring(str[2].indexOf("=")+1 ));
+          poolStatsResultTable.accumulate(CliStrings.DESCRIBE_CLIENT_CQs,       str[3].substring(str[3].indexOf("=")+1
));          
         }        
       }      
     }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/9f556046/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/i18n/CliStrings.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/i18n/CliStrings.java
b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/i18n/CliStrings.java
index 6034f96..d14838c 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/i18n/CliStrings.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/i18n/CliStrings.java
@@ -1187,27 +1187,27 @@ public class CliStrings {
   public static final String DESCRIBE_CLIENT__ID__HELP = "ID of a client for which details
are needed";
   public static final String DESCRIBE_CLIENT_COULD_NOT_RETRIEVE_SERVER_LIST = "No cache-servers
were observed.";
   public static final String DESCRIBE_CLIENT__CLIENT__ID__NOT__FOUND__0 = "Specified Client
ID {0} not present";
-  public static final String DECRIBE_CLIENT_COULD_NOT_RETRIEVE_CLIENT_0 = "Could not retrieve
client. Reason : {0}";
-  public static final String DECRIBE_CLIENT_COULD_NOT_RETRIEVE_STATS_FOR_CLIENT_0 = "Could
not retrieve stats for client : {0}";
-  public static final String DECRIBE_CLIENT_COULD_NOT_RETRIEVE_STATS_FOR_CLIENT_0_REASON_1
= "Could not retrieve stats for client : {0}. Reason : {1}";
-  public static final String DECRIBE_CLIENT_ERROR_FETCHING_STATS_0 = "Error occured while
fetching stats. Reason : {0}";
-  public static final String DECRIBE_CLIENT_NO_MEMBERS = "DS has no members";
-  public static final String DECRIBE_CLIENT_COLUMN_PRIMARY_SERVERS = "Primary Servers";
-  public static final String DECRIBE_CLIENT_COLUMN_SECONDARY_SERVERS = "Secondary Servers";
-  public static final String DECRIBE_CLIENT_COLUMN_CPU = "CPU";
-  public static final String DECRIBE_CLIENT_COLUMN_LISTNER_CALLS = "Number of Cache Listner
Calls";
-  public static final String DECRIBE_CLIENT_COLUMN_GETS = "Number of Gets";
-  public static final String DECRIBE_CLIENT_COLUMN_MISSES = "Number of Misses";
-  public static final String DECRIBE_CLIENT_COLUMN_PUTS = "Number of Puts";
-  public static final String DECRIBE_CLIENT_COLUMN_THREADS = "Number of Threads";
-  public static final String DECRIBE_CLIENT_COLUMN_PROCESS_CPU_TIME = "Process CPU Time (nanoseconds)";
-  public static final String DECRIBE_CLIENT_COLUMN_QUEUE_SIZE = "Queue size";
-  public static final String DECRIBE_CLIENT_COLUMN_UP_TIME = "UP Time (seconds)";
-  public static final String DECRIBE_CLIENT_COLUMN_DURABLE = "Is Durable";
-  public static final String DECRIBE_CLIENT_MIN_CONN = "Minimum Connections";
-  public static final String DECRIBE_CLIENT_MAX_CONN = "Maximum Connections";
-  public static final String DECRIBE_CLIENT_REDUDANCY = "Redudancy";
-  public static final String DECRIBE_CLIENT_CQs = "Num of CQs";
+  public static final String DESCRIBE_CLIENT_COULD_NOT_RETRIEVE_CLIENT_0 = "Could not retrieve
client. Reason : {0}";
+  public static final String DESCRIBE_CLIENT_COULD_NOT_RETRIEVE_STATS_FOR_CLIENT_0 = "Could
not retrieve stats for client : {0}";
+  public static final String DESCRIBE_CLIENT_COULD_NOT_RETRIEVE_STATS_FOR_CLIENT_0_REASON_1
= "Could not retrieve stats for client : {0}. Reason : {1}";
+  public static final String DESCRIBE_CLIENT_ERROR_FETCHING_STATS_0 = "Error occured while
fetching stats. Reason : {0}";
+  public static final String DESCRIBE_CLIENT_NO_MEMBERS = "DS has no members";
+  public static final String DESCRIBE_CLIENT_COLUMN_PRIMARY_SERVERS = "Primary Servers";
+  public static final String DESCRIBE_CLIENT_COLUMN_SECONDARY_SERVERS = "Secondary Servers";
+  public static final String DESCRIBE_CLIENT_COLUMN_CPU = "CPU";
+  public static final String DESCRIBE_CLIENT_COLUMN_LISTNER_CALLS = "Number of Cache Listner
Calls";
+  public static final String DESCRIBE_CLIENT_COLUMN_GETS = "Number of Gets";
+  public static final String DESCRIBE_CLIENT_COLUMN_MISSES = "Number of Misses";
+  public static final String DESCRIBE_CLIENT_COLUMN_PUTS = "Number of Puts";
+  public static final String DESCRIBE_CLIENT_COLUMN_THREADS = "Number of Threads";
+  public static final String DESCRIBE_CLIENT_COLUMN_PROCESS_CPU_TIME = "Process CPU Time
(nanoseconds)";
+  public static final String DESCRIBE_CLIENT_COLUMN_QUEUE_SIZE = "Queue size";
+  public static final String DESCRIBE_CLIENT_COLUMN_UP_TIME = "UP Time (seconds)";
+  public static final String DESCRIBE_CLIENT_COLUMN_DURABLE = "Is Durable";
+  public static final String DESCRIBE_CLIENT_MIN_CONN = "Minimum Connections";
+  public static final String DESCRIBE_CLIENT_MAX_CONN = "Maximum Connections";
+  public static final String DESCRIBE_CLIENT_REDUDANCY = "Redudancy";
+  public static final String DESCRIBE_CLIENT_CQs = "Num of CQs";
   
   
   

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/9f556046/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/TXDistributedDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/TXDistributedDUnitTest.java
b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/TXDistributedDUnitTest.java
index aeb3c18..6d36646 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/TXDistributedDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/TXDistributedDUnitTest.java
@@ -29,6 +29,8 @@ import java.util.HashSet;
 import java.util.List;
 import java.util.concurrent.CountDownLatch;
 
+import junit.framework.AssertionFailedError;
+
 import org.junit.Ignore;
 
 import com.gemstone.gemfire.SystemFailure;
@@ -712,12 +714,22 @@ public class TXDistributedDUnitTest extends CacheTestCase {
               fail("While creating region", e);
             }
           }
-          Region.Entry re = rgn1.getEntry("key0");
-          assertNotNull(re);
-          assertEquals("val0_3", re.getValue());
-          re = rgn1.getEntry("key1");
-          assertNotNull(re);
-          assertEquals("val1_3", re.getValue());
+          long giveUp = System.currentTimeMillis() + 10000;
+          while (giveUp > System.currentTimeMillis()) {
+            try {
+              Region.Entry re = rgn1.getEntry("key0");
+              assertNotNull(re);
+              assertEquals("val0_3", re.getValue());
+              re = rgn1.getEntry("key1");
+              assertNotNull(re);
+              assertEquals("val1_3", re.getValue());
+              break;
+            } catch (AssertionFailedError e) {
+              if (giveUp > System.currentTimeMillis()) {
+                throw e;
+              }
+            }
+          }
         }
       };
     invokeInEveryVM(nonSoloChangeValidator1);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/9f556046/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
b/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
index ca9f3b5..8779c6d 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
@@ -557,7 +557,7 @@ public class LocatorDUnitTest extends DistributedTestCase {
        * failure and eject the lost members from the view.
        */
       
-      getLogWriter().info("waiting for remaining vms to disconnect due to partition detection");
+      getLogWriter().info("waiting for my distributed system to disconnect due to partition
detection");
       WaitCriterion ev = new WaitCriterion() {
         public boolean done() {
           return !sys.isConnected();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/9f556046/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessengerJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessengerJUnitTest.java
b/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessengerJUnitTest.java
index e803f28..985cfb5 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessengerJUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessengerJUnitTest.java
@@ -2,12 +2,17 @@ package com.gemstone.gemfire.distributed.internal.membership.gms.messenger;
 
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertEquals;
 import static org.mockito.Matchers.any;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
 
+import java.io.ByteArrayInputStream;
+import java.io.DataInputStream;
+import java.io.DataOutput;
+import java.io.DataOutputStream;
 import java.util.List;
 import java.util.Properties;
 
@@ -39,6 +44,7 @@ import com.gemstone.gemfire.distributed.internal.membership.gms.interfaces.Messa
 import com.gemstone.gemfire.distributed.internal.membership.gms.messages.JoinRequestMessage;
 import com.gemstone.gemfire.distributed.internal.membership.gms.messages.LeaveRequestMessage;
 import com.gemstone.gemfire.internal.AvailablePortHelper;
+import com.gemstone.gemfire.internal.HeapDataOutputStream;
 import com.gemstone.gemfire.internal.Version;
 import com.gemstone.gemfire.internal.admin.remote.RemoteTransportConfig;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
@@ -112,6 +118,17 @@ public class JGroupsMessengerJUnitTest {
     }
   }
   
+  @Test
+  public void testMemberWeightIsSerialized() throws Exception {
+    HeapDataOutputStream out = new HeapDataOutputStream(500, Version.CURRENT);
+    InternalDistributedMember m = new InternalDistributedMember("localhost", 8888);
+    ((GMSMember)m.getNetMember()).setMemberWeight((byte)40);
+    m.toData(out);
+    DataInputStream in = new DataInputStream(new ByteArrayInputStream(out.toByteArray()));
+    m = new InternalDistributedMember();
+    m.fromData(in);
+    assertEquals(40, m.getNetMember().getMemberWeight());
+  }
   
   @Test
   public void testMessageDeliveredToHandler() throws Exception {



Mime
View raw message