[ 
https://issues.apache.org/jira/browse/CASSANDRA-7296?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15561789#comment-15561789
 ] 

Sylvain Lebresne commented on CASSANDRA-7296:
---------------------------------------------

I can certainly agree that having the dynamic snitch getting in the way of 
local queries is not always desirable, but I'm less convinced that adding a new 
consistency level is the cleanest way to circumvent that.

First, I'm not even entirely sure than letting the dynamic snitch bypass the 
coordinator if it's a replica is a good idea in the first place. Everyone more 
or less agree that doing token-aware routing is a good thing nowadays, and it's 
certainly confusing that the dynamic snitch may screw that up. If the dynamic 
snitch was a perfect and instantaneous view of latencies, then that could make 
sense, but it's not. Anyway, I think it's worth at least evaluating making even 
the dynamic snitch always pick the local node if it's a replica, as I'm not 
sure the benefit of not doing so outweigh the confusion it creates.

But short of that, why not directly attack the problem we're trying to solve 
and add a (protocol) option to queries to force the behavior ("always pick the 
coordinator as one replica if it's one"). That sounds less confusing to me than 
have a new CL that will confuse newcomers (as the difference with ONE is 
somewhat subtle for a newcomer). As a bonus, it would also work for CL > ONE 
(since again, it'll just be about forcing the dynamic snitch to pick the 
coordinator if it's a replica).

We could also have a table option to do the same: force the dynamic snitch to 
pick the coordinator if it's a replica for all queries on that table, which 
would be a tad more convenient for request pinning (of course, I get that for 
troubleshooting you still want to per-query option).


> Add CL.COORDINATOR_ONLY
> -----------------------
>
>                 Key: CASSANDRA-7296
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-7296
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Tupshin Harper
>
> For reasons such as CASSANDRA-6340 and similar, it would be nice to have a 
> read that never gets distributed, and only works if the coordinator you are 
> talking to is an owner of the row.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to