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/11/25 09:40:23 UTC

svn commit: r1716327 - in /tomcat/trunk/java/org/apache/catalina/tribes/tipis: AbstractReplicatedMap.java LocalStrings.properties

Author: kfujino
Date: Wed Nov 25 08:40:23 2015
New Revision: 1716327

URL: http://svn.apache.org/viewvc?rev=1716327&view=rev
Log:
Add null check for mapMember.

Modified:
    tomcat/trunk/java/org/apache/catalina/tribes/tipis/AbstractReplicatedMap.java
    tomcat/trunk/java/org/apache/catalina/tribes/tipis/LocalStrings.properties

Modified: tomcat/trunk/java/org/apache/catalina/tribes/tipis/AbstractReplicatedMap.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/tribes/tipis/AbstractReplicatedMap.java?rev=1716327&r1=1716326&r2=1716327&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/tribes/tipis/AbstractReplicatedMap.java (original)
+++ tomcat/trunk/java/org/apache/catalina/tribes/tipis/AbstractReplicatedMap.java Wed Nov 25 08:40:23 2015
@@ -734,6 +734,10 @@ public abstract class AbstractReplicated
         boolean memberAdded = false;
         //select a backup node if we don't have one
         Member mapMember = getChannel().getMember(member);
+        if (mapMember == null) {
+            log.warn(sm.getString("abstractReplicatedMap.mapMemberAdded.nullMember", member));
+            return;
+        }
         synchronized (mapMembers) {
             if (!mapMembers.containsKey(mapMember) ) {
                 mapMembers.put(mapMember, Long.valueOf(System.currentTimeMillis()));

Modified: tomcat/trunk/java/org/apache/catalina/tribes/tipis/LocalStrings.properties
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/tribes/tipis/LocalStrings.properties?rev=1716327&r1=1716326&r2=1716327&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/tribes/tipis/LocalStrings.properties (original)
+++ tomcat/trunk/java/org/apache/catalina/tribes/tipis/LocalStrings.properties Wed Nov 25 08:40:23 2015
@@ -34,6 +34,7 @@ abstractReplicatedMap.unable.retrieve=Un
 abstractReplicatedMap.unable.get=Unable to replicate out data for a AbstractReplicatedMap.get operation
 abstractReplicatedMap.unable.put=Unable to replicate out data for a AbstractReplicatedMap.put operation
 abstractReplicatedMap.unsupport.operation=This operation is not valid on a replicated map
+abstractReplicatedMap.mapMemberAdded.nullMember=Notified member is not registered in the membership:{0}.
 mapMessage.deserialize.error.key=Deserialization error of the MapMessage.key
 mapMessage.deserialize.error.value=Deserialization error of the MapMessage.value
 lazyReplicatedMap.unableReplicate.backup=Unable to replicate backup key:{0} to backup:{1}. Reason:{2}



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: svn commit: r1716327 - in /tomcat/trunk/java/org/apache/catalina/tribes/tipis: AbstractReplicatedMap.java LocalStrings.properties

Posted by Mark Thomas <ma...@apache.org>.
On 29/01/2016 12:57, Keiichi Fujino wrote:
> 2016-01-29 21:42 GMT+09:00 Mark Thomas <ma...@apache.org>:
> 
>> On 29/01/2016 12:15, Mark Thomas wrote:
>>> On 25/11/2015 08:40, kfujino@apache.org wrote:
>>>> Author: kfujino
>>>> Date: Wed Nov 25 08:40:23 2015
>>>> New Revision: 1716327
>>>>
>>>> URL: http://svn.apache.org/viewvc?rev=1716327&view=rev
>>>> Log:
>>>> Add null check for mapMember.
>>>
>>> This appears to create problems when the BackupManager membership is
>>> configured using static membership. The static members are not visible
>>> to the Channel (they are managed by the Interceptor) so this test always
>>> fails and the logs fill with warnings very quickly.
>>
>> My analysis isn't right. The static members are visible.
>>
>> I've traced the problem back as far as the unique IDs not matching but I
>> am still working on finding the root cause. It could be a config error
>> on my part.
>>
>>
> 
> I fixed this problems at r1720074. (see r1720074, r1714920 and r1714919)
> Actually, this warning log output does not result in much of a problem,
> because map can build the appropriate membership by the ping.
> However, in order to avoid this warning log is to define the local member
> and make the start-up notification on startup.

Thanks. I was getting there...

I needed to update my configuration to identify the local members. Once
I did that, everything was fine.

Now I can look at the question that prompted me to turn on my clustering
test system in the first place...

Mark


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: svn commit: r1716327 - in /tomcat/trunk/java/org/apache/catalina/tribes/tipis: AbstractReplicatedMap.java LocalStrings.properties

Posted by Keiichi Fujino <kf...@apache.org>.
2016-01-29 21:42 GMT+09:00 Mark Thomas <ma...@apache.org>:

> On 29/01/2016 12:15, Mark Thomas wrote:
> > On 25/11/2015 08:40, kfujino@apache.org wrote:
> >> Author: kfujino
> >> Date: Wed Nov 25 08:40:23 2015
> >> New Revision: 1716327
> >>
> >> URL: http://svn.apache.org/viewvc?rev=1716327&view=rev
> >> Log:
> >> Add null check for mapMember.
> >
> > This appears to create problems when the BackupManager membership is
> > configured using static membership. The static members are not visible
> > to the Channel (they are managed by the Interceptor) so this test always
> > fails and the logs fill with warnings very quickly.
>
> My analysis isn't right. The static members are visible.
>
> I've traced the problem back as far as the unique IDs not matching but I
> am still working on finding the root cause. It could be a config error
> on my part.
>
>

I fixed this problems at r1720074. (see r1720074, r1714920 and r1714919)
Actually, this warning log output does not result in much of a problem,
because map can build the appropriate membership by the ping.
However, in order to avoid this warning log is to define the local member
and make the start-up notification on startup.


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

Re: svn commit: r1716327 - in /tomcat/trunk/java/org/apache/catalina/tribes/tipis: AbstractReplicatedMap.java LocalStrings.properties

Posted by Mark Thomas <ma...@apache.org>.
On 29/01/2016 12:15, Mark Thomas wrote:
> On 25/11/2015 08:40, kfujino@apache.org wrote:
>> Author: kfujino
>> Date: Wed Nov 25 08:40:23 2015
>> New Revision: 1716327
>>
>> URL: http://svn.apache.org/viewvc?rev=1716327&view=rev
>> Log:
>> Add null check for mapMember.
> 
> This appears to create problems when the BackupManager membership is
> configured using static membership. The static members are not visible
> to the Channel (they are managed by the Interceptor) so this test always
> fails and the logs fill with warnings very quickly.

My analysis isn't right. The static members are visible.

I've traced the problem back as far as the unique IDs not matching but I
am still working on finding the root cause. It could be a config error
on my part.

Mark


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: svn commit: r1716327 - in /tomcat/trunk/java/org/apache/catalina/tribes/tipis: AbstractReplicatedMap.java LocalStrings.properties

Posted by Mark Thomas <ma...@apache.org>.
On 25/11/2015 08:40, kfujino@apache.org wrote:
> Author: kfujino
> Date: Wed Nov 25 08:40:23 2015
> New Revision: 1716327
> 
> URL: http://svn.apache.org/viewvc?rev=1716327&view=rev
> Log:
> Add null check for mapMember.

This appears to create problems when the BackupManager membership is
configured using static membership. The static members are not visible
to the Channel (they are managed by the Interceptor) so this test always
fails and the logs fill with warnings very quickly.

Mark


> 
> Modified:
>     tomcat/trunk/java/org/apache/catalina/tribes/tipis/AbstractReplicatedMap.java
>     tomcat/trunk/java/org/apache/catalina/tribes/tipis/LocalStrings.properties
> 
> Modified: tomcat/trunk/java/org/apache/catalina/tribes/tipis/AbstractReplicatedMap.java
> URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/tribes/tipis/AbstractReplicatedMap.java?rev=1716327&r1=1716326&r2=1716327&view=diff
> ==============================================================================
> --- tomcat/trunk/java/org/apache/catalina/tribes/tipis/AbstractReplicatedMap.java (original)
> +++ tomcat/trunk/java/org/apache/catalina/tribes/tipis/AbstractReplicatedMap.java Wed Nov 25 08:40:23 2015
> @@ -734,6 +734,10 @@ public abstract class AbstractReplicated
>          boolean memberAdded = false;
>          //select a backup node if we don't have one
>          Member mapMember = getChannel().getMember(member);
> +        if (mapMember == null) {
> +            log.warn(sm.getString("abstractReplicatedMap.mapMemberAdded.nullMember", member));
> +            return;
> +        }
>          synchronized (mapMembers) {
>              if (!mapMembers.containsKey(mapMember) ) {
>                  mapMembers.put(mapMember, Long.valueOf(System.currentTimeMillis()));
> 
> Modified: tomcat/trunk/java/org/apache/catalina/tribes/tipis/LocalStrings.properties
> URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/tribes/tipis/LocalStrings.properties?rev=1716327&r1=1716326&r2=1716327&view=diff
> ==============================================================================
> --- tomcat/trunk/java/org/apache/catalina/tribes/tipis/LocalStrings.properties (original)
> +++ tomcat/trunk/java/org/apache/catalina/tribes/tipis/LocalStrings.properties Wed Nov 25 08:40:23 2015
> @@ -34,6 +34,7 @@ abstractReplicatedMap.unable.retrieve=Un
>  abstractReplicatedMap.unable.get=Unable to replicate out data for a AbstractReplicatedMap.get operation
>  abstractReplicatedMap.unable.put=Unable to replicate out data for a AbstractReplicatedMap.put operation
>  abstractReplicatedMap.unsupport.operation=This operation is not valid on a replicated map
> +abstractReplicatedMap.mapMemberAdded.nullMember=Notified member is not registered in the membership:{0}.
>  mapMessage.deserialize.error.key=Deserialization error of the MapMessage.key
>  mapMessage.deserialize.error.value=Deserialization error of the MapMessage.value
>  lazyReplicatedMap.unableReplicate.backup=Unable to replicate backup key:{0} to backup:{1}. Reason:{2}
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org