I am using the c++ driver, tag 2.8.1, with libuv v1.18.0, both compiled with g++ on OpenIndiana and Debian (testing and 9).
I want to test a scylla db with repeated write operations only. A single write operation is a simple INSERT, in a single table, 4 columns, less than 50 byte per insert. The test is *not* run in batch mode.
Now the point: I get a `CassFuture` from the `cass_session_execute()` function; if I wait synchronously the future on `cass_future_error_code()`, everything is fine; but if I feed a callback in the `cass_future_set_callback()`, some of the INSERTs fail.
There is a nasty problem on the failure: calling `cass_future_error_code()` inside the callback *never* return any error, while `cass_future_get_result()` does (according to documentation, the result is `nullptr` if an error has occured: http://datastax.github.io/cpp-driver/api/struct.CassFuture/#function-cass_future_get_result); the number of errors (of `nullptr`s) returned by `cass_future_get_result()` exactly corresponds to the number of failed INSERTs.
Errors from metrics (`cass_session_get_metrics()`) do not count any failure.
Setting the `cass_statement_set_retry_policy()` to a "downgrading consistency" does not change this behavior (but I would say it is expected according to the doc: http://datastax.github.io/cpp-driver/api/struct.CassRetryPolicy/#function-cass_retry_policy_downgrading_consistency_new).
The request timeouts for each statement are set to "no timeout" passing a 0-value to `cass_statement_set_request_timeout()`.
So the questions are:
.1 to what extent do `cass_future_error_code()` and `cass_future_get_result()` differ and can they be trusted?
.2 is there any other mechanism to ensure retry? am I expected to retry inside the callback?
Needless to say, I would like to go multi-threaded, with limitless retry policy :-D
Please let me know if you need more information, or if questions are unclear.
Thank you very much in advance.
cheers,
Federico
--
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-user+unsubscribe@lists.datastax.com.