One more question though, I tried to replace a node with a new node with the same IP, Here is what we did:
* drain the node * check nodetool on other nodes, and this node is marked down (the token for this node is 100) * clear the data, commit log, saved cache on the down node. * change initial_token from 100 to 99 in the yaml file * start the node * check nodetool, the down node of 100 disappeared by itself (!!) and new node with token 99 showed up * checked log, see the message saying bootstrap completed. But only a couple of MB streamed. * nodetool movetoken 98 * nodetool, see the node with token 98 comes up. * check log, see the message saying bootstrap completed. But still only a couple of MB streamed. The only reason I can think of is that the new node has the same IP as the "dead" node we tried to replace? After reading the bootstrap code, it shouldn't be the case. Is it a bug? Or anyone tried to replace a dead node with the same IP? Thanks. -Wei ----- Original Message ----- From: "Wei Zhu" <wz1...@yahoo.com> To: user@cassandra.apache.org Sent: Thursday, January 31, 2013 3:14:59 PM Subject: Re: General question regarding bootstrap and nodetool repair Thanks Rob. I think you are right on it. Here is what I found: https://github.com/apache/cassandra/blob/cassandra-1.1.0/src/java/org/apache/cassandra/dht/RangeStreamer.java#L140 It sorts the end point by proximity and in https://github.com/apache/cassandra/blob/cassandra-1.1.0/src/java/org/apache/cassandra/dht/RangeStreamer.java#L171 It fetches the data from the only one source. That answers my question. So we will have to run repair after the bootstrap to make sure the consistency. Thanks. -Wei From: Rob Coli <rc...@palominodb.com> To: user@cassandra.apache.org Sent: Thursday, January 31, 2013 1:50 PM Subject: Re: General question regarding bootstrap and nodetool repair On Thu, Jan 31, 2013 at 12:19 PM, Wei Zhu < wz1...@yahoo.com > wrote: But I am still not sure how about the my first question regarding the bootstrap, anyone? As I understand it, bootstrap occurs from a single replica. Which replica is chosen is based on some internal estimation of which is closest/least loaded/etc. But only from a single replica, so in RF=3, in order to be consistent with both you still have to run a repair. =Rob -- =Robert Coli AIM>ALK - rc...@palominodb.com YAHOO - rcoli.palominob SKYPE - rcoli_palominodb