This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/9.0.x by this push: new 631500b0c9 Fix for inconsistent metadata was incomplete 631500b0c9 is described below commit 631500b0c9b2a2a2abb707e3de2e10a5936e5d41 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 b4b5d0711a..7f2fa71437 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