2015-02-17 20:30 GMT+09:00 Konstantin Kolinko <knst.koli...@gmail.com>:

> 2015-02-17 5:20 GMT+03:00  <kfuj...@apache.org>:
> > Author: kfujino
> > Date: Tue Feb 17 02:20:11 2015
> > New Revision: 1660266
> >
> > URL: http://svn.apache.org/r1660266
> > Log:
> > Make sure that add to the backup node of the map entry when map member
> has been added to ReplicatedMap.
>
> It is hard to read the above phrase. I guess that it means the following:
>
> "When a map member has been added to ReplicatedMap, make sure to add
> it to backup nodes list of all other members."
>
>
>
Thanks. I will rewrite changelog.



> > Modified:
> >
>  tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/tipis/ReplicatedMap.java
> >     tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml
> >
> > Modified:
> tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/tipis/ReplicatedMap.java
> > URL:
> http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/tipis/ReplicatedMap.java?rev=1660266&r1=1660265&r2=1660266&view=diff
> >
> ==============================================================================
> > ---
> tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/tipis/ReplicatedMap.java
> (original)
> > +++
> tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/tipis/ReplicatedMap.java
> Tue Feb 17 02:20:11 2015
> > @@ -203,4 +203,29 @@ public class ReplicatedMap<K,V> extends
> >          long complete = System.currentTimeMillis() - start;
> >          if (log.isInfoEnabled()) log.info("Relocation of map entries
> was complete in " + complete + " ms.");
> >      }
> > +
>
> @Override
> > +    public void mapMemberAdded(Member member) {
>
> This overrides the same method in AbstractReplicatedMap -
> AbstractReplicatedMap.mapMemberAdded().
>
> The AbstractReplicatedMap.mapMemberAdded() method calls
> "publishEntryInfo(entry.getKey(), entry.getValue());".  The
> publishEntryInfo() method sends a message to other nodes of the
> cluster.
>
> The new code in ReplicatedMap.mapMemberAdded() does not call
> "publishEntryInfo" and does not send that message.  Is it intended?
>
>
Yes, I intended it.

The most general case which this method is invoked is when starting the
ReplicatedMap.
transferState() method has been already invoked before
ReplicatedMap.mapMemberAdded(Member) is invoked.
Because the newly added nodes have received COPY messages, they have the
entry information.
Therefore, it does not need to send a message in mapMemberAdded.

Although this method is also a possibility that will be invoked by
AbstractReplicatedMap.ping, I did it in the same way as the more general
case.



> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
>
> --
> Keiichi.Fujino
>  <dev-h...@tomcat.apache.org>
>  <dev-h...@tomcat.apache.org>
>

Reply via email to