You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by al...@apache.org on 2025/08/28 11:19:16 UTC

(cassandra) branch cep-45-mutation-tracking updated: Fix failing repair tests

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

aleksey pushed a commit to branch cep-45-mutation-tracking
in repository https://gitbox.apache.org/repos/asf/cassandra.git


The following commit(s) were added to refs/heads/cep-45-mutation-tracking by this push:
     new c342b8dd07 Fix failing repair tests
c342b8dd07 is described below

commit c342b8dd07202c1b3b8d1df96e572f8b8da80c62
Author: Aleksey Yeschenko <al...@apache.org>
AuthorDate: Thu Aug 28 12:18:58 2025 +0100

    Fix failing repair tests
---
 .../cassandra/service/reads/tracked/TrackedLocalReads.java       | 2 +-
 .../apache/cassandra/distributed/test/ReadRepairTestBase.java    | 1 +
 .../org/apache/cassandra/distributed/test/ReadRepairTester.java  | 9 +++++++--
 3 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/src/java/org/apache/cassandra/service/reads/tracked/TrackedLocalReads.java b/src/java/org/apache/cassandra/service/reads/tracked/TrackedLocalReads.java
index 9fe03d390a..4f8bca8f25 100644
--- a/src/java/org/apache/cassandra/service/reads/tracked/TrackedLocalReads.java
+++ b/src/java/org/apache/cassandra/service/reads/tracked/TrackedLocalReads.java
@@ -141,8 +141,8 @@ public class TrackedLocalReads implements ExpiredStatePurger.Expireable
                 new Coordinator(readId, promise, command.columnFilter(), read, replicaPlan.consistencyLevel(), requestTime);
         coordinators.put(readId, coordinator);
 
+        // TODO (expected): reconsider the approach to tracked mutation metrics
         ReadRepairMetrics.trackedReconcile.mark();
-        ColumnFamilyStore.metricsFor(command.metadata().id).readRepairRequests.mark();
 
         // TODO (consider): is it possible to exit right here if this is the last missing summary, and we can tell that
         //                  no node needs anything from anyone?
diff --git a/test/distributed/org/apache/cassandra/distributed/test/ReadRepairTestBase.java b/test/distributed/org/apache/cassandra/distributed/test/ReadRepairTestBase.java
index e9d366b9ef..2de3be862a 100644
--- a/test/distributed/org/apache/cassandra/distributed/test/ReadRepairTestBase.java
+++ b/test/distributed/org/apache/cassandra/distributed/test/ReadRepairTestBase.java
@@ -126,6 +126,7 @@ public abstract class ReadRepairTestBase extends TestBaseImpl
     @Test
     public void testBlockingReadRepairAccord() throws Throwable
     {
+        MutationTrackingUtils.fixmeSkipIfTracked(replicationType(), "Accord not supported");
         testReadRepair(ReadRepairStrategy.BLOCKING, true);
     }
 
diff --git a/test/distributed/org/apache/cassandra/distributed/test/ReadRepairTester.java b/test/distributed/org/apache/cassandra/distributed/test/ReadRepairTester.java
index 02868c4df3..ad1d3b65ae 100644
--- a/test/distributed/org/apache/cassandra/distributed/test/ReadRepairTester.java
+++ b/test/distributed/org/apache/cassandra/distributed/test/ReadRepairTester.java
@@ -145,8 +145,13 @@ public abstract class ReadRepairTester<T extends ReadRepairTester<T>>
         // verify the number of repaired rows
         if (strategy == ReadRepairStrategy.NONE)
             expectedRepaired = 0;
-        assertEquals(String.format("Expected %d repaired rows, but found %d", expectedRepaired, actualRepaired),
-                     expectedRepaired, actualRepaired);
+
+        // read repair metric isn't a meaningful one for mutation-tracked replication
+        if (!replicationType.isTracked())
+        {
+            assertEquals(String.format("Expected %d repaired rows, but found %d", expectedRepaired, actualRepaired),
+                         expectedRepaired, actualRepaired);
+        }
 
         return self();
     }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org