You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by bd...@apache.org on 2026/02/17 18:23:50 UTC
(cassandra) 02/04: ninja: fix counters test
This is an automated email from the ASF dual-hosted git repository.
bdeggleston pushed a commit to branch cep-45-mutation-tracking
in repository https://gitbox.apache.org/repos/asf/cassandra.git
commit 600640235ea73b6f8225301d27bd2397e94ae851
Author: Blake Eggleston <bl...@ultrablake.com>
AuthorDate: Tue Feb 10 14:48:05 2026 -0800
ninja: fix counters test
---
.../org/apache/cassandra/db/AbstractMutationVerbHandler.java | 2 +-
.../org/apache/cassandra/db/CounterMutationVerbHandler.java | 12 ++++++++++++
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/src/java/org/apache/cassandra/db/AbstractMutationVerbHandler.java b/src/java/org/apache/cassandra/db/AbstractMutationVerbHandler.java
index e83d70bbc1..cb7fe9d8c3 100644
--- a/src/java/org/apache/cassandra/db/AbstractMutationVerbHandler.java
+++ b/src/java/org/apache/cassandra/db/AbstractMutationVerbHandler.java
@@ -200,7 +200,7 @@ public abstract class AbstractMutationVerbHandler<T extends IMutation> implement
* Confirm that the presence/absence of a mutation id matches our expectations for the given keyspace/table/token. If
* it doesn't, then we're not on the same epoch as the coordinator, or there's a bug.
*/
- private ClusterMetadata checkReplicationMigration(ClusterMetadata metadata, Message<T> message, InetAddressAndPort respondTo)
+ protected ClusterMetadata checkReplicationMigration(ClusterMetadata metadata, Message<T> message, InetAddressAndPort respondTo)
{
IMutation mutation = message.payload;
MutationRouting expected = mutation.id().isNone() ? MutationRouting.UNTRACKED : MutationRouting.TRACKED;
diff --git a/src/java/org/apache/cassandra/db/CounterMutationVerbHandler.java b/src/java/org/apache/cassandra/db/CounterMutationVerbHandler.java
index 6d12551c6b..c24262fa9c 100644
--- a/src/java/org/apache/cassandra/db/CounterMutationVerbHandler.java
+++ b/src/java/org/apache/cassandra/db/CounterMutationVerbHandler.java
@@ -26,6 +26,7 @@ import org.apache.cassandra.net.Message;
import org.apache.cassandra.net.MessagingService;
import org.apache.cassandra.replication.ForwardedWrite;
import org.apache.cassandra.service.StorageProxy;
+import org.apache.cassandra.tcm.ClusterMetadata;
import org.apache.cassandra.transport.Dispatcher;
public class CounterMutationVerbHandler extends AbstractMutationVerbHandler<CounterMutation>
@@ -34,6 +35,17 @@ public class CounterMutationVerbHandler extends AbstractMutationVerbHandler<Coun
private static final Logger logger = LoggerFactory.getLogger(CounterMutationVerbHandler.class);
+
+ /**
+ * CounterMutationVerbHandler only forwards counter writes, so we don't expect
+ * it to have a mutation id, or assert it does or doesn't
+ */
+ @Override
+ protected ClusterMetadata checkReplicationMigration(ClusterMetadata metadata, Message<CounterMutation> message, InetAddressAndPort respondTo)
+ {
+ return metadata;
+ }
+
protected void applyMutation(final Message<CounterMutation> message, InetAddressAndPort respondToAddress)
{
final CounterMutation cm = message.payload;
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org