Failed to update replication rate in Cassandra

I am running a cassandra cluster with 3 nodes. Keyspace1 is configured to launch NetworkTopologyStrategy,

[ default@Keyspace1 ] describe Keyspace1; Keyspace: Keyspace1: Replication Strategy: org.apache.cassandra.locator.NetworkTopologyStrategy Durable Writes: true Options: [datacenter1:1] 

I tried updating the replication rate by running this command in Node1 in CLIS cassandra

update keyspace Keyspace1 with strategy_options = {datacenter1: 3};

But when I check again using the Keyspace1 description, I still see Options: [datacenter1: 1], the replication rate does not change. I tried restarting cassandra, tried to perform repair and cleaning on all nodes, but still no effect. What am I missing?

`

+4
source share
1 answer

You are missing [ ] , which wrap the parameters of the strategy. The update code should be:

 UPDATE KEYSPACE Keyspace1 WITH strategy_options = [{datacenter1:3}]; 

If you need more information on how to update the replication rate of your KS through the CLI, I recommend that you take a look at the Datastax documentation.

+5
source

All Articles