[ https://issues.apache.org/jira/browse/CASSANDRA-15160?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17193842#comment-17193842 ]
David Capwell commented on CASSANDRA-15160: ------------------------------------------- speaking to Marcus more it turns out that this was a regression in 3.0+ as this behavior was valid in 2.1 {code} package org.apache.cassandra.distributed.upgrade; import java.io.IOException; import org.junit.Test; import org.apache.cassandra.distributed.Cluster; import org.apache.cassandra.distributed.api.ConsistencyLevel; import org.apache.cassandra.distributed.api.IInvokableInstance; import org.apache.cassandra.distributed.shared.Versions; import org.assertj.core.api.Assertions; public class RepairFilteringTest extends UpgradeTestBase { @Test public void emptyDC() throws IOException { Versions versions = Versions.find(); Versions.Version version = versions.getLatest(Versions.Major.v22); try (Cluster cluster = Cluster.build().withVersion(version).withRacks(2, 1, 2).start()) { // 1-2 : datacenter1re // 3-4 : datacenter2 cluster.schemaChange("CREATE KEYSPACE " + KEYSPACE + " WITH replication = {'class': 'NetworkTopologyStrategy', 'datacenter1':2, 'datacenter2':0}"); cluster.schemaChange("CREATE TABLE " + KEYSPACE + ".tbl (id int PRIMARY KEY, i int)"); for (int i = 0; i < 10; i++) cluster.coordinator(1).execute("INSERT INTO " + KEYSPACE + ".tbl (id, i) VALUES (?, ?)", ConsistencyLevel.ALL, i, i); cluster.forEach(i -> i.flush(KEYSPACE)); // choose a node in the DC that doesn't have any replicas IInvokableInstance node = cluster.get(3); Assertions.assertThat(node.config().localDatacenter()).isEqualTo("datacenter2"); // fails with [2020-09-10 11:30:04,139] Repair command #1 failed with error Nothing to repair for (0,1000] in distributed_test_keyspace - aborting. Check the logs on the repair participants for further details node.nodetoolResult("repair", "-full", "-st", "0", "-et", "1000", KEYSPACE, "tbl") .asserts().success(); } } } {code} > Add flag to ignore unreplicated keyspaces during repair > ------------------------------------------------------- > > Key: CASSANDRA-15160 > URL: https://issues.apache.org/jira/browse/CASSANDRA-15160 > Project: Cassandra > Issue Type: Improvement > Components: Consistency/Repair > Reporter: Marcus Eriksson > Assignee: Marcus Eriksson > Priority: Normal > > When a repair is triggered on a node in 'dc2' for a keyspace with replication > factor {'dc1':3, 'dc2':0} we just ignore the repair in versions < 4. In 4.0 > we fail the repair to make sure the operator does not think the keyspace is > fully repaired. > There might be tooling that relies on the old behaviour though, so we should > add a flag to ignore those unreplicated keyspaces > -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org