mit-pdos / noria

Fast web applications through dynamic, partially-stateful dataflow
Apache License 2.0
4.98k stars 242 forks source link

Trouble getting started using mysql endpoint #131

Closed flyaruu closed 5 years ago

flyaruu commented 5 years ago

Hi Noria people,

I've build Kafka / Kafka streams based replication systems to increase write performance for database systems, and Noria seems very promising. My first desire is to start a simple Noria cluster, and I run into some trouble. What I have done:

I've successfully built the following projects

First, I start a simple zookeeper instance: docker run -p 2181:2181 zookeeper

Then a noria server: noria-server --deployment myapp --no-reuse --address 127.0.0.1 --shards 0 --zookeeper 127.0.0.1:2181 -v

Then a mysql endpoint: noria-mysql --zookeeper-address 127.0.0.1:2181 --deployment myapp -v

Then I connect a mysql client: mysql -h 127.0.0.1 (version Ver 8.0.15 for osx10.14 on x86_64, don't know if that matters)

Connects. Then I enter a query I've found in the unit test: mysql> CREATE TABLE Cats (id int PRIMARY KEY, name VARCHAR(255), PRIMARY KEY(id)); Query OK, 0 rows affected (0.09 sec)

Seems ok, then: mysql> INSERT INTO Cats (id, name) VALUES (1, 'Bob'); ERROR 2013 (HY000): Lost connection to MySQL server during query

... and after that the endpoint seems non-responsive until I restart.

I'm pretty sure I'm doing something wrong, but can't find much info.

ms705 commented 5 years ago

Ah, sorry about that! I believe you're running into the bug fixed in ms705/nom-sql@fc320c4dfc5d9fc61206980b1029333b849d05cc. The fix was released in nom-sql v0.0.9, but we hadn't upgraded Noria and noria-mysql to the latest version yet. Now done -- try again with the latest master?

flyaruu commented 5 years ago

Did the trick! Thanks!