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

Jon Haddad commented on CASSANDRA-7296:
---------------------------------------

{quote}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).
{quote}

This is a reasonable alternative.  I'm not sure if it's useful outside of 
CL=ONE, but there's probably a use case I'm not thinking of.  

Using the Python driver would look something like this, I'm assuming:

{code}
stmt = session.prepare("SELECT * from tab where id = ?", 
consistency_level=ConsistencyLevel.ONE)
stmt.disable_dynamic_snitch()
session.execute(stmt, [1])
{code}

Plus a bit to direct the driver to a particular replica, which has to happen 
regardless. 


> 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