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

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


The following commit(s) were added to refs/heads/10.1.x by this push:
     new cf5d46c18a Review "Make the buffer pool size accounting atomic"
cf5d46c18a is described below

commit cf5d46c18a748957f19c421872208af8fb48225c
Author: Mark Thomas <[email protected]>
AuthorDate: Thu Oct 22 12:41:12 2026 +0100

    Review "Make the buffer pool size accounting atomic"
    
    Make maxSize volatile so updates are published immediately
---
 java/org/apache/catalina/tribes/io/BufferPool.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/org/apache/catalina/tribes/io/BufferPool.java 
b/java/org/apache/catalina/tribes/io/BufferPool.java
index 7b4656c5b9..ddeed3b198 100644
--- a/java/org/apache/catalina/tribes/io/BufferPool.java
+++ b/java/org/apache/catalina/tribes/io/BufferPool.java
@@ -118,7 +118,7 @@ public class BufferPool {
     }
 
     /** Maximum pool size in bytes. */
-    protected int maxSize;
+    protected volatile int maxSize;
     /** Current total size of pooled buffers in bytes. */
     protected final AtomicInteger size = new AtomicInteger(0);
     /** Queue of available buffers. */


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to