This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 11.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/11.0.x by this push: new 684247ae85 Fix for inconsistent metadata was incomplete 684247ae85 is described below commit 684247ae85fa633b9197b32391de59fc54703842 Author: Mark Thomas <ma...@apache.org> AuthorDate: Fri Nov 15 15:55:37 2024 +0000 Fix for inconsistent metadata was incomplete Need to add key to map once created so it is visible to other threads --- java/org/apache/catalina/webresources/DirResourceSet.java | 2 ++ webapps/docs/changelog.xml | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/java/org/apache/catalina/webresources/DirResourceSet.java b/java/org/apache/catalina/webresources/DirResourceSet.java index 02ddc6ec88..f1d4e86199 100644 --- a/java/org/apache/catalina/webresources/DirResourceSet.java +++ b/java/org/apache/catalina/webresources/DirResourceSet.java @@ -382,6 +382,7 @@ public class DirResourceSet extends AbstractFileResourceSet implements WebResour resourceLock = resourceLocksByPath.get(key); if (resourceLock == null) { resourceLock = new ResourceLock(key); + resourceLocksByPath.put(key, resourceLock); } resourceLock.count.incrementAndGet(); } @@ -419,6 +420,7 @@ public class DirResourceSet extends AbstractFileResourceSet implements WebResour resourceLock = resourceLocksByPath.get(key); if (resourceLock == null) { resourceLock = new ResourceLock(key); + resourceLocksByPath.put(key, resourceLock); } resourceLock.count.incrementAndGet(); } diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index 06c8603467..1e3c16f926 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -128,6 +128,10 @@ constructors or property related methods throw a checked exception. (remm) </fix> + <fix> + The previous fix for incosistent resource metadata during concurrent + reads and writes was incomplete. (markt) + </fix> </changelog> </subsection> <subsection name="Coyote"> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org