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 2021/04/20 11:14:35 UTC

[tomcat] branch 8.5.x updated: Fix BZ 65251. Correct regression in Manager deployment.

This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/8.5.x by this push:
     new 996bd61  Fix BZ 65251. Correct regression in Manager deployment.
996bd61 is described below

commit 996bd6194952114ec5b0da3010b117c6797d0d2b
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Tue Apr 20 12:11:22 2021 +0100

    Fix BZ 65251. Correct regression in Manager deployment.
    
    Avoid conflict with auto-deployment process that could result in
    concurrent attempts to deploy the same application. One of the attempts
    will fail, triggering errors in the logs.
    
    https://bz.apache.org/bugzilla/show_bug.cgi?id=65251
---
 java/org/apache/catalina/startup/HostConfig.java | 14 +++++++-------
 webapps/docs/changelog.xml                       |  7 +++++++
 2 files changed, 14 insertions(+), 7 deletions(-)

diff --git a/java/org/apache/catalina/startup/HostConfig.java b/java/org/apache/catalina/startup/HostConfig.java
index 1b216ac..b93779d 100644
--- a/java/org/apache/catalina/startup/HostConfig.java
+++ b/java/org/apache/catalina/startup/HostConfig.java
@@ -1666,17 +1666,17 @@ public class HostConfig implements LifecycleListener {
      * @param name The name of the web application to check
      */
     public void check(String name) {
-        DeployedApplication app = deployed.get(name);
-        if (app != null) {
-            if (tryAddServiced(app.name)) {
-                try {
+        if (tryAddServiced(name)) {
+            try {
+                DeployedApplication app = deployed.get(name);
+                if (app != null) {
                     checkResources(app, true);
-                } finally {
-                    removeServiced(app.name);
                 }
+                deployApps(name);
+            } finally {
+                removeServiced(name);
             }
         }
-        deployApps(name);
     }
 
     /**
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index d248431..9643360 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -118,6 +118,13 @@
         <bug>65235</bug>: Add missing attributes to the MBean descriptor file
         for the <code>RemoteIpValve</code>. (markt)
       </fix>
+      <fix>
+        <bug>65251</bug>: Correct a regression introduced in 8.5.64 that meant
+        that the auto-deployment process may attempt a second, concurrent
+        deployment of a web application that is being deployed by the Manager
+        resulting in one of the deployments failing and errors being reported.
+        (markt)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Jasper">

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