cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Wille <>
Subject Re: Transaction failed because of timeout, retry failed because of the first try actually succeeded.
Date Fri, 01 Jul 2016 00:47:47 GMT
I had this problem, and it was caused by my retry policy. For reasons I don’t remember (but
is documented in a C* Jira ticket), when onWriteTimeout() is called, you cannot call RetryDecision.retry(cl),
as it will be a CL that is incompatible with LWT. After the fix (2.1.?), you can pass null,
and it will use the original CL.

On Jun 30, 2016, at 6:11 PM, Justin Lin <> wrote:

> Hi everyone,
> I recently encountered a problem wrt light weight transaction. My query is to insert
a row to a table if the row doesn't exist. It goes like this:
> Insert Into mytable (key, col1, col2) Value("key1", 1, 2) If Not Exist
> My case is the driver somehow gets time out from waiting for coordinator to response,
but the transaction actually succeeded. So my code retry the query and failed.
> This is not an idempotent write, so the retry might be a bad idea. And honestly this
is not a cassandra issue. But i wonder if anyone in the community ever had this problem before
and how would you recommend to solve it?
> Thanks
> -- 
> come on

View raw message