datastax driver C++ queries

12 views
Skip to first unread message

Deepti Sharma

unread,
Jul 19, 2023, 7:48:26 AM7/19/23
to DataStax C++ Driver for Apache Cassandra User Mailing List

Hello Team, 

Problem:- We have done LCM of Cassandra driver from to 2.6 to 2.16.We are facing below problem in datastax driver 2.16.

              1. We have use case where we continuously inserting the data.

              2. Cassandra server is restarted and application waits for it to coming up using Nodetool command.

              3. When Nodetool confirms that Cassandra server is up the application start processing the data using Datastax driver 2.16

              4. Driver is throwing exception that server is offline while server is running perfectly fine at the backend.

              5. We had analyzed the driver logs that it start reconnecting with exponential reconnection policy is by default.

              6. We had also checked in 2.6 , reconnect policy was constant reconnect by default.

 

Query:-

              1. Why default policy have been changed in 2.16.

              2. We had observed that it is reconnect comes into action on heartbeat failure.

              3. Why other operation (insert/select) dont check connection with server directly while processing the request. is reconnect blocking all other    request until driver restores connection with Cassandra server.


Regards

Bret McGuire

unread,
Aug 9, 2023, 2:15:51 PM8/9/23
to DataStax C++ Driver for Apache Cassandra User Mailing List, Deepti Sharma
   Hey Deepti, thanks for the question!

   It looks like this change came in with CPP-745 which introduced the exponential reconnection policy generally.  That change was released in C/C++ driver version 2.13.0 (based on the changelog and the fix version specified on that ticket).  The original motivation was a desire to add "jitter" to the reconnect delay calculation in order to delay a rush of clients trying to reconnect at the same time.  We'd seen some issues with that in the Java driver (see JAVA-2038 for more on that) and the drivers team thought it would be a useful change to apply to all of the native drivers.

   Hope this offers some clarity!

  - Bret -

Reply all
Reply to author
Forward
0 new messages