You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2010/11/25 15:12:25 UTC

svn commit: r1039051 - in /tomcat/trunk: java/org/apache/catalina/ha/session/DeltaManager.java webapps/docs/changelog.xml

Author: markt
Date: Thu Nov 25 14:12:24 2010
New Revision: 1039051

URL: http://svn.apache.org/viewvc?rev=1039051&view=rev
Log:
Fix a couple of clustering issues:
 - Don't try and obtain session data from the cluster if the current node is the only node in the cluster.
 - Log requesting session data as INFO rather than WARNING.

Modified:
    tomcat/trunk/java/org/apache/catalina/ha/session/DeltaManager.java
    tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/catalina/ha/session/DeltaManager.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/ha/session/DeltaManager.java?rev=1039051&r1=1039050&r2=1039051&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/ha/session/DeltaManager.java (original)
+++ tomcat/trunk/java/org/apache/catalina/ha/session/DeltaManager.java Thu Nov 25 14:12:24 2010
@@ -802,7 +802,7 @@ public CatalinaCluster getCluster() {
      * @see #findSessionMasterMember()
      */
     public synchronized void getAllClusterSessions() {
-        if (cluster != null && cluster.getMembers().length > 0) {
+        if (cluster != null && cluster.getMembers().length > 1) {
             long beforeSendTime = System.currentTimeMillis();
             Member mbr = findSessionMasterMember();
             if(mbr == null) { // No domain member found
@@ -820,8 +820,8 @@ public CatalinaCluster getCluster() {
                      receiverQueue = true ;
                 }
                 cluster.send(msg, mbr);
-                if (log.isWarnEnabled())
-                    log.warn(sm.getString("deltaManager.waitForSessionState",getName(), mbr, Integer.valueOf(getStateTransferTimeout())));
+                if (log.isInfoEnabled())
+                    log.info(sm.getString("deltaManager.waitForSessionState",getName(), mbr, Integer.valueOf(getStateTransferTimeout())));
                 // FIXME At sender ack mode this method check only the state transfer and resend is a problem!
                 waitForSendAllSessions(beforeSendTime);
             } finally {

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1039051&r1=1039050&r2=1039051&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Thu Nov 25 14:12:24 2010
@@ -70,6 +70,11 @@
         <bug>50185</bug>: Add additional trace level logging to Tribes to assist
         with fault diagnosis. Based on a patch by Ariel. (markt)
       </add>
+      <fix>
+        Don&apos;t try and obtain session data from the cluster if the current
+        node is the only node in the cluster. Log requesting session data as
+        INFO rather than WARNING. (markt)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Web applications">



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


Re: svn commit: r1039051 - in /tomcat/trunk: java/org/apache/catalina/ha/session/DeltaManager.java webapps/docs/changelog.xml

Posted by Mark Thomas <ma...@apache.org>.
On 01/12/2010 02:41, Keiichi Fujino wrote:
> IMHO,
> In current cluster membership implementation, local member is not
> included in the cluster members list.
> "cluster.getMembers().length" returns members that doesn't contain
> local member.
> 
> Therefore, in this rev,
> getAllClusterSessions does not work correctly when two tomcats
> clustering configuration.

Hmm. I need to do some more testing here. I was definitely seeing a
delay on startup even with a single node cluster which suggested this
was returning a non-zero value.

Well, I did some more testing and I can't reproduce the problem I was
seeing. I'll revert that part of the commit.

Mark


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


Re: svn commit: r1039051 - in /tomcat/trunk: java/org/apache/catalina/ha/session/DeltaManager.java webapps/docs/changelog.xml

Posted by Keiichi Fujino <kf...@apache.org>.
IMHO,
In current cluster membership implementation, local member is not
included in the cluster members list.
"cluster.getMembers().length" returns members that doesn't contain
local member.

Therefore, in this rev,
getAllClusterSessions does not work correctly when two tomcats
clustering configuration.

-- 
Keiichi.Fujino

12:24 2010
> New Revision: 1039051
>
> URL: http://svn.apache.org/viewvc?rev=1039051&view=rev
> Log:
> Fix a couple of clustering issues:
>  - Don't try and obtain session data from the cluster if the current node is the only node in the cluster.
>  - Log requesting session data as INFO rather than WARNING.
>
> Modified:
>    tomcat/trunk/java/org/apache/catalina/ha/session/DeltaManager.java
>    tomcat/trunk/webapps/docs/changelog.xml
>
> Modified: tomcat/trunk/java/org/apache/catalina/ha/session/DeltaManager.java
> URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/ha/session/DeltaManager.java?rev=1039051&r1=1039050&r2=1039051&view=diff
> ==============================================================================
> --- tomcat/trunk/java/org/apache/catalina/ha/session/DeltaManager.java (original)
> +++ tomcat/trunk/java/org/apache/catalina/ha/session/DeltaManager.java Thu Nov 25 14:12:24 2010
> @@ -802,7 +802,7 @@ public CatalinaCluster getCluster() {
>      * @see #findSessionMasterMember()
>      */
>     public synchronized void getAllClusterSessions() {
> -        if (cluster != null && cluster.getMembers().length > 0) {
> +        if (cluster != null && cluster.getMembers().length > 1) {
>             long beforeSendTime = System.currentTimeMillis();
>             Member mbr = findSessionMasterMember();
>             if(mbr == null) { // No domain member found
> @@ -820,8 +820,8 @@ public CatalinaCluster getCluster() {
>                      receiverQueue = true ;
>                 }
>                 cluster.send(msg, mbr);
> -                if (log.isWarnEnabled())
> -                    log.warn(sm.getString("deltaManager.waitForSessionState",getName(), mbr, Integer.valueOf(getStateTransferTimeout())));
> +                if (log.isInfoEnabled())
> +                    log.info(sm.getString("deltaManager.waitForSessionState",getName(), mbr, Integer.valueOf(getStateTransferTimeout())));
>                 // FIXME At sender ack mode this method check only the state transfer and resend is a problem!
>                 waitForSendAllSessions(beforeSendTime);
>             } finally {
>
> Modified: tomcat/trunk/webapps/docs/changelog.xml
> URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1039051&r1=1039050&r2=1039051&view=diff
> ==============================================================================
> --- tomcat/trunk/webapps/docs/changelog.xml (original)
> +++ tomcat/trunk/webapps/docs/changelog.xml Thu Nov 25 14:12:24 2010
> @@ -70,6 +70,11 @@
>         <bug>50185</bug>: Add additional trace level logging to Tribes to assist
>         with fault diagnosis. Based on a patch by Ariel. (markt)
>       </add>
> +      <fix>
> +        Don&apos;t try and obtain session data from the cluster if the current
> +        node is the only node in the cluster. Log requesting session data as
> +        INFO rather than WARNING. (markt)
> +      </fix>
>     </changelog>
>   </subsection>
>   <subsection name="Web applications">
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>
>



-- 
Keiichi.Fujino

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