Merge branch 'cassandra-6.0' into trunk

This commit is contained in:
Sam Tunnicliffe 2026-07-30 11:21:35 +01:00
commit 10557d7ffe
1 changed files with 10 additions and 3 deletions

View File

@ -50,7 +50,7 @@ public class CMSShutdownTest extends TestBaseImpl
// This test simulates a CMS node attempting to commit an entry to the log but being unable // This test simulates a CMS node attempting to commit an entry to the log but being unable
// to obtain consensus from other CMS members while it is also shutting down itself. // to obtain consensus from other CMS members while it is also shutting down itself.
try (Cluster cluster = Cluster.build(2) try (Cluster cluster = Cluster.build(2)
.withConfig(c -> c.with(Feature.values())) .withConfig(c -> c.with(Feature.GOSSIP, Feature.NETWORK))
.withInstanceInitializer(BBHelper::install) .withInstanceInitializer(BBHelper::install)
.start()) .start())
{ {
@ -67,8 +67,15 @@ public class CMSShutdownTest extends TestBaseImpl
// latch ensures that every commit will fail as if unable to obtain consensus // latch ensures that every commit will fail as if unable to obtain consensus
// from other CMS members // from other CMS members
State.latch.countDown(); State.latch.countDown();
for (; ;) try
ClusterMetadataService.instance().commit(TriggerSnapshot.instance); {
while (!Thread.currentThread().isInterrupted())
ClusterMetadataService.instance().commit(TriggerSnapshot.instance);
}
catch (Throwable t)
{
// Commits fail by design; an interrupt or a stopped processor on shutdown ends them.
}
} }
public static void scheduleCommits() public static void scheduleCommits()