This is an automated email from the ASF dual-hosted git repository. kturner pushed a commit to branch 2.1 in repository https://gitbox.apache.org/repos/asf/accumulo.git
The following commit(s) were added to refs/heads/2.1 by this push: new 5847052ce7 Makes CompactionExecutorsMetrics.registry volatile (#5379) 5847052ce7 is described below commit 5847052ce7685ed4663d72963afc1f23c3c513f4 Author: Keith Turner <ktur...@apache.org> AuthorDate: Tue Mar 4 13:34:16 2025 -0500 Makes CompactionExecutorsMetrics.registry volatile (#5379) This variable is accessed by multiple thread outside of sync block and is not final, so made if volatile to ensure changes are seen. --- .../org/apache/accumulo/tserver/metrics/CompactionExecutorsMetrics.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/metrics/CompactionExecutorsMetrics.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/metrics/CompactionExecutorsMetrics.java index c2aefb6bdf..678d9f0949 100644 --- a/server/tserver/src/main/java/org/apache/accumulo/tserver/metrics/CompactionExecutorsMetrics.java +++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/metrics/CompactionExecutorsMetrics.java @@ -47,7 +47,7 @@ public class CompactionExecutorsMetrics implements MetricsProducer { private volatile List<CeMetrics> ceMetricsList = List.of(); private final Map<CompactionExecutorId,CeMetrics> ceMetricsMap = new HashMap<>(); private final Map<CompactionExecutorId,ExMetrics> exCeMetricsMap = new HashMap<>(); - private MeterRegistry registry = null; + private volatile MeterRegistry registry = null; // public so it can be closed by outside callers public class CeMetrics implements AutoCloseable {