New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrcect error code return when consistency_level can not be met #32
Comments
Currently the only information that is propagated from storage_proxy to On Tue, Jul 21, 2015 at 12:22:13AM -0700, slivne wrote:
|
2015-07-21 17:28 GMT+02:00 Gleb Natapov notifications@github.com:
There is already such a base class, see cassandra_exception in Origin throws UnavailableException which passes error code in its
|
following commit [COMMIT urchin master] storage_proxy: return proper error codes to transport layer the problem is still not resolved the issue may be related to #43
|
no it does not solve the issue using
It may be related to the encoding error we have #43 |
@slivne, that's a problem with |
still does not work head at: shlomi@localhost~/urchin (master)$ git log
still getting
I created a very simple (incorrect) dtest that will always fail - that allows you to reproduce the issue on your own:
|
Your test case doesn't use the proper assertion: query = SimpleStatement("SELECT * FROM ks.test1 WHERE k=1",consistency_level=ConsistencyLevel.QUORUM)
assert_unavailable(session.execute, query) Anyway, I can reproduce. Will send a fix. |
The patch introduces the _partition_is_open flag, inject partition_end only if there was some data in the input reader. A simple unit test has been added for the nonforwardable reader which checks this new behaviour. Merge "Cqlsh serverless v2" from Karol Baryla This PR adds serverless support for CQLSH. It was previosuly merged, but dtests later discovered a bug in python driver. The bug should be fixed now, so let's merge this again. @fruch As you had more luck reproducing the issue with dtests than us, could you try and run them with this PR to make sure it works now? Fixes scylladb#317 (again) Closes scylladb#323 * github.com:scylladb/scylla-tools-java: Add Scylla Cloud serverless support Switch cqlsh to use scylla-driver install.sh: drop locale workaround from python3 thunk Since scylladb#7408 does not occur on current python3 version (3.11.0), let's drop the workarond. Closes scylladb#32 tls: add missing include <map> std::multimap is later used in the file. Closes scylladb#1314
Urchin
returns code=0000 [Server error]
Originreturns code=1000 [Unavailable exception]
create a 3 node cluster
run the following via cqlsh
CREATE KEYSPACE keyspace1 WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '3'} ;
CREATE TABLE keyspace1.standard1 (
key blob PRIMARY KEY,
"C0" blob,
"C1" blob,
"C2" blob,
"C3" blob,
"C4" blob
) WITH compression = {};
stop node 3
connect via cqlsh and run
consistency all
insert into keyspace1.standard1 (key) values (0x01)
On Urchin you get
cqlsh> consistency all
Consistency level set to ALL.
cqlsh> insert into keyspace1.standard1 (key,c0) values (0x01,0x02)
... ;
code=2200 [Invalid query] message="Unknown identifier c0"
cqlsh> insert into keyspace1.standard1 (key,C0) values (0x01,0x02) ;
code=2200 [Invalid query] message="Unknown identifier c0"
cqlsh> insert into keyspace1.standard1 (key) values (0x01) ;
<ErrorMessage code=0000 [Server error] message="Cannot achieve consistency level">
cqlsh>
On origin you get
cqlsh> consistency all
Consistency level set to ALL.
cqlsh> insert into keyspace1.standard1 (key) values (0x01) ;
Traceback (most recent call last):
File "/home/shlomi/cassandra/bin/cqlsh", line 980, in perform_simple_statement
rows = self.session.execute(statement, trace=self.tracing_enabled)
File "/home/shlomi/cassandra/bin/../lib/cassandra-driver-internal-only-2.1.3.zip/cassandra-driver-2.1.3/cassandra/cluster.py", line 1295, in execute
result = future.result(timeout)
File "/home/shlomi/cassandra/bin/../lib/cassandra-driver-internal-only-2.1.3.zip/cassandra-driver-2.1.3/cassandra/cluster.py", line 2799, in result
raise self._final_exception
Unavailable: code=1000 [Unavailable exception] message="Cannot achieve consistency level ALL" info={'required_replicas': 3, 'alive_replicas': 2, 'consistency': 'ALL'}
This is failing the DTEST consistency_test.py - test_simple_strategy (modified version avilable on slivne/urchin-dtest branch consistency_test_simple_strategy)
nosetests -v consistency_test.py:TestAvailability.test_simple_strategy
The text was updated successfully, but these errors were encountered: