-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Added cluster setup using go processes #5346
Conversation
Signed-off-by: Arindam Nayak <[email protected]>
Signed-off-by: Arindam Nayak <[email protected]>
Signed-off-by: Arindam Nayak <[email protected]>
Signed-off-by: Arindam Nayak <[email protected]>
9eda3b1
to
d294d2a
Compare
Signed-off-by: Arindam Nayak <[email protected]>
d294d2a
to
0bd72fe
Compare
… cluster_for_test
Signed-off-by: Arindam Nayak <[email protected]>
72d49b3
to
ef7139d
Compare
Signed-off-by: Arindam Nayak <[email protected]>
45fc538
to
e2c3a16
Compare
We should be able to run the tests in local environment, not just in docker. |
* transaction mode and vschema test cases Signed-off-by: Ajeet jain <[email protected]> * review comments implemented Signed-off-by: Ajeet jain <[email protected]>
10bdaee
to
d5a16ad
Compare
Signed-off-by: Arindam Nayak <[email protected]>
d5a16ad
to
5ac032e
Compare
Signed-off-by: Arindam Nayak <[email protected]>
How are you ensuring that when we start more than one vttablet+mysql, each mysql is running on a different socket? |
I have verified that I can run |
We execute mysqlctl here, there we specify the tablet_uid which is unique for each tablets, at that point different vt_0000XXX directory is created, where mysql socket file is created under such tablet directories. The following lines , create tablet and uses the same tablet_uid created just before, which ensures the corresponding tablet uses the socket file under that directory. Regarding the warning, |
when these errors occur, the tests fail. Can we try to |
@deepthi , this is already taken care, please check this file. Also I changed the code to not use Please take latest update and then run the tests. |
df4e96b
to
cca0d9f
Compare
3b381b9
to
bd8b0e0
Compare
fix the test error
bd8b0e0
to
976242f
Compare
Signed-off-by: Arindam Nayak <[email protected]>
Signed-off-by: Morgan Tocker <[email protected]>
2665b57
to
28168b5
Compare
Signed-off-by: Morgan Tocker <[email protected]>
28168b5
to
b7672bd
Compare
… by github workflow Signed-off-by: Arindam Nayak <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work. Very readable code. I caught one issue on the random number generation. I'm surprised any tests ran successfully in parallel.
} | ||
|
||
func getRandomNumber(maxNumber int32, baseNumber int) int { | ||
return int(rand.Int31n(maxNumber)) + baseNumber |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not as random as you think. At minimum, you have to call rand.Seed
. Otherwise, all processes will generate the exact same sequence of random numbers.
I'm also worried about the possibility of collisions even after seeding. But I don't have an elegant answer right now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently all these type of tests run sequentially - check here. However, I noticed that for every run of test, the processes generated with different numbers for port even in travis and github workflow (just verified those in execution log) as well as in local environment (Whereas it should have generated same seq of random numbers for every run). Anyway I will try with rand.Seed
to add some randomness.
Note: Here it can be seen that for every test, the etcd uses different port (same applicable for each process), 1st, 2nd , 3rd.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added rand.seed
in the recent commit.
Signed-off-by: Arindam Nayak <[email protected]>
8b95e42
to
bb51e19
Compare
|
||
- name: Get dependencies | ||
run: | | ||
sudo apt-get install -y mysql-server mysql-client make unzip g++ etcd curl git wget |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@morgo how do we know which version of mysql is being used here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is the one included in ubuntu-latest
, so likely 8.0. I can change it to MySQL 5.7 from Oracle repos. For the local-example it does the same, but a matrix build probably makes more sense so we catch both.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I looked into this further, it is 5.7:
mysql-client is already the newest version (5.7.27-0ubuntu0.18.04.1).
mysql-server is already the newest version (5.7.27-0ubuntu0.18.04.1).
The ubuntu-latest
is 18.04. Assuming GitHub plans to bump this with new lts releases, this will change to 20.04, and MySQL 8.0 in April 2020. The fix then is to switch to the MySQL team repos, or consider upgrading our testsuite. Since MySQL 8.0 initializes slower, we will most likely chose the repo switch:
wget https://dev.mysql.com/get/mysql-apt-config_0.8.13-1_all.deb
sudo apt install -y ./mysql-apt-config_0.8*
sudo sed -i 's/mysql-8.0/mysql-5.7/' /etc/apt/sources.list.d/mysql.list
sudo apt-get update
sudo apt-get install mysql-community-server mysql-community-client
Signed-off-by: Arindam Nayak [email protected]
Added cluster setup using go processes (vttablet, vtctld, vtgate etc.. processes).
Added clustertest to verify if cluster setup is working.
Migrated 2 of go/vt/vtgate/endtoend/ test to use the new cluster setup.