Hello,
I am building a c++ application that uses the cpp-driver to connect to a Cassandra database. I updated to the latest 2.15.1 driver, and all of a sudden my application would go up to 100% cpu usage on startup and not get past the Cluster constructor.
I downloaded the code from github to debug it, and found the issue. The fix for CPP-913 (Ensure no duplicates in token map replica sets) was causing my build_replicas_simple to never complete.
Further digging revealed that my "system_distributed" and "system_traces" keyspaces were created with replication_factors of 3 and 2 respectively. My dev environment only has 1 node, so build_replicas_simple would add it initially, then repeat forever trying to add another one while skipping over the one that already was added.
I don't believe I did anything special when installing cassandra, installing the latest from apache, which I assume would have set up some default keyspaces.
Now, in my setup, having the replication factor set to greater than the number of nodes doesn't make much sense, so altering the keyspace to set the replication_factor to 1 means I am back up and running, but to me that should not be a reason for a hang on startup. Worst case error out if a replication_factor is greater than the number of nodes, but I would think a warning would be more appropriate.
Is this intended behaviour, or something that will get fixed?
I'm running Ubuntu 18.04 LTS. Initial install was back in mid-December, and it is pretty much up to date.
[cqlsh 5.0.1 | Cassandra 3.9 | CQL spec 3.4.2 | Native protocol v4]
Thanks,
Paul