This is an automated email from the ASF dual-hosted git repository.
asf-gitbox-commits pushed a commit to branch branch-3.9
in repository https://gitbox.apache.org/repos/asf/zookeeper.git
The following commit(s) were added to refs/heads/branch-3.9 by this push:
new 386ba1a62 ZOOKEEPER-5052: Fix stale thread write of primitive in
JvmPauseMonitor
386ba1a62 is described below
commit 386ba1a628ed8330ca75948b315c0a1697cb2ac9
Author: Dávid Paksy <[email protected]>
AuthorDate: Tue Jun 16 15:18:45 2026 +0200
ZOOKEEPER-5052: Fix stale thread write of primitive in JvmPauseMonitor
Reviewers: dsmiley, imankhadiv, anmolnar
Author: PDavid
Closes #2397 from PDavid/ZOOKEEPER-5052-JvmPauseMonitor
(cherry picked from commit 9dd41cd7d993f7004e87bc544c739218c7e24337)
Signed-off-by: Andor Molnar <[email protected]>
---
.../main/java/org/apache/zookeeper/server/util/JvmPauseMonitor.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git
a/zookeeper-server/src/main/java/org/apache/zookeeper/server/util/JvmPauseMonitor.java
b/zookeeper-server/src/main/java/org/apache/zookeeper/server/util/JvmPauseMonitor.java
index cdefb5d29..4a06f3db9 100644
---
a/zookeeper-server/src/main/java/org/apache/zookeeper/server/util/JvmPauseMonitor.java
+++
b/zookeeper-server/src/main/java/org/apache/zookeeper/server/util/JvmPauseMonitor.java
@@ -64,9 +64,9 @@ public class JvmPauseMonitor {
public static final String INFO_THRESHOLD_KEY =
"jvm.pause.info-threshold.ms";
public static final long INFO_THRESHOLD_DEFAULT = 1000;
- private long numGcWarnThresholdExceeded = 0;
- private long numGcInfoThresholdExceeded = 0;
- private long totalGcExtraSleepTime = 0;
+ private volatile long numGcWarnThresholdExceeded = 0;
+ private volatile long numGcInfoThresholdExceeded = 0;
+ private volatile long totalGcExtraSleepTime = 0;
private Thread monitorThread;
private volatile boolean shouldRun = true;