driver seems to hang when timing out on schema changes

22 views
Skip to first unread message

Robin Mahony

unread,
Jun 28, 2016, 5:52:14 PM6/28/16
to DataStax C++ Driver for Apache Cassandra User Mailing List
Using driver version 2.2.2


So not sure if this is related to some of the fixes that have come in later versions of the driver, but the following situation happened for me.


On start up of my application, I connect to Cassandra, then perform some schema operations (creating new tables, new columns in tables, etc).


My application was trying to come up at the same time Cassandra was starting.

So at first, I get a bunch of connection errors as expected:

"Failed to connect using the driver. ('No hosts available for the control connection'"

Eventually my application got a connection and then did some schema changes (added a column to a table) which succeeded.

It then added another column to a different table and appears to have hung.

I see the following error messages 13 seconds after attempting to perform the CQL to alter a table and add a column.

[ERROR] (src/error_response.cpp:55:bool cass::check_error_or_invalid_response(const string&, uint8_t, cass::Response*)): SchemaChangeHandler: Error response: 'Operation timed out - received only 0 responses.' (0x02001200)
[ERROR] (src/error_response.cpp:55:bool cass::check_error_or_invalid_response(const string&, uint8_t, cass::Response*)): SchemaChangeHandler: Error response: 'Operation timed out - received only 0 responses.' (0x02001200)


I am using the async driver interface, and my async driver call basically never returned into the context of my callback.

Michael Penick

unread,
Jun 28, 2016, 6:31:16 PM6/28/16
to cpp-dri...@lists.datastax.com
The driver will internally wait up to 10 second for schema agreement to propagate across your Cassandra cluster. It looks like there was a server-side timeout attempting to get the schema information from the system tables. That's really odd because those tables are local to the node...but I see why the driver is not returning. 

Thanks for the report. I'm putting an issue and a fix together.

Mike


--
You received this message because you are subscribed to the Google Groups "DataStax C++ Driver for Apache Cassandra User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cpp-driver-us...@lists.datastax.com.

Michael Penick

unread,
Jun 28, 2016, 6:43:01 PM6/28/16
to cpp-dri...@lists.datastax.com
Issue: https://datastax-oss.atlassian.net/browse/CPP-381

This patch will backport  to 2.2.2 without issue. 

Thanks again for report.

Mike

Michael Penick

unread,
Jun 28, 2016, 6:44:45 PM6/28/16
to cpp-dri...@lists.datastax.com
Fix: https://github.com/datastax/cpp-driver/pull/302 (pushed with the wrong user)
Reply all
Reply to author
Forward
0 new messages