Introduction
I am writing a Python application using a Cassandra 1.2 cluster (7 nodes, replication ratio 3), and I am accessing Cassandra with Python using the cql library (CQL 3.0).
Problem
The application is built in such a way that when you try to run the cql statement against an unconfigured column family, it automatically creates a table and repeats the cql statement. For example, if I try to run this:
SELECT * FROM table1
And table1 does not exist, then the application will run the corresponding CREATE TABLE for table1 and will repeat the previous selection. The problem is that after creating the table, the SELECT (repeat) error fails with this error:
Request did not complete within rpc_timeout
Question
I assume the cluster needs some time to spread the creation of the table or something like that? If I wait a few seconds between creating the table and repeating the select statement, everything works, but I want to know exactly why and if there is a better way to do this. Perhaps the creation of the creation table expected changes to be propagated before they are returned ?, is there any way to do this?
Thank you in advance
source share