Author: kfujino Date: Thu Jan 12 09:25:48 2017 New Revision: 1778403 URL: http://svn.apache.org/viewvc?rev=1778403&view=rev Log: -Add log message that PING message has received beyond the timeout period. -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.0.x/trunk/java/org/apache/catalina/tribes/tipis/AbstractReplicatedMap.java tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/tipis/LocalStrings.properties tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml Modified: tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/tipis/AbstractReplicatedMap.java URL: http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/tipis/AbstractReplicatedMap.java?rev=1778403&r1=1778402&r2=1778403&view=diff ============================================================================== --- tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/tipis/AbstractReplicatedMap.java (original) +++ tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/tipis/AbstractReplicatedMap.java Thu Jan 12 09:25:48 2017 @@ -613,9 +613,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.0.x/trunk/java/org/apache/catalina/tribes/tipis/LocalStrings.properties URL: http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/tipis/LocalStrings.properties?rev=1778403&r1=1778402&r2=1778403&view=diff ============================================================================== --- tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/tipis/LocalStrings.properties (original) +++ tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/tipis/LocalStrings.properties Thu Jan 12 09:25:48 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.0.x/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml?rev=1778403&r1=1778402&r2=1778403&view=diff ============================================================================== --- tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml (original) +++ tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml Thu Jan 12 09:25:48 2017 @@ -208,6 +208,14 @@ Reduce the warning logs for a message received from a different domain in order to avoid excessive log outputs. (kfujino) </fix> + <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="WebSocket"> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org