[jira] [Updated] (CASSANDRA-8051) Add SERIAL and LOCAL_SERIAL consistency levels to cqlsh
[ https://issues.apache.org/jira/browse/CASSANDRA-8051?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jeremy Hanna updated CASSANDRA-8051: Labels: LWT cqlsh (was: cqlsh) > Add SERIAL and LOCAL_SERIAL consistency levels to cqlsh > --- > > Key: CASSANDRA-8051 > URL: https://issues.apache.org/jira/browse/CASSANDRA-8051 > Project: Cassandra > Issue Type: Bug > Components: Tools >Reporter: Nicolas Favre-Felix >Assignee: Carl Yeksigian >Priority: Minor > Labels: LWT, cqlsh > Fix For: 2.0.15, 2.1.6 > > Attachments: 8051-2.0.txt, 8051-2.1-v2.txt, 8051-2.1-v3.txt, > 8051-2.1.txt, log-statements-2.0.txt, log-statements-2.1.txt, > python-driver-fix.txt > > > cqlsh does not support setting the serial consistency level. The default > CL.SERIAL does not let users safely execute LWT alongside an app that runs at > LOCAL_SERIAL, and can prevent any LWT from running when a DC is down (e.g. > with 2 DCs, RF=3 in each.) > Implementing this well is a bit tricky. A user setting the serial CL will > probably not want all of their statements to have a serial CL attached, but > only the conditional updates. At the same time it would be useful to support > serial reads. "WITH CONSISTENCY LEVEL" used to provide this flexibility. > I believe that it is currently impossible to run a SELECT at SERIAL or > LOCAL_SERIAL; the only workaround seems to be to run a conditional update > with a predicate that always resolves to False, and to rely on the CAS > response to read the data. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Updated] (CASSANDRA-8051) Add SERIAL and LOCAL_SERIAL consistency levels to cqlsh
[ https://issues.apache.org/jira/browse/CASSANDRA-8051?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Carl Yeksigian updated CASSANDRA-8051: -- Attachment: 8051-2.1-v3.txt v3 addresses feedback. Add SERIAL and LOCAL_SERIAL consistency levels to cqlsh --- Key: CASSANDRA-8051 URL: https://issues.apache.org/jira/browse/CASSANDRA-8051 Project: Cassandra Issue Type: Bug Components: Tools Reporter: Nicolas Favre-Felix Assignee: Carl Yeksigian Priority: Minor Labels: cqlsh Fix For: 2.0.15 Attachments: 8051-2.0.txt, 8051-2.1-v2.txt, 8051-2.1-v3.txt, 8051-2.1.txt, log-statements-2.0.txt, log-statements-2.1.txt, python-driver-fix.txt cqlsh does not support setting the serial consistency level. The default CL.SERIAL does not let users safely execute LWT alongside an app that runs at LOCAL_SERIAL, and can prevent any LWT from running when a DC is down (e.g. with 2 DCs, RF=3 in each.) Implementing this well is a bit tricky. A user setting the serial CL will probably not want all of their statements to have a serial CL attached, but only the conditional updates. At the same time it would be useful to support serial reads. WITH CONSISTENCY LEVEL used to provide this flexibility. I believe that it is currently impossible to run a SELECT at SERIAL or LOCAL_SERIAL; the only workaround seems to be to run a conditional update with a predicate that always resolves to False, and to rely on the CAS response to read the data. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-8051) Add SERIAL and LOCAL_SERIAL consistency levels to cqlsh
[ https://issues.apache.org/jira/browse/CASSANDRA-8051?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Carl Yeksigian updated CASSANDRA-8051: -- Attachment: 8051-2.1-v2.txt The python driver just released a 2.5.1 version which includes the fix that [~Stefania] had for serial consistency. Attaching a v2 which includes the updated internal driver. Add SERIAL and LOCAL_SERIAL consistency levels to cqlsh --- Key: CASSANDRA-8051 URL: https://issues.apache.org/jira/browse/CASSANDRA-8051 Project: Cassandra Issue Type: Bug Components: Tools Reporter: Nicolas Favre-Felix Assignee: Carl Yeksigian Priority: Minor Labels: cqlsh Fix For: 2.0.15 Attachments: 8051-2.0.txt, 8051-2.1-v2.txt, 8051-2.1.txt, log-statements-2.0.txt, log-statements-2.1.txt, python-driver-fix.txt cqlsh does not support setting the serial consistency level. The default CL.SERIAL does not let users safely execute LWT alongside an app that runs at LOCAL_SERIAL, and can prevent any LWT from running when a DC is down (e.g. with 2 DCs, RF=3 in each.) Implementing this well is a bit tricky. A user setting the serial CL will probably not want all of their statements to have a serial CL attached, but only the conditional updates. At the same time it would be useful to support serial reads. WITH CONSISTENCY LEVEL used to provide this flexibility. I believe that it is currently impossible to run a SELECT at SERIAL or LOCAL_SERIAL; the only workaround seems to be to run a conditional update with a predicate that always resolves to False, and to rely on the CAS response to read the data. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-8051) Add SERIAL and LOCAL_SERIAL consistency levels to cqlsh
[ https://issues.apache.org/jira/browse/CASSANDRA-8051?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Carl Yeksigian updated CASSANDRA-8051: -- Attachment: 8051-2.1.txt For 2.1, add {{SERIAL CONSISTENCY}} command. For 2.0, since we are using the Thrift protocol, we can't set {{serial_consistency_level}}, so that patch is as good as we'll get. Add SERIAL and LOCAL_SERIAL consistency levels to cqlsh --- Key: CASSANDRA-8051 URL: https://issues.apache.org/jira/browse/CASSANDRA-8051 Project: Cassandra Issue Type: Bug Components: Tools Reporter: Nicolas Favre-Felix Assignee: Carl Yeksigian Priority: Minor Labels: cqlsh Fix For: 2.0.15 Attachments: 8051-2.0.txt, 8051-2.1.txt cqlsh does not support setting the serial consistency level. The default CL.SERIAL does not let users safely execute LWT alongside an app that runs at LOCAL_SERIAL, and can prevent any LWT from running when a DC is down (e.g. with 2 DCs, RF=3 in each.) Implementing this well is a bit tricky. A user setting the serial CL will probably not want all of their statements to have a serial CL attached, but only the conditional updates. At the same time it would be useful to support serial reads. WITH CONSISTENCY LEVEL used to provide this flexibility. I believe that it is currently impossible to run a SELECT at SERIAL or LOCAL_SERIAL; the only workaround seems to be to run a conditional update with a predicate that always resolves to False, and to rely on the CAS response to read the data. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-8051) Add SERIAL and LOCAL_SERIAL consistency levels to cqlsh
[ https://issues.apache.org/jira/browse/CASSANDRA-8051?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Stefania updated CASSANDRA-8051: Attachment: log-statements-2.1.txt log-statements-2.0.txt python-driver-fix.txt *Note:* For testing I used some log statements in StorageProxy.java and SelectStatement.java, see attached patches. *2.0 patch:* Confirmed that it only works for reads, for conditional updates it cannot be used and afaict it cannot be set from Thrift either. Here's what happens for updates: {code} CONSISTENCY SERIAL; Consistency level set to SERIAL. insert into test (id, col, val) values (2, 1, '1') IF NOT EXISTS; Bad Request: SERIAL is not supported as conditional update commit consistency. Use ANY if you mean make sure it is accepted but I don't care how many replicas commit it for non-SERIAL reads {code} Same for LOCAL_SERIAL. *2.1 patch:* Sets consistency level for future requests should perhaps be changed to ..for future conditional updates Trailing space just above {{def do_serial(self, parsed):}} Same issue as in 2.0 with setting CONSISTENCY to SERIAL or LOCAL_SERIAL before conditional updates: {code} cqlsh:test CONSISTENCY LOCAL_SERIAL Consistency level set to LOCAL_SERIAL. cqlsh:test insert into test (id, col, val) values (1, 1, '1') IF NOT EXISTS; InvalidRequest: code=2200 [Invalid query] message=LOCAL_SERIAL is not supported as conditional update commit consistency. Use ANY if you mean make sure it is accepted but I don't care how many replicas commit it for non-SERIAL reads cqlsh:test CONSISTENCY SERIAL Consistency level set to SERIAL. cqlsh:test insert into test (id, col, val) values (1, 1, '1') IF NOT EXISTS; InvalidRequest: code=2200 [Invalid query] message=SERIAL is not supported as conditional update commit consistency. Use ANY if you mean make sure it is accepted but I don't care how many replicas commit it for non-SERIAL reads {code} The patch doesn't work for conditional updates: {code} SERIAL CONSISTENCY LOCAL_SERIAL; insert into test (id, col, val) values (1, 1, '1') IF NOT EXISTS; {code} it will give these log messages, which are incorrect: {code} INFO 01:20:01 Consistency level in cas for paxos : SERIAL INFO 01:20:01 Consistency level in cas for commit : ONE INFO 01:20:01 Consistency level in read : QUORUM {code} The problem is in the python driver, in query.py {{_set_serial_consistency_level}} forgets to actually set the value: {code} def _set_serial_consistency_level(self, serial_consistency_level): acceptable = (None, ConsistencyLevel.SERIAL, ConsistencyLevel.LOCAL_SERIAL) if serial_consistency_level not in acceptable: raise ValueError( serial_consistency_level must be either ConsistencyLevel.SERIAL or ConsistencyLevel.LOCAL_SERIAL) {code} python-driver-fix.txt fixes it. We need to raise a python driver ticket. I'm not sure it it's an overkill, but given that CONSISTENCY SERIAL/LOCAL_SERIAL causes errors to conditional updates, in both 2.0 and 2.1, perhaps we ought to consider attaching it to SELECT statemetns only. Add SERIAL and LOCAL_SERIAL consistency levels to cqlsh --- Key: CASSANDRA-8051 URL: https://issues.apache.org/jira/browse/CASSANDRA-8051 Project: Cassandra Issue Type: Bug Components: Tools Reporter: Nicolas Favre-Felix Assignee: Carl Yeksigian Priority: Minor Labels: cqlsh Fix For: 2.0.15 Attachments: 8051-2.0.txt, 8051-2.1.txt, log-statements-2.0.txt, log-statements-2.1.txt, python-driver-fix.txt cqlsh does not support setting the serial consistency level. The default CL.SERIAL does not let users safely execute LWT alongside an app that runs at LOCAL_SERIAL, and can prevent any LWT from running when a DC is down (e.g. with 2 DCs, RF=3 in each.) Implementing this well is a bit tricky. A user setting the serial CL will probably not want all of their statements to have a serial CL attached, but only the conditional updates. At the same time it would be useful to support serial reads. WITH CONSISTENCY LEVEL used to provide this flexibility. I believe that it is currently impossible to run a SELECT at SERIAL or LOCAL_SERIAL; the only workaround seems to be to run a conditional update with a predicate that always resolves to False, and to rely on the CAS response to read the data. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-8051) Add SERIAL and LOCAL_SERIAL consistency levels to cqlsh
[ https://issues.apache.org/jira/browse/CASSANDRA-8051?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tyler Hobbs updated CASSANDRA-8051: --- Reviewer: Stefania (was: Tyler Hobbs) Add SERIAL and LOCAL_SERIAL consistency levels to cqlsh --- Key: CASSANDRA-8051 URL: https://issues.apache.org/jira/browse/CASSANDRA-8051 Project: Cassandra Issue Type: Bug Components: Tools Reporter: Nicolas Favre-Felix Assignee: Carl Yeksigian Priority: Minor Labels: cqlsh Fix For: 2.0.15 Attachments: 8051-2.0.txt cqlsh does not support setting the serial consistency level. The default CL.SERIAL does not let users safely execute LWT alongside an app that runs at LOCAL_SERIAL, and can prevent any LWT from running when a DC is down (e.g. with 2 DCs, RF=3 in each.) Implementing this well is a bit tricky. A user setting the serial CL will probably not want all of their statements to have a serial CL attached, but only the conditional updates. At the same time it would be useful to support serial reads. WITH CONSISTENCY LEVEL used to provide this flexibility. I believe that it is currently impossible to run a SELECT at SERIAL or LOCAL_SERIAL; the only workaround seems to be to run a conditional update with a predicate that always resolves to False, and to rely on the CAS response to read the data. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-8051) Add SERIAL and LOCAL_SERIAL consistency levels to cqlsh
[ https://issues.apache.org/jira/browse/CASSANDRA-8051?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Philip Thompson updated CASSANDRA-8051: --- Assignee: Tyler Hobbs Add SERIAL and LOCAL_SERIAL consistency levels to cqlsh --- Key: CASSANDRA-8051 URL: https://issues.apache.org/jira/browse/CASSANDRA-8051 Project: Cassandra Issue Type: Bug Components: Tools Reporter: Nicolas Favre-Felix Assignee: Tyler Hobbs Priority: Minor Labels: cqlsh cqlsh does not support setting the serial consistency level. The default CL.SERIAL does not let users safely execute LWT alongside an app that runs at LOCAL_SERIAL, and can prevent any LWT from running when a DC is down (e.g. with 2 DCs, RF=3 in each.) Implementing this well is a bit tricky. A user setting the serial CL will probably not want all of their statements to have a serial CL attached, but only the conditional updates. At the same time it would be useful to support serial reads. WITH CONSISTENCY LEVEL used to provide this flexibility. I believe that it is currently impossible to run a SELECT at SERIAL or LOCAL_SERIAL; the only workaround seems to be to run a conditional update with a predicate that always resolves to False, and to rely on the CAS response to read the data. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-8051) Add SERIAL and LOCAL_SERIAL consistency levels to cqlsh
[ https://issues.apache.org/jira/browse/CASSANDRA-8051?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Philip Thompson updated CASSANDRA-8051: --- Labels: cqlsh (was: ) Add SERIAL and LOCAL_SERIAL consistency levels to cqlsh --- Key: CASSANDRA-8051 URL: https://issues.apache.org/jira/browse/CASSANDRA-8051 Project: Cassandra Issue Type: Bug Components: Tools Reporter: Nicolas Favre-Felix Priority: Minor Labels: cqlsh cqlsh does not support setting the serial consistency level. The default CL.SERIAL does not let users safely execute LWT alongside an app that runs at LOCAL_SERIAL, and can prevent any LWT from running when a DC is down (e.g. with 2 DCs, RF=3 in each.) Implementing this well is a bit tricky. A user setting the serial CL will probably not want all of their statements to have a serial CL attached, but only the conditional updates. At the same time it would be useful to support serial reads. WITH CONSISTENCY LEVEL used to provide this flexibility. I believe that it is currently impossible to run a SELECT at SERIAL or LOCAL_SERIAL; the only workaround seems to be to run a conditional update with a predicate that always resolves to False, and to rely on the CAS response to read the data. -- This message was sent by Atlassian JIRA (v6.3.4#6332)