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


The following commit(s) were added to refs/heads/cep-45-mutation-tracking by 
this push:
     new 0954e4a3f3 ninja: fix  TrackedTransferBounceTest
0954e4a3f3 is described below

commit 0954e4a3f33e0ec233a56208b215f7956f12776e
Author: Blake Eggleston <[email protected]>
AuthorDate: Mon Nov 2 11:29:11 2026 -0800

    ninja: fix  TrackedTransferBounceTest
---
 ...ceTest.java => TrackedTransferBounce2Test.java} | 112 +------------
 .../test/tracking/TrackedTransferBounceTest.java   | 174 +--------------------
 2 files changed, 9 insertions(+), 277 deletions(-)

diff --git 
a/test/distributed/org/apache/cassandra/distributed/test/tracking/TrackedTransferBounceTest.java
 
b/test/distributed/org/apache/cassandra/distributed/test/tracking/TrackedTransferBounce2Test.java
similarity index 63%
copy from 
test/distributed/org/apache/cassandra/distributed/test/tracking/TrackedTransferBounceTest.java
copy to 
test/distributed/org/apache/cassandra/distributed/test/tracking/TrackedTransferBounce2Test.java
index 4a28997ca7..0db7eee565 100644
--- 
a/test/distributed/org/apache/cassandra/distributed/test/tracking/TrackedTransferBounceTest.java
+++ 
b/test/distributed/org/apache/cassandra/distributed/test/tracking/TrackedTransferBounce2Test.java
@@ -24,13 +24,11 @@ import java.util.List;
 import java.util.Set;
 import java.util.function.Consumer;
 
-import org.assertj.core.api.Assertions;
 import org.junit.Test;
 
 import org.apache.cassandra.db.ColumnFamilyStore;
 import org.apache.cassandra.distributed.Cluster;
 import org.apache.cassandra.distributed.api.IInstanceConfig;
-import org.apache.cassandra.distributed.api.IInstanceInitializer;
 import org.apache.cassandra.distributed.api.IInvokableInstance;
 import org.apache.cassandra.io.util.File;
 import org.apache.cassandra.tcm.ClusterMetadata;
@@ -38,110 +36,10 @@ import org.apache.cassandra.tcm.ClusterMetadata;
 import static org.apache.cassandra.distributed.shared.AssertUtils.assertRows;
 import static org.apache.cassandra.distributed.shared.AssertUtils.row;
 import static 
org.apache.cassandra.distributed.test.log.ClusterMetadataTestHelper.waitForEpochOf;
-import static org.apache.cassandra.replication.ActivationRequest.Phase.COMMIT;
 import static org.junit.Assert.assertTrue;
 
-public class TrackedTransferBounceTest extends TrackedTransferTestBase
+public class TrackedTransferBounce2Test extends TrackedTransferTestBase
 {
-    /*
-     * When an import fails, bounce must not move the pending SSTables into 
the live set.
-     */
-    @Test
-    public void testBounceAfterPendingImport() throws Throwable
-    {
-        IInstanceInitializer initializer = 
ByteBuddyInjections.SkipActivation.install(1, 2, 3);
-        try (Cluster cluster = cluster(initializer))
-        {
-            ByteBuddyInjections.SkipActivation.setup(cluster, COMMIT);
-            createSchema(cluster);
-
-            Assertions.assertThatThrownBy(() -> doImport(cluster))
-                      .hasMessageContaining("Failed adding SSTables")
-                      .cause()
-                      .hasMessageContaining("Tracked transfer failed during 
COMMIT");
-
-            assertPendingActivation(cluster);
-            assertLocalSelect(cluster, rows -> assertRows(rows, EMPTY_ROWS));
-
-            long[] marks = new long[NODES];
-            for (int node = 1; node <= NODES; node++)
-                marks[node - 1] = cluster.get(node).logs().mark();
-
-            bounce(cluster);
-
-            assertPendingActivation(cluster);
-            assertLocalSelect(cluster, rows -> assertRows(rows, EMPTY_ROWS));
-
-            // The pending set is not durable, so the restart must reload the 
staged transfers from disk, otherwise they
-            // could never be activated or failed and would sit unreferenced 
in pending/ forever
-            for (int node = 1; node <= NODES; node++)
-                Assertions.assertThat(cluster.get(node).logs().grep(marks[node 
- 1], "Recovered pending transfer").getResult())
-                          .describedAs("node%d did not recover its staged 
transfers after the bounce", node)
-                          .isNotEmpty();
-        }
-    }
-
-    @Test
-    public void testBounceAfterPendingShardAlignedZeroCopy() throws IOException
-    {
-        testBounceAfterPendingRepair(ZCS_CONFIG, "repair", "--start-token", 
SHARD_ALIGNED_RANGE_1.left.toString(), "--end-token", 
SHARD_ALIGNED_RANGE_1.right.toString(), "--full", KEYSPACE);
-    }
-
-    @Test
-    public void testBounceAfterPendingAcrossShardsZeroCopy() throws IOException
-    {
-        testBounceAfterPendingRepair(ZCS_CONFIG, "repair", "--full", KEYSPACE);
-    }
-
-    @Test
-    public void testBounceAfterPendingShardAlignedNonZeroCopy() throws 
IOException
-    {
-        testBounceAfterPendingRepair(NON_ZCS_CONFIG, "repair", 
"--start-token", SHARD_ALIGNED_RANGE_1.left.toString(), "--end-token", 
SHARD_ALIGNED_RANGE_1.right.toString(), "--full", KEYSPACE);
-    }
-
-    @Test
-    public void testBounceAfterPendingAcrossShardsNonZeroCopy() throws 
IOException
-    {
-        testBounceAfterPendingRepair(NON_ZCS_CONFIG, "repair", "--full", 
KEYSPACE);
-    }
-
-    /*
-     * When a repair fails, bounce must not move the pending SSTables into the 
live set.
-     */
-    private static void testBounceAfterPendingRepair(Consumer<IInstanceConfig> 
config, String... repairCommandAndArgs) throws IOException
-    {
-        IInstanceInitializer initializer = 
ByteBuddyInjections.SkipActivation.install(1, 2, 3);
-
-        try (Cluster cluster = cluster(config, initializer))
-        {
-            // Make sure we fail on commit...
-            ByteBuddyInjections.SkipActivation.setup(cluster, COMMIT);
-
-            cluster.schemaChange("CREATE KEYSPACE " + KEYSPACE + " WITH 
replication = {'class': 'SimpleStrategy', 'replication_factor': 3} AND 
replication_type='tracked';");
-            cluster.schemaChange("CREATE TABLE " + tableWithKeyspace(KEYSPACE) 
+ " (pk BLOB PRIMARY KEY, v INT)");
-
-            cluster.get(1).executeInternal("INSERT INTO " + 
tableWithKeyspace(KEYSPACE) + " (pk, v) VALUES (?, 1)", KEY_100);
-
-            assertRows(cluster.get(1).executeInternal("SELECT * FROM " + 
tableWithKeyspace(KEYSPACE) + " WHERE pk = ?", KEY_100), row(KEY_100, 1));
-            assertRows(cluster.get(2).executeInternal("SELECT * FROM " + 
tableWithKeyspace(KEYSPACE) + " WHERE pk = ?", KEY_100));
-            assertRows(cluster.get(3).executeInternal("SELECT * FROM " + 
tableWithKeyspace(KEYSPACE) + " WHERE pk = ?", KEY_100));
-
-            
cluster.get(1).nodetoolResult(repairCommandAndArgs).asserts().failure().errorContains("Tracked
 transfer failed during COMMIT");
-
-            assertPendingActivation(cluster);
-            assertRows(cluster.get(1).executeInternal("SELECT * FROM " + 
tableWithKeyspace(KEYSPACE) + " WHERE pk = ?", KEY_100), row(KEY_100, 1));
-            assertRows(cluster.get(2).executeInternal("SELECT * FROM " + 
tableWithKeyspace(KEYSPACE) + " WHERE pk = ?", KEY_100));
-            assertRows(cluster.get(3).executeInternal("SELECT * FROM " + 
tableWithKeyspace(KEYSPACE) + " WHERE pk = ?", KEY_100));
-
-            bounce(cluster);
-
-            assertPendingActivation(cluster);
-            assertRows(cluster.get(1).executeInternal("SELECT * FROM " + 
tableWithKeyspace(KEYSPACE) + " WHERE pk = ?", KEY_100), row(KEY_100, 1));
-            assertRows(cluster.get(2).executeInternal("SELECT * FROM " + 
tableWithKeyspace(KEYSPACE) + " WHERE pk = ?", KEY_100));
-            assertRows(cluster.get(3).executeInternal("SELECT * FROM " + 
tableWithKeyspace(KEYSPACE) + " WHERE pk = ?", KEY_100));
-        }
-    }
-
     @Test
     public void testBounceAfterMigrationRepairDoesNotUsePendingDirZeroCopy() 
throws IOException
     {
@@ -160,7 +58,7 @@ public class TrackedTransferBounceTest extends 
TrackedTransferTestBase
         try (Cluster cluster = cluster(config))
         {
             cluster.schemaChange("CREATE KEYSPACE " + migrationKeyspace + " 
WITH replication = " +
-                                  "{'class': 'SimpleStrategy', 
'replication_factor': 3} AND replication_type='untracked'");
+                                 "{'class': 'SimpleStrategy', 
'replication_factor': 3} AND replication_type='untracked'");
             cluster.schemaChange("CREATE TABLE " + 
tableWithKeyspace(migrationKeyspace) + " (pk BLOB PRIMARY KEY, v INT)");
             waitForEpochOf(cluster, 1);
 
@@ -208,7 +106,7 @@ public class TrackedTransferBounceTest extends 
TrackedTransferTestBase
         try (Cluster cluster = cluster(config))
         {
             cluster.schemaChange("CREATE KEYSPACE " + migrationKeyspace + " 
WITH replication = " +
-                                  "{'class': 'SimpleStrategy', 
'replication_factor': 3} AND replication_type='untracked'");
+                                 "{'class': 'SimpleStrategy', 
'replication_factor': 3} AND replication_type='untracked'");
             cluster.schemaChange("CREATE TABLE " + 
tableWithKeyspace(migrationKeyspace) + " (pk BLOB PRIMARY KEY, v INT)");
             waitForEpochOf(cluster, 1);
 
@@ -267,7 +165,7 @@ public class TrackedTransferBounceTest extends 
TrackedTransferTestBase
             assertRows(cluster.get(3).executeInternal("SELECT * FROM " + 
tableWithKeyspace(KEYSPACE) + " WHERE pk = ?", KEY_100));
 
             // Run repair without SkipActivation (normal activation succeeds 
on coordinator and followers)
-            cluster.get(1).nodetoolResult("repair", "--start-token", 
SHARD_ALIGNED_RANGE_1.left.toString(), "--end-token", 
SHARD_ALIGNED_RANGE_1.right.toString(), "--full", KEYSPACE).asserts().success();
+            cluster.get(1).nodetoolResult("repair", "--start-token", 
SHARD_ALIGNED_RANGE_1.left.toString(), "--end-token", 
SHARD_ALIGNED_RANGE_1.right.toString(), "--full", "--skip-sync", 
KEYSPACE).asserts().success();
 
             for (int node = 1; node <= NODES; node++)
                 assertRows(cluster.get(node).executeInternal("SELECT * FROM " 
+ tableWithKeyspace(KEYSPACE) + " WHERE pk = ?", KEY_100), row(KEY_100, 1));
@@ -283,7 +181,7 @@ public class TrackedTransferBounceTest extends 
TrackedTransferTestBase
         }
     }
 
-    private static List<String> getPendingSSTableDirs(IInvokableInstance 
instance, String keyspace)
+    static List<String> getPendingSSTableDirs(IInvokableInstance instance, 
String keyspace)
     {
         return instance.callOnInstance(() -> {
             ColumnFamilyStore cfs = ColumnFamilyStore.getIfExists(keyspace, 
TABLE);
diff --git 
a/test/distributed/org/apache/cassandra/distributed/test/tracking/TrackedTransferBounceTest.java
 
b/test/distributed/org/apache/cassandra/distributed/test/tracking/TrackedTransferBounceTest.java
index 4a28997ca7..4d182c3e1e 100644
--- 
a/test/distributed/org/apache/cassandra/distributed/test/tracking/TrackedTransferBounceTest.java
+++ 
b/test/distributed/org/apache/cassandra/distributed/test/tracking/TrackedTransferBounceTest.java
@@ -19,27 +19,18 @@
 package org.apache.cassandra.distributed.test.tracking;
 
 import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Set;
 import java.util.function.Consumer;
 
 import org.assertj.core.api.Assertions;
 import org.junit.Test;
 
-import org.apache.cassandra.db.ColumnFamilyStore;
 import org.apache.cassandra.distributed.Cluster;
 import org.apache.cassandra.distributed.api.IInstanceConfig;
 import org.apache.cassandra.distributed.api.IInstanceInitializer;
-import org.apache.cassandra.distributed.api.IInvokableInstance;
-import org.apache.cassandra.io.util.File;
-import org.apache.cassandra.tcm.ClusterMetadata;
 
 import static org.apache.cassandra.distributed.shared.AssertUtils.assertRows;
 import static org.apache.cassandra.distributed.shared.AssertUtils.row;
-import static 
org.apache.cassandra.distributed.test.log.ClusterMetadataTestHelper.waitForEpochOf;
 import static org.apache.cassandra.replication.ActivationRequest.Phase.COMMIT;
-import static org.junit.Assert.assertTrue;
 
 public class TrackedTransferBounceTest extends TrackedTransferTestBase
 {
@@ -84,25 +75,25 @@ public class TrackedTransferBounceTest extends 
TrackedTransferTestBase
     @Test
     public void testBounceAfterPendingShardAlignedZeroCopy() throws IOException
     {
-        testBounceAfterPendingRepair(ZCS_CONFIG, "repair", "--start-token", 
SHARD_ALIGNED_RANGE_1.left.toString(), "--end-token", 
SHARD_ALIGNED_RANGE_1.right.toString(), "--full", KEYSPACE);
+        testBounceAfterPendingRepair(ZCS_CONFIG, "repair", "--start-token", 
SHARD_ALIGNED_RANGE_1.left.toString(), "--end-token", 
SHARD_ALIGNED_RANGE_1.right.toString(), "--full", "--skip-sync", KEYSPACE);
     }
 
     @Test
     public void testBounceAfterPendingAcrossShardsZeroCopy() throws IOException
     {
-        testBounceAfterPendingRepair(ZCS_CONFIG, "repair", "--full", KEYSPACE);
+        testBounceAfterPendingRepair(ZCS_CONFIG, "repair", "--full", 
"--skip-sync", KEYSPACE);
     }
 
     @Test
     public void testBounceAfterPendingShardAlignedNonZeroCopy() throws 
IOException
     {
-        testBounceAfterPendingRepair(NON_ZCS_CONFIG, "repair", 
"--start-token", SHARD_ALIGNED_RANGE_1.left.toString(), "--end-token", 
SHARD_ALIGNED_RANGE_1.right.toString(), "--full", KEYSPACE);
+        testBounceAfterPendingRepair(NON_ZCS_CONFIG, "repair", 
"--start-token", SHARD_ALIGNED_RANGE_1.left.toString(), "--end-token", 
SHARD_ALIGNED_RANGE_1.right.toString(), "--full", "--skip-sync", KEYSPACE);
     }
 
     @Test
     public void testBounceAfterPendingAcrossShardsNonZeroCopy() throws 
IOException
     {
-        testBounceAfterPendingRepair(NON_ZCS_CONFIG, "repair", "--full", 
KEYSPACE);
+        testBounceAfterPendingRepair(NON_ZCS_CONFIG, "repair", "--full", 
"--skip-sync", KEYSPACE);
     }
 
     /*
@@ -142,161 +133,4 @@ public class TrackedTransferBounceTest extends 
TrackedTransferTestBase
         }
     }
 
-    @Test
-    public void testBounceAfterMigrationRepairDoesNotUsePendingDirZeroCopy() 
throws IOException
-    {
-        testBounceAfterMigrationRepairDoesNotUsePendingDir(ZCS_CONFIG);
-    }
-
-    @Test
-    public void 
testBounceAfterMigrationRepairDoesNotUsePendingDirNonZeroCopy() throws 
IOException
-    {
-        testBounceAfterMigrationRepairDoesNotUsePendingDir(NON_ZCS_CONFIG);
-    }
-
-    private static void 
testBounceAfterMigrationRepairDoesNotUsePendingDir(Consumer<IInstanceConfig> 
config) throws IOException
-    {
-        String migrationKeyspace = "migration_pending_test";
-        try (Cluster cluster = cluster(config))
-        {
-            cluster.schemaChange("CREATE KEYSPACE " + migrationKeyspace + " 
WITH replication = " +
-                                  "{'class': 'SimpleStrategy', 
'replication_factor': 3} AND replication_type='untracked'");
-            cluster.schemaChange("CREATE TABLE " + 
tableWithKeyspace(migrationKeyspace) + " (pk BLOB PRIMARY KEY, v INT)");
-            waitForEpochOf(cluster, 1);
-
-            cluster.get(2).executeInternal("INSERT INTO " + 
tableWithKeyspace(migrationKeyspace) + " (pk, v) VALUES (?, 7)", KEY_201);
-
-            assertRows(cluster.get(1).executeInternal("SELECT * FROM " + 
tableWithKeyspace(migrationKeyspace) + " WHERE pk = ?", KEY_201));
-            assertRows(cluster.get(2).executeInternal("SELECT * FROM " + 
tableWithKeyspace(migrationKeyspace) + " WHERE pk = ?", KEY_201), row(KEY_201, 
7));
-            assertRows(cluster.get(3).executeInternal("SELECT * FROM " + 
tableWithKeyspace(migrationKeyspace) + " WHERE pk = ?", KEY_201));
-
-            cluster.schemaChange("ALTER KEYSPACE " + migrationKeyspace + " 
WITH replication_type='tracked'");
-            waitForEpochOf(cluster, 1);
-
-            boolean migrating = cluster.get(1).callOnInstance(() -> 
ClusterMetadata.current().mutationTrackingMigrationState.isMigrating(migrationKeyspace));
-            assertTrue("Keyspace should be in themiddle of migration before 
repair", migrating);
-
-            cluster.get(1).nodetoolResult("repair", "--full", 
migrationKeyspace).asserts().success();
-
-            // The row is visible locally on node1 immediately after repair
-            assertRows(cluster.get(1).executeInternal("SELECT * FROM " + 
tableWithKeyspace(migrationKeyspace) + " WHERE pk = ?", KEY_201), row(KEY_201, 
7));
-
-            assertTrue("Migration repair should not stream into the pending 
directory on node1",
-                       getPendingSSTableDirs(cluster.get(1), 
migrationKeyspace).isEmpty());
-
-            bounce(cluster);
-
-            assertRows(cluster.get(1).executeInternal("SELECT * FROM " + 
tableWithKeyspace(migrationKeyspace) + " WHERE pk = ?", KEY_201), row(KEY_201, 
7));
-        }
-    }
-
-    @Test
-    public void 
testIncrementalRepairDuringMigrationDoesNotUsePendingDirZeroCopy() throws 
IOException
-    {
-        testIncrementalRepairDuringMigrationDoesNotUsePendingDir(ZCS_CONFIG);
-    }
-
-    @Test
-    public void 
testIncrementalRepairDuringMigrationDoesNotUsePendingDirNonZeroCopy() throws 
IOException
-    {
-        
testIncrementalRepairDuringMigrationDoesNotUsePendingDir(NON_ZCS_CONFIG);
-    }
-
-    private static void 
testIncrementalRepairDuringMigrationDoesNotUsePendingDir(Consumer<IInstanceConfig>
 config) throws IOException
-    {
-        String migrationKeyspace = "migration_incremental_test";
-        try (Cluster cluster = cluster(config))
-        {
-            cluster.schemaChange("CREATE KEYSPACE " + migrationKeyspace + " 
WITH replication = " +
-                                  "{'class': 'SimpleStrategy', 
'replication_factor': 3} AND replication_type='untracked'");
-            cluster.schemaChange("CREATE TABLE " + 
tableWithKeyspace(migrationKeyspace) + " (pk BLOB PRIMARY KEY, v INT)");
-            waitForEpochOf(cluster, 1);
-
-            // Data only on node2, so the repair has to stream it to the other 
replicas.
-            cluster.get(2).executeInternal("INSERT INTO " + 
tableWithKeyspace(migrationKeyspace) + " (pk, v) VALUES (?, 7)", KEY_201);
-
-            assertRows(cluster.get(1).executeInternal("SELECT * FROM " + 
tableWithKeyspace(migrationKeyspace) + " WHERE pk = ?", KEY_201));
-            assertRows(cluster.get(2).executeInternal("SELECT * FROM " + 
tableWithKeyspace(migrationKeyspace) + " WHERE pk = ?", KEY_201), row(KEY_201, 
7));
-            assertRows(cluster.get(3).executeInternal("SELECT * FROM " + 
tableWithKeyspace(migrationKeyspace) + " WHERE pk = ?", KEY_201));
-
-            cluster.schemaChange("ALTER KEYSPACE " + migrationKeyspace + " 
WITH replication_type='tracked'");
-            waitForEpochOf(cluster, 1);
-
-            boolean migrating = cluster.get(1).callOnInstance(() -> 
ClusterMetadata.current().mutationTrackingMigrationState.isMigrating(migrationKeyspace));
-            assertTrue("Keyspace should be migrating before the incremental 
repair", migrating);
-
-            // trigger an incremental repair session while the keyspace is 
migrating
-            cluster.get(1).nodetoolResult("repair", 
migrationKeyspace).asserts().success();
-
-            // The row was streamed to node1, and none of the repair output is 
treated as a tracked transfer
-            assertRows(cluster.get(1).executeInternal("SELECT * FROM " + 
tableWithKeyspace(migrationKeyspace) + " WHERE pk = ?", KEY_201), row(KEY_201, 
7));
-            for (int node = 1; node <= NODES; node++)
-                assertTrue("Incremental repair during migration should not 
stream into the pending directory on node" + node,
-                           getPendingSSTableDirs(cluster.get(node), 
migrationKeyspace).isEmpty());
-
-            bounce(cluster);
-
-            // Data survives the bounce because it was made live
-            assertRows(cluster.get(1).executeInternal("SELECT * FROM " + 
tableWithKeyspace(migrationKeyspace) + " WHERE pk = ?", KEY_201), row(KEY_201, 
7));
-        }
-    }
-
-    @Test
-    public void testBounceAfterSuccessfulTrackedRepairActivationZeroCopy() 
throws IOException
-    {
-        testBounceAfterSuccessfulTrackedRepairActivation(ZCS_CONFIG);
-    }
-
-    @Test
-    public void testBounceAfterSuccessfulTrackedRepairActivationNonZeroCopy() 
throws IOException
-    {
-        testBounceAfterSuccessfulTrackedRepairActivation(NON_ZCS_CONFIG);
-    }
-
-    private static void 
testBounceAfterSuccessfulTrackedRepairActivation(Consumer<IInstanceConfig> 
config) throws IOException
-    {
-        try (Cluster cluster = cluster(config))
-        {
-            cluster.schemaChange("CREATE KEYSPACE " + KEYSPACE + " WITH 
replication = {'class': 'SimpleStrategy', 'replication_factor': 3} AND 
replication_type='tracked';");
-            cluster.schemaChange("CREATE TABLE " + tableWithKeyspace(KEYSPACE) 
+ " (pk BLOB PRIMARY KEY, v INT)");
-
-            cluster.get(1).executeInternal("INSERT INTO " + 
tableWithKeyspace(KEYSPACE) + " (pk, v) VALUES (?, 1)", KEY_100);
-
-            assertRows(cluster.get(1).executeInternal("SELECT * FROM " + 
tableWithKeyspace(KEYSPACE) + " WHERE pk = ?", KEY_100), row(KEY_100, 1));
-            assertRows(cluster.get(2).executeInternal("SELECT * FROM " + 
tableWithKeyspace(KEYSPACE) + " WHERE pk = ?", KEY_100));
-            assertRows(cluster.get(3).executeInternal("SELECT * FROM " + 
tableWithKeyspace(KEYSPACE) + " WHERE pk = ?", KEY_100));
-
-            // Run repair without SkipActivation (normal activation succeeds 
on coordinator and followers)
-            cluster.get(1).nodetoolResult("repair", "--start-token", 
SHARD_ALIGNED_RANGE_1.left.toString(), "--end-token", 
SHARD_ALIGNED_RANGE_1.right.toString(), "--full", KEYSPACE).asserts().success();
-
-            for (int node = 1; node <= NODES; node++)
-                assertRows(cluster.get(node).executeInternal("SELECT * FROM " 
+ tableWithKeyspace(KEYSPACE) + " WHERE pk = ?", KEY_100), row(KEY_100, 1));
-
-            bounce(cluster);
-
-            for (int node = 1; node <= NODES; node++)
-            {
-                assertRows(cluster.get(node).executeInternal("SELECT * FROM " 
+ tableWithKeyspace(KEYSPACE) + " WHERE pk = ?", KEY_100), row(KEY_100, 1));
-                assertTrue("Node " + node + " should have cleaned up its 
pending transfer directory after activation and bounce",
-                           getPendingSSTableDirs(cluster.get(node), 
KEYSPACE).isEmpty());
-            }
-        }
-    }
-
-    private static List<String> getPendingSSTableDirs(IInvokableInstance 
instance, String keyspace)
-    {
-        return instance.callOnInstance(() -> {
-            ColumnFamilyStore cfs = ColumnFamilyStore.getIfExists(keyspace, 
TABLE);
-            Set<File> pendingLocations = 
cfs.getDirectories().getPendingLocations();
-
-            List<String> pendingUuidDirs = new ArrayList<>();
-            for (File pendingDir : pendingLocations)
-            {
-                File[] uuidDirs = pendingDir.listUnchecked(File::isDirectory);
-                for (File dir : uuidDirs)
-                    pendingUuidDirs.add(dir.absolutePath());
-            }
-            return pendingUuidDirs;
-        });
-    }
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to