You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by kf...@apache.org on 2015/06/10 10:04:42 UTC

svn commit: r1684591 - in /tomcat/tc8.0.x/trunk: java/org/apache/catalina/tribes/tipis/LazyReplicatedMap.java webapps/docs/changelog.xml

Author: kfujino
Date: Wed Jun 10 08:04:42 2015
New Revision: 1684591

URL: http://svn.apache.org/r1684591
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/tc8.0.x/trunk/java/org/apache/catalina/tribes/tipis/LazyReplicatedMap.java
    tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml

Modified: tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/tipis/LazyReplicatedMap.java
URL: http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/tipis/LazyReplicatedMap.java?rev=1684591&r1=1684590&r2=1684591&view=diff
==============================================================================
--- tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/tipis/LazyReplicatedMap.java (original)
+++ tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/tipis/LazyReplicatedMap.java Wed Jun 10 08:04:42 2015
@@ -161,19 +161,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(sm.getString("lazyReplicatedMap.unableReplicate.backup", key, next, x.getMessage()), x);
+                continue;
             }
             try {
                 //publish the data out to all nodes

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=1684591&r1=1684590&r2=1684591&view=diff
==============================================================================
--- tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml Wed Jun 10 08:04:42 2015
@@ -134,6 +134,11 @@
         Use <code>StringManager</code> to provide i18n support in the
         <code>org.apache.catalina.tribes</code> packages. (kfujino)
       </scode>
+      <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-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org