This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/master by this push: new 111f9f4 Fix BZ 65251. Correct regression in Manager deployment. 111f9f4 is described below commit 111f9f41a2b1fc350bb42dd4207d01297ce4061a 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 864a742..9cd23e7 100644 --- a/java/org/apache/catalina/startup/HostConfig.java +++ b/java/org/apache/catalina/startup/HostConfig.java @@ -1764,17 +1764,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 8d9fc53..dc81afa 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -122,6 +122,13 @@ <bug>65244</bug>: HandlesTypes should include classes that use the specified annotation types on fields or methods. (remm) </fix> + <fix> + <bug>65251</bug>: Correct a regression introduced in 10.0.3 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-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org