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 4fa1fe97ef fixes flaky test in ExternalCompactionProgressIT (#5772)
4fa1fe97ef is described below

commit 4fa1fe97ef739e734d434face1c018851a293a62
Author: Keith Turner <[email protected]>
AuthorDate: Fri Aug 1 17:07:05 2025 -0400

    fixes flaky test in ExternalCompactionProgressIT (#5772)
    
    testProgressViaMetrics() was looking for metrics from compactor that the
    tablet server could also emit when it did a minor compaction.  Sometimes
    the test would see these tserver metrics and it would cause the test to
    fail.  Modified the test to only consider compactor metrics.
---
 .../accumulo/test/compaction/ExternalCompactionProgressIT.java   | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git 
a/test/src/main/java/org/apache/accumulo/test/compaction/ExternalCompactionProgressIT.java
 
b/test/src/main/java/org/apache/accumulo/test/compaction/ExternalCompactionProgressIT.java
index 7775d303f0..6f70584e9f 100644
--- 
a/test/src/main/java/org/apache/accumulo/test/compaction/ExternalCompactionProgressIT.java
+++ 
b/test/src/main/java/org/apache/accumulo/test/compaction/ExternalCompactionProgressIT.java
@@ -282,11 +282,16 @@ public class ExternalCompactionProgressIT extends 
AccumuloClusterHarness {
             break out;
           }
           TestStatsDSink.Metric metric = TestStatsDSink.parseStatsDMetric(s);
-          if 
(!metric.getName().startsWith(MetricsProducer.METRICS_COMPACTOR_PREFIX)) {
+          // When the tablet server flushes memory to disk that can cause 
metrics that may throw the
+          // test off, so only look for metrics from the compactor.
+          String process = metric.getTags().getOrDefault("process.name", 
"none");
+          if 
(!metric.getName().startsWith(MetricsProducer.METRICS_COMPACTOR_PREFIX)
+              || !process.equals("compactor")) {
             continue;
           }
           int value = Integer.parseInt(metric.getValue());
-          log.debug("Found metric: {} with value: {}", metric.getName(), 
value);
+          log.debug("Found metric: {} {} with value: {}", metric.getName(), 
metric.getTags(),
+              value);
           switch (metric.getName()) {
             case MetricsProducer.METRICS_COMPACTOR_ENTRIES_READ:
               totalEntriesRead.addAndGet(value);

Reply via email to