[
https://issues.apache.org/jira/browse/CASSANDRA-12075?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15354742#comment-15354742
]
Sylvain Lebresne commented on CASSANDRA-12075:
----------------------------------------------
bq. If you get a Unavailable from co-ordinator, you should retry it on another
host since this co-ordinator could be doing a long GC pause
Well, no. You *should* not, you *may*. An unavailable exception can also mean
that there is genuinely not enough live nodes to perform the query (that's even
the true original intent, even though a long GC pause can be indistinguishable
from a genuinely dead node), in which case it makes no particular sense to
retry. And that's kind of my point: what to do for that kind of situation is
and should be client dependent, so I'm not a fan of "dictating" a behavior
server side.
So I'm all for adding more infos to the exceptions so client can have as much
useful data as possible to do the decision (hence returning whether the query
is {{idempotent}}, which is an objective data), but I disagree we should decide
what should be done. And in the case of an unavailable exception for instance,
I don't any more objective info we could send right now.
bq. This will be a better approach than driver special casing which exception
to retry or not.
I disagree. I think it's exactly a responsibility of the driver to decide that
kind of things. Rather, as hinted above, I think it's the client that should
decide what he prefers and the driver should provide enough flexibility for the
client to do what he wants.
I'll also note that whatever we send, the driver will be at liberty to ignore
it so we don't win much by including such "recommendation" to the protocol
itself. I'm happy however to improve the protocol spec to provide
recommendations.
> Include whether or not the client should retry the request when throwing a
> RequestExecutionException
> ----------------------------------------------------------------------------------------------------
>
> Key: CASSANDRA-12075
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12075
> Project: Cassandra
> Issue Type: Improvement
> Reporter: Geoffrey Yu
> Assignee: Geoffrey Yu
> Priority: Minor
>
> Some requests that result in an error should not be retried by the client.
> Right now if the client gets an error, it has no way of knowing whether or
> not it should retry. We can include an extra field in each
> {{RequestExecutionException}} that will indicate whether the client should
> retry, retry on a different host, or not retry at all.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)