You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by GitBox <gi...@apache.org> on 2021/02/11 20:57:01 UTC
[GitHub] [cassandra] dcapwell commented on a change in pull request #889: CASSANDRA-16422
dcapwell commented on a change in pull request #889:
URL: https://github.com/apache/cassandra/pull/889#discussion_r574821153
##########
File path: test/distributed/org/apache/cassandra/distributed/test/hostreplacement/AssassinateAbruptDownedNodeTest.java
##########
@@ -36,4 +40,20 @@ void consume(Cluster cluster, IInvokableInstance nodeToRemove)
{
stopAbrupt(cluster, nodeToRemove);
}
+
+ @Override
+ protected void afterNodeStatusIsLeft(Cluster cluster, IInvokableInstance removedNode)
+ {
+ // Check it is possible to alter keyspaces (see CASSANDRA-16422)
+
+ // First, make sure the node is convicted so the gossiper considers it unreachable
+ InetSocketAddress socketAddress = removedNode.config().broadcastAddress();
+ InetAddressAndPort removedEndpoint = InetAddressAndPort.getByAddressOverrideDefaults(socketAddress.getAddress(),
+ socketAddress.getPort());
+ cluster.get(BaseAssassinatedCase.SEED_NUM).runOnInstance(() -> Gossiper.instance.convict(removedEndpoint, 1.0));
+
+ // Second, try and alter the keyspace. Before the bug was fixed, this would fail as the check includes
+ // unreachable nodes that could have LEFT status.
+ cluster.schemaChangeIgnoringStoppedInstances(String.format("ALTER KEYSPACE %s WITH DURABLE_WRITES = false", KEYSPACE));
Review comment:
this is the current create logic
```
cluster.schemaChange("CREATE KEYSPACE " + KEYSPACE + " WITH replication = {'class': 'SimpleStrategy', 'replication_factor': " + replicationFactor + "};");
```
we should prob do something like comment, so we do not get bitten by default values changing over time.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org