Author: kfujino Date: Thu Jan 12 09:23:13 2017 New Revision: 1778402 URL: http://svn.apache.org/viewvc?rev=1778402&view=rev Log: -Enable reset the statistics without restarting the pool. -When a PING message that beyond the time-out period has been received, make sure that valid member is added to the map membership.
Modified: tomcat/tc8.5.x/trunk/java/org/apache/catalina/tribes/tipis/AbstractReplicatedMap.java tomcat/tc8.5.x/trunk/java/org/apache/catalina/tribes/tipis/LocalStrings.properties tomcat/tc8.5.x/trunk/webapps/docs/changelog.xml Modified: tomcat/tc8.5.x/trunk/java/org/apache/catalina/tribes/tipis/AbstractReplicatedMap.java URL: http://svn.apache.org/viewvc/tomcat/tc8.5.x/trunk/java/org/apache/catalina/tribes/tipis/AbstractReplicatedMap.java?rev=1778402&r1=1778401&r2=1778402&view=diff ============================================================================== --- tomcat/tc8.5.x/trunk/java/org/apache/catalina/tribes/tipis/AbstractReplicatedMap.java (original) +++ tomcat/tc8.5.x/trunk/java/org/apache/catalina/tribes/tipis/AbstractReplicatedMap.java Thu Jan 12 09:23:13 2017 @@ -619,9 +619,16 @@ public abstract class AbstractReplicated mapmsg.deserialize(getExternalLoaders()); if (mapmsg.getMsgType() == MapMessage.MSG_START) { mapMemberAdded(mapmsg.getPrimary()); - } else if (mapmsg.getMsgType() == MapMessage.MSG_INIT - || mapmsg.getMsgType() == MapMessage.MSG_PING) { + } else if (mapmsg.getMsgType() == MapMessage.MSG_INIT) { memberAlive(mapmsg.getPrimary()); + } else if (mapmsg.getMsgType() == MapMessage.MSG_PING) { + Member member = mapmsg.getPrimary(); + if (log.isInfoEnabled()) + log.info(sm.getString("abstractReplicatedMap.leftOver.pingMsg", member)); + State state = (State) mapmsg.getValue(); + if (state.isAvailable()) { + memberAlive(member); + } } else { // other messages are ignored. if (log.isInfoEnabled()) Modified: tomcat/tc8.5.x/trunk/java/org/apache/catalina/tribes/tipis/LocalStrings.properties URL: http://svn.apache.org/viewvc/tomcat/tc8.5.x/trunk/java/org/apache/catalina/tribes/tipis/LocalStrings.properties?rev=1778402&r1=1778401&r2=1778402&view=diff ============================================================================== --- tomcat/tc8.5.x/trunk/java/org/apache/catalina/tribes/tipis/LocalStrings.properties (original) +++ tomcat/tc8.5.x/trunk/java/org/apache/catalina/tribes/tipis/LocalStrings.properties Thu Jan 12 09:23:13 2017 @@ -36,6 +36,7 @@ abstractReplicatedMap.unable.put=Unable abstractReplicatedMap.unsupport.operation=This operation is not valid on a replicated map abstractReplicatedMap.mapMemberAdded.nullMember=Notified member is not registered in the membership:{0}. abstractReplicatedMap.mapMemberAdded.added=Map member added:{0} +abstractReplicatedMap.leftOver.pingMsg=PING message has been received beyond the timeout period. The map member[{0}] might have been removed from the map membership. abstractReplicatedMap.leftOver.ignored=Message[{0}] is ignored. abstractReplicatedMap.mapMember.unavailable=Member[{0}] is not available yet. abstractReplicatedMap.ping.timeout=Member[{0}] in the Map[{1}] has timed-out in the ping processing. Modified: tomcat/tc8.5.x/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/tc8.5.x/trunk/webapps/docs/changelog.xml?rev=1778402&r1=1778401&r2=1778402&view=diff ============================================================================== --- tomcat/tc8.5.x/trunk/webapps/docs/changelog.xml (original) +++ tomcat/tc8.5.x/trunk/webapps/docs/changelog.xml Thu Jan 12 09:23:13 2017 @@ -53,6 +53,18 @@ </fix> </changelog> </subsection> + <subsection name="Tribes"> + <changelog> + <add> + Add log message that PING message has received beyond the timeout + period. (kfujino) + </add> + <fix> + When a PING message that beyond the time-out period has been received, + make sure that valid member is added to the map membership. (kfujino) + </fix> + </changelog> + </subsection> <subsection name="Other"> <changelog> <fix> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org