You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by rj...@apache.org on 2009/07/01 21:16:13 UTC

svn commit: r790321 - in /tomcat: container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/mcast/McastMembership.java container/tc5.5.x/webapps/docs/changelog.xml current/tc5.5.x/STATUS.txt

Author: rjung
Date: Wed Jul  1 19:16:13 2009
New Revision: 790321

URL: http://svn.apache.org/viewvc?rev=790321&view=rev
Log:
Partial fix for BZ 46990: Synchronization issues in cluster membership
reported by FindBugs. Patch provided by Sebb.

Modified:
    tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/mcast/McastMembership.java
    tomcat/container/tc5.5.x/webapps/docs/changelog.xml
    tomcat/current/tc5.5.x/STATUS.txt

Modified: tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/mcast/McastMembership.java
URL: http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/mcast/McastMembership.java?rev=790321&r1=790320&r2=790321&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/mcast/McastMembership.java (original)
+++ tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/mcast/McastMembership.java Wed Jul  1 19:16:13 2009
@@ -38,6 +38,8 @@
 {
     protected static final McastMember[] EMPTY_MEMBERS = new McastMember[0];
     
+    private final Object membersLock = new Object();
+
     /**
      * The name of this membership, has to be the same as the name for the local
      * member
@@ -113,7 +115,7 @@
      * @param member The member to add
      */
     protected void addMcastMember(McastMember member) {
-      synchronized (members) {
+      synchronized (membersLock) {
           McastMember results[] =
             new McastMember[members.length + 1];
           for (int i = 0; i < members.length; i++)
@@ -130,7 +132,7 @@
      * @param member The member to remove
      */
     protected void removeMcastMember(McastMember member) {
-        synchronized (members) {
+        synchronized (membersLock) {
             int n = -1;
             for (int i = 0; i < members.length; i++) {
                 if (members[i] == member) {

Modified: tomcat/container/tc5.5.x/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/webapps/docs/changelog.xml?rev=790321&r1=790320&r2=790321&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/webapps/docs/changelog.xml (original)
+++ tomcat/container/tc5.5.x/webapps/docs/changelog.xml Wed Jul  1 19:16:13 2009
@@ -215,25 +215,29 @@
     </changelog>
   </subsection>
   <subsection name="Cluster">
-   <changelog>
-     <fix>
+    <changelog>
+      <fix>
+        <bug>46990</bug>: Fix synchronization issues in cluster membership
+        reported by FindBugs. Patch provided by Sebb. (markt, rjung)
+      </fix>
+      <fix>
         <bug>47389</bug>: DeltaManager doesn't do session replication if
         notifySessionListenersOnReplication=false.
         Patch by Keiichi Fujino. (fhanik, rjung)
-     </fix>
-     <fix>
+      </fix>
+      <fix>
         Separate statistics counter lock in FastAsyncSocketSender from inherited
         DataSender lock to reduce blocking during failed node detection. (rjung)
-     </fix>
-     <fix>
+      </fix>
+      <fix>
         Handle situation session ID rewriting on fail-over with parallel requests
         from the same client. (pero)
-     </fix>
-     <fix>
+      </fix>
+      <fix>
         <bug>43641</bug>: Use of bind attribute for membership element breaks
         multicast. (rjung)
-     </fix>
-   </changelog>
+      </fix>
+    </changelog>
   </subsection>
   <subsection name="Webapps">
     <changelog>

Modified: tomcat/current/tc5.5.x/STATUS.txt
URL: http://svn.apache.org/viewvc/tomcat/current/tc5.5.x/STATUS.txt?rev=790321&r1=790320&r2=790321&view=diff
==============================================================================
--- tomcat/current/tc5.5.x/STATUS.txt (original)
+++ tomcat/current/tc5.5.x/STATUS.txt Wed Jul  1 19:16:13 2009
@@ -60,13 +60,6 @@
   -1: markt - For the common and combined pattern in ALV there is no space between %t and %r
               For the common and combined pattern in ALV the %r has no opening quote, only the closing quote
 
-* Partial fix for https://issues.apache.org/bugzilla/show_bug.cgi?id=46990
-  Improve locking in cluster membership.
-  Backport of http://svn.apache.org/viewvc?view=rev&revision=771009 from tc6
-  resp. http://svn.apache.org/viewvc?view=rev&revision=789826 from OACC.
-  +1: rjung, kkolinko, markt
-  -1:
-
 * Partial fix for https://issues.apache.org/bugzilla/show_bug.cgi?id=45447
   Add spanish message translations.
   Backport of http://svn.apache.org/viewvc?view=rev&revision=698924 from tc6



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