When you try to make a sync_table, it fails every time, you have to delete the index already created to allow the sync_table method to create a new one.
You only need to have a column name as "node" that it isn't a reserved keyword in Cassandra but in the code it appears as DSE reserved keyword, you can see in metadata.py in cql_keywords
The method is_valid_name in metadata.py compares the column name with the DSE reserved keywords and escape the column name with "node", including the ", so lately, it doesn't match the index name trying to create it again and failing.
File "cassandra/cluster.py", line 2618, in cassandra.cluster.Session.execute
File "cassandra/cluster.py", line 4877, in cassandra.cluster.ResponseFuture.result
cassandra.InvalidRequest: Error from server: code=2200 [Invalid query] message="Index machine_by_organization_node_node_idx_1 is a duplicate of existing index machine_by_organization_node_node_idx"
The method should know if it's a column name with a non reserved keywords in Cassandra and no escape it with ".
Python 3.7
cassandra-driver==3.24.0
thanks for the report. Do you have a simplified bit of code you could share to reproduce?
Here you are, sorry for the delay.
The error is:
File "cassandra/cluster.py", line 2618, in cassandra.cluster.Session.execute
File "cassandra/cluster.py", line 4877, in cassandra.cluster.ResponseFuture.result
cassandra.InvalidRequest: Error from server: code=2200 [Invalid query] message="Index diagram_node_idx_1 is a duplicate of existing index diagram_node_idx"
line numbers doesn’t match because I’ve inserted debug code.