Closed lexmag closed 5 years ago
Hey lexmag, do you have any idea on how to achieve that? We could run the tests against a scylla node or an app which implements calls to scylla using xandra as the driver. If the tests implements specs for the CQL then it would suffice since scylla is a drop in for cassandra.
FYI, we're going to be experimenting with Scylla and Xandra. We'll keep you posted.
Nice, I was starting a simple project to try the queries of scylla documentation, think this would help?
Hi folks, I though about the following plan:
Please let me know if you've already done or plan to do any of those. Thanks for pushing this forward. 💛
I though on something similar, we could:
I've searched for the Scylla drivers and there isn't an official one, all of them are Cassandra drivers that people tested, and others are believed to work 1.
Later today I'll try to build the test matrix for Scylla on Travis
If it helps, I've been running Xandra against some Scylla instances in test right now and it's been working 100% fine here, although I'm not doing anything "fancy" with it.
I came across a problem few weeks ago:
(EXIT from #PID<0.752.0>) evaluator process exited with reason: an exception was raised:
(FunctionClauseError) no function clause matching in Xandra.Protocol.decode_type/1
(xandra) lib/xandra/protocol.ex:812: Xandra.Protocol.decode_type(<<0, 17, 0, 2, 116, 115, 0, 2, 0, 15, 99, 111, 114, 101, 95, 109, 101, 115, 115, 97, 103, 101, 95, 105, 100, 0, 9, 0, 9, 97, 99, 99, 95, 97, 110, 103, 108, 101, 0, 8, 0, 8, 97, 99, 99, 95, 114, 97, 116, 101, ...>>)
(xandra) lib/xandra/protocol.ex:807: Xandra.Protocol.decode_columns/4
(xandra) lib/xandra/protocol.ex:614: Xandra.Protocol.decode_metadata/2
(xandra) lib/xandra/protocol.ex:547: Xandra.Protocol.decode_result_response/3
(xandra) lib/xandra/connection.ex:59: Xandra.Connection.handle_prepare/3
(db_connection) lib/db_connection.ex:966: DBConnection.handle/4
(db_connection) lib/db_connection.ex:1043: anonymous fn/3 in DBConnection.run_prepare/3
(db_connection) lib/db_connection.ex:1207: DBConnection.run_begin/3
I was tring to prepare statements for the batch insert into ScyllaDB, and the response back was this. If that helps.
I got several of those in Travis, seems it can't decode binary types
So i dig a bit more into test and one is failing:
1) test dynamic result columns (PreparedTest)
test/integration/prepared_test.exs:47
match (=) failed
code: assert {:ok, page} = Xandra.execute(conn, prepared)
right: {:error,
%Xandra.Error{message: "Not implemented: LWT",
reason: :server_failure}}
stacktrace:
test/integration/prepared_test.exs:51: (test)
As I check a bit on this test on ScyllaDB Github, here is the answer:
Scylla does not support light-weight transactions (LWT), which are required for the IF NOT EXISTS syntax you are using above. See #1359 for more discussion on supporting LWT.
Should this test be excluded with some tag when running tests on ScyllaDB?
Also i think i fixed problems with wrong decoding types on my fork.
Should this test be excluded with some tag when running tests on ScyllaDB?
Yes.
Added the tag on my fork, could somebody take a look if this is the by project guideline, or should I change things?
That looks okay to me.
Should I also make the Travis configuration on the project? And if somebody can help me with the configuration to test both on Cassandra and ScyllaDB?
So I have made a pull request for the ScyllaDB now just one test is failing I'm just wondering if someone could some guidance as on why this test is failing?
1) test using a default timestamp for the batch (BatchTest)
test/integration/batch_test.exs:55
Assertion with == failed
code: Enum.to_list(result) == [%{"name" => "Abed", "writetime(name)" => timestamp}, %{"name" => "Troy", "writetime(name)" => timestamp}]
left: [%{"name" => "Marge", "writetime(name)" => 1526925340295329}, %{"name" => "Homer", "writetime(name)" => 1526925340295329}]
right: [%{"name" => "Abed", "writetime(name)" => 1526924740}, %{"name" => "Troy", "writetime(name)" => 1526924740}]
stacktrace:
test/integration/batch_test.exs:65: (test)
Found the bug, was the wrong configuration in .travis.yaml
PR is ready to merge.
Since it is merged you can close this issue. Sorry, couldn't help at the final stages had too much on mine plate.
Scylla: http://www.scylladb.com.