[jira] [Commented] (CASSANDRA-5768) If a Seed can't be contacted, a new node comes up as a cluster of 1

2013-07-24 Thread Robert Coli (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-5768?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13718931#comment-13718931
 ] 

Robert Coli commented on CASSANDRA-5768:


This comment is not particularly substantive, I just want to express my 
enthusiasm for this behavior being fixed. YAY! This formerly very 
confusing-to-noobs behavior will now be much less potentially confusing. Thanks 
to the reporter and to the contributors of the patch! :D

 If a Seed can't be contacted, a new node comes up as a cluster of 1
 ---

 Key: CASSANDRA-5768
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5768
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 2.0 beta 1
Reporter: Andy Cobley
Assignee: Brandon Williams
Priority: Minor
 Fix For: 1.2.7, 2.0 beta 2

 Attachments: 5768.txt, cassandra.yaml


 Setting up a new test cluster using  2.0.0-beta1 and I noticed the following 
 behaviour with vnodes turned on.  
 I bring up one node all well and good.  however if I bring up a second node, 
 that can't contact the first (the first being the seed for the second) after 
 a short period of time, the second goes ahead and assumes it's the only node 
 and bootstraps with all tokens.  
 NOTE also this email from Robert Coli 
 To: u...@cassandra.apache.org
 Obviously if you have defined a seed and cannot contact it, the node should 
 not start as a cluster of one. I have a to-do list item to file a JIRA on the 
 subject, but if you wanted to file and link us, that'd be super. :)
 Startup trace (from the can't contact the seed messages below).
 http://aep.appspot.com/display/ABcWltCES1srzPrj5CkS69-GB8o/

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-5768) If a Seed can't be contacted, a new node comes up as a cluster of 1

2013-07-18 Thread Andy Cobley (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-5768?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13712133#comment-13712133
 ] 

Andy Cobley commented on CASSANDRA-5768:


I tried 5768.txt on cassandra-trunk.  It does halt cassandra if the seed can't 
be connected (with  java.lang.IllegalStateException: Unable to contact any 
seeds!)

However it also halts with the same exception if seeds is set to 127.0.0.1 (the 
default in cassandra.yaml):

seed_provider:
# Addresses of hosts that are deemed contact points.
# Cassandra nodes use this list of hosts to find each other and learn
# the topology of the ring.  You must change this if you are running
# multiple nodes!
- class_name: org.apache.cassandra.locator.SimpleSeedProvider
  parameters:
  # seeds is actually a comma-delimited list of addresses.
  # Ex: ip1,ip2,ip3
  - seeds: 127.0.0.1

So thats not correct I guess.

 If a Seed can't be contacted, a new node comes up as a cluster of 1
 ---

 Key: CASSANDRA-5768
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5768
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 2.0 beta 1
Reporter: Andy Cobley
Assignee: Brandon Williams
Priority: Minor
 Fix For: 2.0 beta 2

 Attachments: 5768.txt


 Setting up a new test cluster using  2.0.0-beta1 and I noticed the following 
 behaviour with vnodes turned on.  
 I bring up one node all well and good.  however if I bring up a second node, 
 that can't contact the first (the first being the seed for the second) after 
 a short period of time, the second goes ahead and assumes it's the only node 
 and bootstraps with all tokens.  
 NOTE also this email from Robert Coli 
 To: u...@cassandra.apache.org
 Obviously if you have defined a seed and cannot contact it, the node should 
 not start as a cluster of one. I have a to-do list item to file a JIRA on the 
 subject, but if you wanted to file and link us, that'd be super. :)
 Startup trace (from the can't contact the seed messages below).
 http://aep.appspot.com/display/ABcWltCES1srzPrj5CkS69-GB8o/

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-5768) If a Seed can't be contacted, a new node comes up as a cluster of 1

2013-07-18 Thread Andy Cobley (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-5768?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13712146#comment-13712146
 ] 

Andy Cobley commented on CASSANDRA-5768:


Jason,

You code for build list should read:

{code}

private void buildSeedsList()
{
SetInetAddress seeds = DatabaseDescriptor.getSeeds();
for (InetAddress seed : seeds)
{
if (seed.equals(FBUtilities.getBroadcastAddress())  
seeds.size() == 1)
seedContacted = true;
else
seeds.add(seed);
}
}
{code}
Sadly that throws an exception at startup:

{noformat}

ERROR 09:58:35,896 Exception encountered during startup
java.lang.UnsupportedOperationException
at 
com.google.common.collect.ImmutableCollection.add(ImmutableCollection.java:92)
at org.apache.cassandra.gms.Gossiper.buildSeedsList(Gossiper.java:1072)
at org.apache.cassandra.gms.Gossiper.start(Gossiper.java:1046)
at 
org.apache.cassandra.service.StorageService.joinTokenRing(StorageService.java:555)
at 
org.apache.cassandra.service.StorageService.initServer(StorageService.java:527)
at 
org.apache.cassandra.service.StorageService.initServer(StorageService.java:426)
at 
org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:354)
at 
org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:453)
at 
org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:496)
java.lang.UnsupportedOperationException
at 
com.google.common.collect.ImmutableCollection.add(ImmutableCollection.java:92)
at org.apache.cassandra.gms.Gossiper.buildSeedsList(Gossiper.java:1072)
at org.apache.cassandra.gms.Gossiper.start(Gossiper.java:1046)
at 
org.apache.cassandra.service.StorageService.joinTokenRing(StorageService.java:555)
at 
org.apache.cassandra.service.StorageService.initServer(StorageService.java:527)
at 
org.apache.cassandra.service.StorageService.initServer(StorageService.java:426)
at 
org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:354)
at 
org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:453)
at 
org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:496)
Exception encountered during startup: null
ERROR 09:58:35,933 Exception in thread Thread[StorageServiceShutdownHook,5,main]
java.lang.NullPointerException
at 
org.apache.cassandra.service.StorageService.stopRPCServer(StorageService.java:310)
at 
org.apache.cassandra.service.StorageService.shutdownClientServers(StorageService.java:359)
at 
org.apache.cassandra.service.StorageService.access$000(StorageService.java:95)
at 
org.apache.cassandra.service.StorageService$1.runMayThrow(StorageService.java:492)
at 
org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28)
at java.lang.Thread.run(Thread.java:724)
{noformat}

 If a Seed can't be contacted, a new node comes up as a cluster of 1
 ---

 Key: CASSANDRA-5768
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5768
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 2.0 beta 1
Reporter: Andy Cobley
Assignee: Brandon Williams
Priority: Minor
 Fix For: 2.0 beta 2

 Attachments: 5768.txt


 Setting up a new test cluster using  2.0.0-beta1 and I noticed the following 
 behaviour with vnodes turned on.  
 I bring up one node all well and good.  however if I bring up a second node, 
 that can't contact the first (the first being the seed for the second) after 
 a short period of time, the second goes ahead and assumes it's the only node 
 and bootstraps with all tokens.  
 NOTE also this email from Robert Coli 
 To: u...@cassandra.apache.org
 Obviously if you have defined a seed and cannot contact it, the node should 
 not start as a cluster of one. I have a to-do list item to file a JIRA on the 
 subject, but if you wanted to file and link us, that'd be super. :)
 Startup trace (from the can't contact the seed messages below).
 http://aep.appspot.com/display/ABcWltCES1srzPrj5CkS69-GB8o/

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-5768) If a Seed can't be contacted, a new node comes up as a cluster of 1

2013-07-18 Thread Andy Cobley (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-5768?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13712183#comment-13712183
 ] 

Andy Cobley commented on CASSANDRA-5768:


Jason,

this code seems to work:

{code}

private void buildSeedsList()
{
SetInetAddress tempseeds = DatabaseDescriptor.getSeeds();
   
for (InetAddress seed : tempseeds)
{

if (seed.equals(FBUtilities.getBroadcastAddress())  
seeds.size() == 1){

seedContacted = true;
}else{
seeds.add(seed);
}
}
}
{code}

This boots if localhost ip = seed ip
It throws an exception if localhost ip != seed ip and seed ip can not be 
contacted

However if seed ip is the default 127.0.0.1 the code will throw a 
java.lang.IllegalStateException: Unable to contact any seeds! exception. I'm 
not sure thats correct

 If a Seed can't be contacted, a new node comes up as a cluster of 1
 ---

 Key: CASSANDRA-5768
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5768
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 2.0 beta 1
Reporter: Andy Cobley
Assignee: Brandon Williams
Priority: Minor
 Fix For: 2.0 beta 2

 Attachments: 5768.txt


 Setting up a new test cluster using  2.0.0-beta1 and I noticed the following 
 behaviour with vnodes turned on.  
 I bring up one node all well and good.  however if I bring up a second node, 
 that can't contact the first (the first being the seed for the second) after 
 a short period of time, the second goes ahead and assumes it's the only node 
 and bootstraps with all tokens.  
 NOTE also this email from Robert Coli 
 To: u...@cassandra.apache.org
 Obviously if you have defined a seed and cannot contact it, the node should 
 not start as a cluster of one. I have a to-do list item to file a JIRA on the 
 subject, but if you wanted to file and link us, that'd be super. :)
 Startup trace (from the can't contact the seed messages below).
 http://aep.appspot.com/display/ABcWltCES1srzPrj5CkS69-GB8o/

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-5768) If a Seed can't be contacted, a new node comes up as a cluster of 1

2013-07-18 Thread Brandon Williams (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-5768?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13712446#comment-13712446
 ] 

Brandon Williams commented on CASSANDRA-5768:
-

bq. This way if there's only one seed (and this node is it), it can still come 
up.

A seed node can't bootstrap as it is, so this shouldn't be a problem.

bq. Also, is there any harm in adding this to 1.2? Seems rather innocuous, I 
think.

When I started I thought it was going to be a bit riskier, but now that it's 
done I think 1.2 is fine.

[~aecobley] bq. However it also halts with the same exception if seeds is set 
to 127.0.0.1

I can't reproduce this, and it doesn't make any sense to me (since seeds don't 
bootstrap)

 If a Seed can't be contacted, a new node comes up as a cluster of 1
 ---

 Key: CASSANDRA-5768
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5768
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 2.0 beta 1
Reporter: Andy Cobley
Assignee: Brandon Williams
Priority: Minor
 Fix For: 2.0 beta 2

 Attachments: 5768.txt


 Setting up a new test cluster using  2.0.0-beta1 and I noticed the following 
 behaviour with vnodes turned on.  
 I bring up one node all well and good.  however if I bring up a second node, 
 that can't contact the first (the first being the seed for the second) after 
 a short period of time, the second goes ahead and assumes it's the only node 
 and bootstraps with all tokens.  
 NOTE also this email from Robert Coli 
 To: u...@cassandra.apache.org
 Obviously if you have defined a seed and cannot contact it, the node should 
 not start as a cluster of one. I have a to-do list item to file a JIRA on the 
 subject, but if you wanted to file and link us, that'd be super. :)
 Startup trace (from the can't contact the seed messages below).
 http://aep.appspot.com/display/ABcWltCES1srzPrj5CkS69-GB8o/

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-5768) If a Seed can't be contacted, a new node comes up as a cluster of 1

2013-07-18 Thread Andy Cobley (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-5768?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13712619#comment-13712619
 ] 

Andy Cobley commented on CASSANDRA-5768:


Brandon,
For info:

With the code from 5678.txt, the code above and the attached yaml file and no 
other nodes in the cluster I'm getting the following trace:


sudo ./cassandra
xss =  -ea -javaagent:./../lib/jamm-0.2.5.jar -XX:+UseThreadPriorities 
-XX:ThreadPriorityPolicy=42 -Xms1024M -Xmx1024M -Xmn256M 
-XX:+HeapDumpOnOutOfMemoryError
LifeintheAirAge:bin Administrator$ objc[2779]: Class JavaLaunchHelper is 
implemented in both 
/Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/bin/java and 
/Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/jre/lib/libinstrument.dylib.
 One of the two will be used. Which one is undefined.
 INFO 10:50:38,698 Logging initialized
 INFO 10:50:38,719 JVM vendor/version: Java HotSpot(TM) 64-Bit Server 
VM/1.8.0-ea
 INFO 10:50:38,719 Heap size: 1046937600/1046937600
 INFO 10:50:38,720 Classpath: 
./../conf:./../build/classes/main:./../build/classes/thrift:./../lib/antlr-3.2.jar:./../lib/commons-cli-1.1.jar:./../lib/commons-codec-1.2.jar:./../lib/commons-lang-2.6.jar:./../lib/compress-lzf-0.8.4.jar:./../lib/concurrentlinkedhashmap-lru-1.3.jar:./../lib/disruptor-3.0.1.jar:./../lib/guava-13.0.1.jar:./../lib/high-scale-lib-1.1.2.jar:./../lib/jackson-core-asl-1.9.2.jar:./../lib/jackson-mapper-asl-1.9.2.jar:./../lib/jamm-0.2.5.jar:./../lib/jbcrypt-0.3m.jar:./../lib/jline-1.0.jar:./../lib/json-simple-1.1.jar:./../lib/libthrift-0.9.0.jar:./../lib/log4j-1.2.16.jar:./../lib/lz4-1.1.0.jar:./../lib/metrics-core-2.0.3.jar:./../lib/netty-3.5.9.Final.jar:./../lib/servlet-api-2.5-20081211.jar:./../lib/slf4j-api-1.7.2.jar:./../lib/slf4j-log4j12-1.7.2.jar:./../lib/snakeyaml-1.11.jar:./../lib/snappy-java-1.0.5.jar:./../lib/snaptree-0.1.jar:./../lib/thrift-server-0.2.jar:./../lib/jamm-0.2.5.jar
 INFO 10:50:38,721 JNA not found. Native methods will be disabled.
 INFO 10:50:38,739 Loading settings from 
file:/Users/Administrator/Documents/raspberry/cassandra2/test/cassandra-trunk/conf/cassandra.yaml
 INFO 10:50:39,159 Data files directories: [/var/lib/cassandra/data]
 INFO 10:50:39,159 Commit log directory: /var/lib/cassandra/commitlog
 INFO 10:50:39,160 DiskAccessMode 'auto' determined to be mmap, indexAccessMode 
is mmap
 INFO 10:50:39,160 disk_failure_policy is stop
 INFO 10:50:39,165 Global memtable threshold is enabled at 332MB
 INFO 10:50:39,298 Not using multi-threaded compaction
 INFO 10:50:39,547 Initializing key cache with capacity of 49 MBs.
 INFO 10:50:39,560 Scheduling key cache save to each 14400 seconds (going to 
save all keys).
 INFO 10:50:39,562 Initializing row cache with capacity of 0 MBs
 INFO 10:50:39,570 Scheduling row cache save to each 0 seconds (going to save 
all keys).
 INFO 10:50:39,977 Couldn't detect any schema definitions in local storage.
 INFO 10:50:39,977 To create keyspaces and column families, see 'help create 
keyspace' in cqlsh.
 INFO 10:50:40,064 Enqueuing flush of Memtable-local@1164440413(149/149 
serialized/live bytes, 6 ops)
 INFO 10:50:40,066 Writing Memtable-local@1164440413(149/149 serialized/live 
bytes, 6 ops)
 INFO 10:50:40,109 Completed flushing 
/var/lib/cassandra/data/system/local/system-local-ja-1-Data.db (178 bytes) for 
commitlog position ReplayPosition(segmentId=1374141039946, position=417)
 INFO 10:50:40,129 No commitlog files found; skipping replay
 INFO 10:50:40,466 Cassandra version: 2.0.0-beta1-SNAPSHOT
 INFO 10:50:40,467 Thrift API version: 19.37.0
 INFO 10:50:40,473 CQL supported versions: 2.0.0,3.1.0 (default: 3.1.0)
 INFO 10:50:40,509 Loading persisted ring state
 INFO 10:50:40,512 Starting up server gossip
 WARN 10:50:40,534 No host ID found, created 
8e0fac5a-b8c6-4a6b-b476-de794fb4b85c (Note: This should happen exactly once per 
node).
 INFO 10:50:40,539 Enqueuing flush of Memtable-local@366873404(300/300 
serialized/live bytes, 11 ops)
 INFO 10:50:40,540 Writing Memtable-local@366873404(300/300 serialized/live 
bytes, 11 ops)
 INFO 10:50:40,552 Completed flushing 
/var/lib/cassandra/data/system/local/system-local-ja-2-Data.db (293 bytes) for 
commitlog position ReplayPosition(segmentId=1374141039946, position=81742)
Broadcast: /134.36.9.8
Size of seeds0
Seed : 127.0.0.1
 INFO 10:50:40,605 Starting Messaging Service on port 7000
 INFO 10:50:40,647 Enqueuing flush of Memtable-local@210156003(86/86 
serialized/live bytes, 4 ops)
 INFO 10:50:40,647 Writing Memtable-local@210156003(86/86 serialized/live 
bytes, 4 ops)
 INFO 10:50:40,657 Completed flushing 
/var/lib/cassandra/data/system/local/system-local-ja-3-Data.db (118 bytes) for 
commitlog position ReplayPosition(segmentId=1374141039946, position=82003)
 INFO 10:50:40,659 JOINING: waiting for ring information
 INFO 10:50:41,582 Handshaking version with /127.0.0.1
 INFO 10:50:46,585 Handshaking version 

[jira] [Commented] (CASSANDRA-5768) If a Seed can't be contacted, a new node comes up as a cluster of 1

2013-07-18 Thread Brandon Williams (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-5768?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13712624#comment-13712624
 ] 

Brandon Williams commented on CASSANDRA-5768:
-

Your seed is 127.0.0.1, but your listen_address is something else.  So the 
behavior is actually correct, since it can't contact 127.0.0.1 since you're not 
listening there.

 If a Seed can't be contacted, a new node comes up as a cluster of 1
 ---

 Key: CASSANDRA-5768
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5768
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 2.0 beta 1
Reporter: Andy Cobley
Assignee: Brandon Williams
Priority: Minor
 Fix For: 2.0 beta 2

 Attachments: 5768.txt, cassandra.yaml


 Setting up a new test cluster using  2.0.0-beta1 and I noticed the following 
 behaviour with vnodes turned on.  
 I bring up one node all well and good.  however if I bring up a second node, 
 that can't contact the first (the first being the seed for the second) after 
 a short period of time, the second goes ahead and assumes it's the only node 
 and bootstraps with all tokens.  
 NOTE also this email from Robert Coli 
 To: u...@cassandra.apache.org
 Obviously if you have defined a seed and cannot contact it, the node should 
 not start as a cluster of one. I have a to-do list item to file a JIRA on the 
 subject, but if you wanted to file and link us, that'd be super. :)
 Startup trace (from the can't contact the seed messages below).
 http://aep.appspot.com/display/ABcWltCES1srzPrj5CkS69-GB8o/

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-5768) If a Seed can't be contacted, a new node comes up as a cluster of 1

2013-07-18 Thread Andy Cobley (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-5768?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13712636#comment-13712636
 ] 

Andy Cobley commented on CASSANDRA-5768:


Brandon,  you're right of course !  Apologies


 If a Seed can't be contacted, a new node comes up as a cluster of 1
 ---

 Key: CASSANDRA-5768
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5768
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 2.0 beta 1
Reporter: Andy Cobley
Assignee: Brandon Williams
Priority: Minor
 Fix For: 2.0 beta 2

 Attachments: 5768.txt, cassandra.yaml


 Setting up a new test cluster using  2.0.0-beta1 and I noticed the following 
 behaviour with vnodes turned on.  
 I bring up one node all well and good.  however if I bring up a second node, 
 that can't contact the first (the first being the seed for the second) after 
 a short period of time, the second goes ahead and assumes it's the only node 
 and bootstraps with all tokens.  
 NOTE also this email from Robert Coli 
 To: u...@cassandra.apache.org
 Obviously if you have defined a seed and cannot contact it, the node should 
 not start as a cluster of one. I have a to-do list item to file a JIRA on the 
 subject, but if you wanted to file and link us, that'd be super. :)
 Startup trace (from the can't contact the seed messages below).
 http://aep.appspot.com/display/ABcWltCES1srzPrj5CkS69-GB8o/

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-5768) If a Seed can't be contacted, a new node comes up as a cluster of 1

2013-07-18 Thread Jason Brown (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-5768?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13712857#comment-13712857
 ] 

Jason Brown commented on CASSANDRA-5768:


bq. A seed node can't bootstrap as it is, so this shouldn't be a problem

Ahh, crap, forgot about that. Then on the whole, the original patch lgtm. You 
might want to consider setting seedContacted to true in buildSeedsList() to 
optimize the lookup in checkSeedContact(), but that's a minor optimization and 
shouldn't stop us from moving forward on this.

 If a Seed can't be contacted, a new node comes up as a cluster of 1
 ---

 Key: CASSANDRA-5768
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5768
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 2.0 beta 1
Reporter: Andy Cobley
Assignee: Brandon Williams
Priority: Minor
 Fix For: 2.0 beta 2

 Attachments: 5768.txt, cassandra.yaml


 Setting up a new test cluster using  2.0.0-beta1 and I noticed the following 
 behaviour with vnodes turned on.  
 I bring up one node all well and good.  however if I bring up a second node, 
 that can't contact the first (the first being the seed for the second) after 
 a short period of time, the second goes ahead and assumes it's the only node 
 and bootstraps with all tokens.  
 NOTE also this email from Robert Coli 
 To: u...@cassandra.apache.org
 Obviously if you have defined a seed and cannot contact it, the node should 
 not start as a cluster of one. I have a to-do list item to file a JIRA on the 
 subject, but if you wanted to file and link us, that'd be super. :)
 Startup trace (from the can't contact the seed messages below).
 http://aep.appspot.com/display/ABcWltCES1srzPrj5CkS69-GB8o/

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-5768) If a Seed can't be contacted, a new node comes up as a cluster of 1

2013-07-17 Thread Jason Brown (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-5768?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13712030#comment-13712030
 ] 

Jason Brown commented on CASSANDRA-5768:


lgtm. One (incredibly minor) optimization in Gossiper.checkSeedContact() would 
be to check the boolean before checking the map for the seed ep, like this:

{code}protected void checkSeedContact(InetAddress ep)
{
if (!seedContacted  seeds.contains(ep))
seedContacted = true;
}
{code}

It could be that the effort of me writing this comment is greater than the 
grand sum of all processing time saved by this optimization, but what the hell 
:).


 If a Seed can't be contacted, a new node comes up as a cluster of 1
 ---

 Key: CASSANDRA-5768
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5768
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 2.0 beta 1
Reporter: Andy Cobley
Assignee: Brandon Williams
Priority: Minor
 Fix For: 2.0 beta 2

 Attachments: 5768.txt


 Setting up a new test cluster using  2.0.0-beta1 and I noticed the following 
 behaviour with vnodes turned on.  
 I bring up one node all well and good.  however if I bring up a second node, 
 that can't contact the first (the first being the seed for the second) after 
 a short period of time, the second goes ahead and assumes it's the only node 
 and bootstraps with all tokens.  
 NOTE also this email from Robert Coli 
 To: u...@cassandra.apache.org
 Obviously if you have defined a seed and cannot contact it, the node should 
 not start as a cluster of one. I have a to-do list item to file a JIRA on the 
 subject, but if you wanted to file and link us, that'd be super. :)
 Startup trace (from the can't contact the seed messages below).
 http://aep.appspot.com/display/ABcWltCES1srzPrj5CkS69-GB8o/

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-5768) If a Seed can't be contacted, a new node comes up as a cluster of 1

2013-07-17 Thread Jason Brown (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-5768?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13712031#comment-13712031
 ] 

Jason Brown commented on CASSANDRA-5768:


Also, is there any harm in adding this to 1.2? Seems rather innocuous, I think.

 If a Seed can't be contacted, a new node comes up as a cluster of 1
 ---

 Key: CASSANDRA-5768
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5768
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 2.0 beta 1
Reporter: Andy Cobley
Assignee: Brandon Williams
Priority: Minor
 Fix For: 2.0 beta 2

 Attachments: 5768.txt


 Setting up a new test cluster using  2.0.0-beta1 and I noticed the following 
 behaviour with vnodes turned on.  
 I bring up one node all well and good.  however if I bring up a second node, 
 that can't contact the first (the first being the seed for the second) after 
 a short period of time, the second goes ahead and assumes it's the only node 
 and bootstraps with all tokens.  
 NOTE also this email from Robert Coli 
 To: u...@cassandra.apache.org
 Obviously if you have defined a seed and cannot contact it, the node should 
 not start as a cluster of one. I have a to-do list item to file a JIRA on the 
 subject, but if you wanted to file and link us, that'd be super. :)
 Startup trace (from the can't contact the seed messages below).
 http://aep.appspot.com/display/ABcWltCES1srzPrj5CkS69-GB8o/

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira