cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "赵豫峰" <>
Subject Re: why the cluster does not work well after addding two new nodes
Date Wed, 30 Aug 2017 06:37:38 GMT
Hi, Nandan, thanks for your replay.

1)  Yes the config is wrong. My doubt is why I can get the result when one node is alive,
but can't when two or three nodes are alive;
2)  I guess your mean the auto_bootstrap configure parameter? It is not set in cassandra.yaml;

3) Dose it must  to rebalance when adding new node? I remeber that it’s ok when just add
a new node without any operation before。
Thanks for your advice!

------------------ Original ------------------
From:  "@Nandan@"<>;
Date:  Wed, Aug 30, 2017 01:04 PM
To:  "zhaoyf"<>; "user"<>; 

Subject:  Re: why the cluster does not work well after addding two new nodes

Hi , What happened wrong from starting, I am just listing down:-
1) Had 2 nodes servers but created Keyspace with RF 3. [Always make sure RF <= Total No.
of Nodes]
2) While Adding New Nodes, Make sure that Auto_bootstraping is Enable or not. 
3) Once You added 2 new nodes, better things will be you have to do node rebalance. 
There are 2 different way by which you can do rebalance. 
A) Use OpsCenter -> And select Rebalance Cluster. 
B) Use onnodetool cleanup that node afterward to clean up data no longer belonging to that

Best Regards, 

On Wed, Aug 30, 2017 at 12:14 PM, 赵豫峰 <> wrote:
Hi, I have a cluster with two node servers(I know it’s in a wrong way  but it‘s builded
by another colleague who has left), and it's keyspace set like:

CREATE KEYSPACE my_keyspace WITH replication = {'class': 'SimpleStrategy', 'replication_factor':
'3'}  AND durable_writes = true;

one day my boss said one node was down for a long time and another worked normally, tell my
to restart the cluster.

First, I make a snapshot from the working node;
then, I check the data numbers with select count(*) cql statement, the result is more then
Next, I add two new nodes. After new node worked, I use select count(*)  cql to check the
data several times, but now I get uncertain resluts, and each reslut is less then 10000; I
check node status with ./nodetool status cql, and every node is UN, but the load of two new
nodes is far less then the normal node。
I stop the two new nodes, use “select count(*)” cql and get the right result again.

I build a new cluster in sandbox env with snapshot file, and get the same result like above。
I used "./nodetool repair" sql,then the cluster works well but I don't know why.

I guess it because two nodes with "replication = {'class': 'SimpleStrategy', 'replication_factor':
'3'} " can make splite brain and the data won't be consistent,or the data file is broken
but not make sure。Why did it happen, why I have to use "./nodetool repair" command, and
when to use it?




View raw message