Author: kfujino Date: Wed Jun 10 08:06:09 2015 New Revision: 1684593 URL: http://svn.apache.org/r1684593 Log: Do not set the nodes that failed to replication to the backup nodes. Ensure that the nodes that the data has been successfully replicated are set to the backup node.
Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/tribes/tipis/LazyReplicatedMap.java tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/tribes/tipis/LazyReplicatedMap.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/tribes/tipis/LazyReplicatedMap.java?rev=1684593&r1=1684592&r2=1684593&view=diff ============================================================================== --- tomcat/tc7.0.x/trunk/java/org/apache/catalina/tribes/tipis/LazyReplicatedMap.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/tribes/tipis/LazyReplicatedMap.java Wed Jun 10 08:06:09 2015 @@ -162,19 +162,21 @@ public class LazyReplicatedMap<K,V> exte } MapMessage msg = null; try { - backup = wrap(next); + Member[] tmpBackup = wrap(next); //publish the backup data to one node msg = new MapMessage(getMapContextName(), MapMessage.MSG_BACKUP, false, - (Serializable) key, (Serializable) value, null, channel.getLocalMember(false), backup); + (Serializable) key, (Serializable) value, null, channel.getLocalMember(false), tmpBackup); if ( log.isTraceEnabled() ) log.trace("Publishing backup data:"+msg+" to: "+next.getName()); - UniqueId id = getChannel().send(backup, msg, getChannelSendOptions()); + UniqueId id = getChannel().send(tmpBackup, msg, getChannelSendOptions()); if ( log.isTraceEnabled() ) log.trace("Data published:"+msg+" msg Id:"+id); //we published out to a backup, mark the test success success = true; + backup = tmpBackup; }catch ( ChannelException x ) { log.error("Unable to replicate backup key:"+key+" to backup:"+next+". Reason:"+x.getMessage(),x); + continue; } try { //publish the data out to all nodes Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1684593&r1=1684592&r2=1684593&view=diff ============================================================================== --- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original) +++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Wed Jun 10 08:06:09 2015 @@ -160,6 +160,11 @@ states have been transferred correctly from existing map members. (kfujino) </fix> + <fix> + Do not set the nodes that failed to replication to the backup nodes. + Ensure that the nodes that the data has been successfully replicated are + set to the backup node. (kfujino) + </fix> </changelog> </subsection> <subsection name="Other"> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org