This is an automated email from the ASF dual-hosted git repository. rmaucher pushed a commit to branch 10.1.x in repository https://gitbox.apache.org/repos/asf/tomcat.git
commit 1b45a21bd6af41bb06c272115e2ff918d3ccfd32 Author: opencode <[email protected]> AuthorDate: Thu Oct 8 16:21:04 2026 +0200 Use a consistent key when adding and removing serviced entries during legacy application migration. migrateLegacyApps() guarded migration with tryAddServiced(cn.getBaseName()) but both removal paths (the submit failure catch block and the MigrateApp runnable) call removeServiced(cn.getName()). Because ContextName.getBaseName() (e.g. "app") and ContextName.getName() (e.g. "/app") are different strings, the base-name entry was never removed from the serviced set. This left a stale entry per migrated legacy application and, more importantly, caused every subsequent periodic check to skip re-migration of that application (e.g. after the admin replaces an updated WAR in legacyAppBase, or after a transient migration failure) until Tomcat was restarted. Key the add with cn.getName() so it matches the removals and the convention used by every other serviced-set caller (deploy, undeploy, Manager, etc.). --- java/org/apache/catalina/startup/HostConfig.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/org/apache/catalina/startup/HostConfig.java b/java/org/apache/catalina/startup/HostConfig.java index da949566e3..da2baca502 100644 --- a/java/org/apache/catalina/startup/HostConfig.java +++ b/java/org/apache/catalina/startup/HostConfig.java @@ -1204,7 +1204,7 @@ public class HostConfig implements LifecycleListener { continue; } - if (tryAddServiced(cn.getBaseName())) { + if (tryAddServiced(cn.getName())) { try { // MigrateApp will call removeServiced results.add(es.submit(new MigrateApp(this, cn, source, destination))); --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
