@@ -27,38 +27,61 @@ export CLUSTER_NAME=replication
27
27
––– output –––
28
28
––– block: ../base/replication/join-cluster-on-all-nodes –––
29
29
––– input –––
30
- mysql -h0 -P1306 -e "CREATE TABLE testrt (title text, content text, gid uint);" && mysql -h0 -P1306 -e "INSERT INTO testrt VALUES(6775836565403860993,'List of HP business laptops','Elitebook Probook',1);" && mysql -h0 -P1306 -e "INSERT INTO testrt VALUES(6775836565403860994,'List of Dell business laptops','Latitude Precision Vostro',2);" && mysql -h0 -P1306 -e "ALTER CLUSTER replication ADD testrt;" && mysql -h0 -P1306 -e "SHOW STATUS LIKE 'cluster_replication_indexes';"
30
+ mysql -h0 -P1306 -e "CREATE TABLE testrt (title text, content text, gid uint);"
31
31
––– output –––
32
- +-----------------------------+--------+
33
- | Counter | Value |
34
- +-----------------------------+--------+
35
- | cluster_replication_indexes | testrt |
36
- +-----------------------------+--------+
37
32
––– input –––
38
- mysql -h0 -P1306 -e "SELECT * FROM testrt ORDER BY id ASC\G"
33
+ mysql -h0 -P1306 -e "ALTER CLUSTER replication ADD testrt;"
34
+ ––– output –––
35
+ ––– input –––
36
+ mysql -h0 -P1306 -e "SHOW STATUS LIKE 'cluster_replication_indexes';"
37
+ ––– output –––
38
+ ––– input –––
39
+ mysql -h0 -P1306 -e "INSERT INTO replication:testrt VALUES(6775836565403860993,'List of HP business laptops','Elitebook Probook',1);"
40
+ ––– output –––
41
+ ––– input –––
42
+ mysql -h0 -P1306 -e "INSERT INTO replication:testrt VALUES(6775836565403860994,'List of Dell business laptops','Latitude Precision Vostro',2);"
43
+ ––– output –––
44
+ ––– input –––
45
+ mysql -h0 -P1306 -e "SHOW CREATE TABLE testrt;"
39
46
––– output –––
40
- *************************** 1. row ***************************
41
- id: 6775836565403860993
42
- title: List of HP business laptops
43
- content: Elitebook Probook
44
- gid: 1
45
- *************************** 2. row ***************************
46
- id: 6775836565403860994
47
- title: List of Dell business laptops
48
- content: Latitude Precision Vostro
49
- gid: 2
50
47
––– input –––
51
48
export INSTANCE=5
52
49
––– output –––
53
- ––– block: ../base/replication/stop-searchd –––
50
+ ––– input –––
51
+ searchd --stopwait -c test/clt-tests/base/searchd-with-flexible-ports.conf
52
+ ––– output –––
53
+ Manticore %{SEMVER} %{COMMITDATE}#!/(\sdev)?\s/!#(columnar %{SEMVER} %{COMMITDATE}) (secondary %{SEMVER} %{COMMITDATE}) (knn %{SEMVER} %{COMMITDATE})
54
+ Copyright (c) 2001-2016, Andrew Aksyonoff
55
+ Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
56
+ Copyright (c) 2017-%{YEAR}, Manticore Software LTD (https://manticoresearch.com)
57
+ [#!/[0-9]{2}:[0-9]{2}.[0-9]{3}/!#] [%{NUMBER}] using config file '%{PATH}' (%{NUMBER} chars)...
58
+ [#!/[0-9]{2}:[0-9]{2}.[0-9]{3}/!#] [%{NUMBER}] stop: successfully sent SIGTERM to pid %{NUMBER}
54
59
––– input –––
55
60
mysql -h0 -P1306 -e "INSERT INTO replication:testrt VALUES(6775836565403860995,'List of HP business laptops','Macbook',3);"; echo $?
56
61
––– output –––
57
62
0
58
63
––– input –––
59
64
export INSTANCE=5
60
65
––– output –––
61
- ––– block: ../base/replication/start-searchd-precach –––
66
+ ––– input –––
67
+ mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}/{a,b,c,d,e,f,g,h,i,j}
68
+ ––– output –––
69
+ ––– input –––
70
+ stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf | grep -v precach
71
+ ––– output –––
72
+ Manticore %{SEMVER} %{COMMITDATE}#!/(\sdev)?\s/!#(columnar %{SEMVER} %{COMMITDATE}) (secondary %{SEMVER} %{COMMITDATE}) (knn %{SEMVER} %{COMMITDATE})
73
+ Copyright (c) 2001-2016, Andrew Aksyonoff
74
+ Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
75
+ Copyright (c) 2017-%{YEAR}, Manticore Software LTD (https://manticoresearch.com)
76
+ [#!/[a-zA-Z]{3}\s[a-zA-Z]{3}\s+[0-9]{1,2}\s[0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{3}\s[0-9]{4}/!#] [%{NUMBER}] using config file '/.clt/test/clt-tests/base/searchd-with-flexible-ports.conf' (%{NUMBER} chars)...
77
+ starting daemon version '%{SEMVER} %{COMMITDATE} dev (columnar %{SEMVER} %{COMMITDATE}) (secondary %{SEMVER} %{COMMITDATE}) (knn %{SEMVER} %{COMMITDATE})' ...
78
+ listening on all interfaces for mysql, port=%{NUMBER}
79
+ listening on all interfaces for sphinx and http(s), port=%{NUMBER}
80
+ listening on all interfaces for sphinx and http(s), port=%{NUMBER}
81
+ ––– input –––
82
+ if timeout 10 grep -qm1 'accepting connections' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Accepting connections!'; else echo 'Timeout or failed!'; fi
83
+ ––– output –––
84
+ Accepting connections!
62
85
––– input –––
63
86
sleep 5; mysql -h0 -P5306 -e "SELECT * FROM testrt ORDER BY id ASC\G"
64
87
––– output –––
@@ -80,12 +103,38 @@ gid: 3
80
103
––– input –––
81
104
export INSTANCE=2
82
105
––– output –––
83
- ––– block: ../base/replication/stop-searchd –––
106
+ ––– input –––
107
+ searchd --stopwait -c test/clt-tests/base/searchd-with-flexible-ports.conf
108
+ ––– output –––
109
+ Manticore %{SEMVER} %{COMMITDATE}#!/(\sdev)?\s/!#(columnar %{SEMVER} %{COMMITDATE}) (secondary %{SEMVER} %{COMMITDATE}) (knn %{SEMVER} %{COMMITDATE})
110
+ Copyright (c) 2001-2016, Andrew Aksyonoff
111
+ Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
112
+ Copyright (c) 2017-%{YEAR}, Manticore Software LTD (https://manticoresearch.com)
113
+ [#!/[0-9]{2}:[0-9]{2}.[0-9]{3}/!#] [%{NUMBER}] using config file '%{PATH}' (%{NUMBER} chars)...
114
+ [#!/[0-9]{2}:[0-9]{2}.[0-9]{3}/!#] [%{NUMBER}] stop: successfully sent SIGTERM to pid %{NUMBER}
84
115
––– input –––
85
116
mysql -h0 -P3306 -e "INSERT INTO replication:testrt VALUES(6775836565403860996,'NEW','TABLE',4);"; echo $?
86
117
––– output –––
87
118
0
88
- ––– block: ../base/replication/start-searchd-precach –––
119
+ ––– input –––
120
+ mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}/{a,b,c,d,e,f,g,h,i,j}
121
+ ––– output –––
122
+ ––– input –––
123
+ stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf | grep -v precach
124
+ ––– output –––
125
+ Manticore %{SEMVER} %{COMMITDATE}#!/(\sdev)?\s/!#(columnar %{SEMVER} %{COMMITDATE}) (secondary %{SEMVER} %{COMMITDATE}) (knn %{SEMVER} %{COMMITDATE})
126
+ Copyright (c) 2001-2016, Andrew Aksyonoff
127
+ Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
128
+ Copyright (c) 2017-%{YEAR}, Manticore Software LTD (https://manticoresearch.com)
129
+ [#!/[a-zA-Z]{3}\s[a-zA-Z]{3}\s+[0-9]{1,2}\s[0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{3}\s[0-9]{4}/!#] [%{NUMBER}] using config file '/.clt/test/clt-tests/base/searchd-with-flexible-ports.conf' (%{NUMBER} chars)...
130
+ starting daemon version '%{SEMVER} %{COMMITDATE} dev (columnar %{SEMVER} %{COMMITDATE}) (secondary %{SEMVER} %{COMMITDATE}) (knn %{SEMVER} %{COMMITDATE})' ...
131
+ listening on all interfaces for mysql, port=%{NUMBER}
132
+ listening on all interfaces for sphinx and http(s), port=%{NUMBER}
133
+ listening on all interfaces for sphinx and http(s), port=%{NUMBER}
134
+ ––– input –––
135
+ if timeout 10 grep -qm1 'accepting connections' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Accepting connections!'; else echo 'Timeout or failed!'; fi
136
+ ––– output –––
137
+ Accepting connections!
89
138
––– input –––
90
139
sleep 5;mysql -h0 -P2306 -e "SELECT * FROM testrt ORDER BY id ASC\G"
91
140
––– output –––
@@ -181,7 +230,15 @@ gid: 4
181
230
––– input –––
182
231
export INSTANCE=4
183
232
––– output –––
184
- ––– block: ../base/replication/stop-searchd –––
233
+ ––– input –––
234
+ searchd --stopwait -c test/clt-tests/base/searchd-with-flexible-ports.conf
235
+ ––– output –––
236
+ Manticore %{SEMVER} %{COMMITDATE}#!/(\sdev)?\s/!#(columnar %{SEMVER} %{COMMITDATE}) (secondary %{SEMVER} %{COMMITDATE}) (knn %{SEMVER} %{COMMITDATE})
237
+ Copyright (c) 2001-2016, Andrew Aksyonoff
238
+ Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
239
+ Copyright (c) 2017-%{YEAR}, Manticore Software LTD (https://manticoresearch.com)
240
+ [#!/[0-9]{2}:[0-9]{2}.[0-9]{3}/!#] [%{NUMBER}] using config file '%{PATH}' (%{NUMBER} chars)...
241
+ [#!/[0-9]{2}:[0-9]{2}.[0-9]{3}/!#] [%{NUMBER}] stop: successfully sent SIGTERM to pid %{NUMBER}
185
242
––– input –––
186
243
sleep 5;mysql -h0 -P2306 -e "DELETE FROM replication:testrt WHERE id = 6775836565403860994"; echo $?
187
244
––– output –––
@@ -192,7 +249,25 @@ mysql -h0 -P2306 -e "SELECT * FROM testrt ORDER BY id ASC" > /tmp/output_2306.tx
192
249
––– input –––
193
250
export INSTANCE=4
194
251
––– output –––
195
- ––– block: ../base/replication/start-searchd-precach –––
252
+ ––– input –––
253
+ mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}/{a,b,c,d,e,f,g,h,i,j}
254
+ ––– output –––
255
+ ––– input –––
256
+ stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf | grep -v precach
257
+ ––– output –––
258
+ Manticore %{SEMVER} %{COMMITDATE}#!/(\sdev)?\s/!#(columnar %{SEMVER} %{COMMITDATE}) (secondary %{SEMVER} %{COMMITDATE}) (knn %{SEMVER} %{COMMITDATE})
259
+ Copyright (c) 2001-2016, Andrew Aksyonoff
260
+ Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
261
+ Copyright (c) 2017-%{YEAR}, Manticore Software LTD (https://manticoresearch.com)
262
+ [#!/[a-zA-Z]{3}\s[a-zA-Z]{3}\s+[0-9]{1,2}\s[0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{3}\s[0-9]{4}/!#] [%{NUMBER}] using config file '/.clt/test/clt-tests/base/searchd-with-flexible-ports.conf' (%{NUMBER} chars)...
263
+ starting daemon version '%{SEMVER} %{COMMITDATE} dev (columnar %{SEMVER} %{COMMITDATE}) (secondary %{SEMVER} %{COMMITDATE}) (knn %{SEMVER} %{COMMITDATE})' ...
264
+ listening on all interfaces for mysql, port=%{NUMBER}
265
+ listening on all interfaces for sphinx and http(s), port=%{NUMBER}
266
+ listening on all interfaces for sphinx and http(s), port=%{NUMBER}
267
+ ––– input –––
268
+ if timeout 10 grep -qm1 'accepting connections' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Accepting connections!'; else echo 'Timeout or failed!'; fi
269
+ ––– output –––
270
+ Accepting connections!
196
271
––– input –––
197
272
sleep 5;mysql -h0 -P1306 -e "SELECT * FROM testrt ORDER BY id ASC" > /tmp/output_1306.txt;
198
273
––– output –––
@@ -265,3 +340,152 @@ id: 6775836565403860994
265
340
title: List of Dell business laptops
266
341
content: Updated Content
267
342
gid: 2
343
+ ––– input –––
344
+ mysqldump -etc -h0 -P1306 --skip-comments manticore testrt > /tmp/manticore_backup.sql
345
+ ––– output –––
346
+ -- Warning: version string returned by server is incorrect.
347
+ -- Warning: column statistics not supported by the server.
348
+ ––– input –––
349
+ mysql -h0 -P1306 -e "ALTER CLUSTER replication DROP testrt;" && for port in 1306 2306 3306 4306 5306; do mysql -h0 -P$port -e "DROP TABLE testrt;"; done && for port in 1306 2306 3306 4306 5306; do echo "Checking tables on port $port"; mysql -h0 -P$port -e "SHOW TABLES;"; done
350
+ ––– output –––
351
+ Checking tables on port 1306
352
+ Checking tables on port 2306
353
+ Checking tables on port 3306
354
+ Checking tables on port 4306
355
+ Checking tables on port 5306
356
+ ––– input –––
357
+ mysql -h0 -P1306 -e "CREATE TABLE testrt (title text, content text, gid uint);"
358
+ ––– output –––
359
+ ––– input –––
360
+ mysql -h0 -P1306 < /tmp/manticore_backup.sql && mysql -h0 -P1306 -e "ALTER CLUSTER replication ADD testrt;" && for port in 1306 2306 3306 4306 5306; do echo "Checking tables on port $port"; mysql -h0 -P$port -e "SHOW TABLES;"; mysql -h0 -P$port -e "SELECT * FROM testrt ORDER BY id ASC\G"; done
361
+ ––– output –––
362
+ Checking tables on port 1306
363
+ +--------+------+
364
+ | Table | Type |
365
+ +--------+------+
366
+ | testrt | rt |
367
+ +--------+------+
368
+ *************************** 1. row ***************************
369
+ id: 6775836565403860993
370
+ title: List of HP business laptops
371
+ content: Elitebook Probook
372
+ gid: 1
373
+ *************************** 2. row ***************************
374
+ id: 6775836565403860994
375
+ title: List of Dell business laptops
376
+ content: Updated Content
377
+ gid: 2
378
+ *************************** 3. row ***************************
379
+ id: 6775836565403860995
380
+ title: List of HP business laptops
381
+ content: Macbook
382
+ gid: 3
383
+ *************************** 4. row ***************************
384
+ id: 6775836565403860996
385
+ title: NEW
386
+ content: TABLE
387
+ gid: 4
388
+ Checking tables on port 2306
389
+ +--------+------+
390
+ | Table | Type |
391
+ +--------+------+
392
+ | testrt | rt |
393
+ +--------+------+
394
+ *************************** 1. row ***************************
395
+ id: 6775836565403860993
396
+ title: List of HP business laptops
397
+ content: Elitebook Probook
398
+ gid: 1
399
+ *************************** 2. row ***************************
400
+ id: 6775836565403860994
401
+ title: List of Dell business laptops
402
+ content: Updated Content
403
+ gid: 2
404
+ *************************** 3. row ***************************
405
+ id: 6775836565403860995
406
+ title: List of HP business laptops
407
+ content: Macbook
408
+ gid: 3
409
+ *************************** 4. row ***************************
410
+ id: 6775836565403860996
411
+ title: NEW
412
+ content: TABLE
413
+ gid: 4
414
+ Checking tables on port 3306
415
+ +--------+------+
416
+ | Table | Type |
417
+ +--------+------+
418
+ | testrt | rt |
419
+ +--------+------+
420
+ *************************** 1. row ***************************
421
+ id: 6775836565403860993
422
+ title: List of HP business laptops
423
+ content: Elitebook Probook
424
+ gid: 1
425
+ *************************** 2. row ***************************
426
+ id: 6775836565403860994
427
+ title: List of Dell business laptops
428
+ content: Updated Content
429
+ gid: 2
430
+ *************************** 3. row ***************************
431
+ id: 6775836565403860995
432
+ title: List of HP business laptops
433
+ content: Macbook
434
+ gid: 3
435
+ *************************** 4. row ***************************
436
+ id: 6775836565403860996
437
+ title: NEW
438
+ content: TABLE
439
+ gid: 4
440
+ Checking tables on port 4306
441
+ +--------+------+
442
+ | Table | Type |
443
+ +--------+------+
444
+ | testrt | rt |
445
+ +--------+------+
446
+ *************************** 1. row ***************************
447
+ id: 6775836565403860993
448
+ title: List of HP business laptops
449
+ content: Elitebook Probook
450
+ gid: 1
451
+ *************************** 2. row ***************************
452
+ id: 6775836565403860994
453
+ title: List of Dell business laptops
454
+ content: Updated Content
455
+ gid: 2
456
+ *************************** 3. row ***************************
457
+ id: 6775836565403860995
458
+ title: List of HP business laptops
459
+ content: Macbook
460
+ gid: 3
461
+ *************************** 4. row ***************************
462
+ id: 6775836565403860996
463
+ title: NEW
464
+ content: TABLE
465
+ gid: 4
466
+ Checking tables on port 5306
467
+ +--------+------+
468
+ | Table | Type |
469
+ +--------+------+
470
+ | testrt | rt |
471
+ +--------+------+
472
+ *************************** 1. row ***************************
473
+ id: 6775836565403860993
474
+ title: List of HP business laptops
475
+ content: Elitebook Probook
476
+ gid: 1
477
+ *************************** 2. row ***************************
478
+ id: 6775836565403860994
479
+ title: List of Dell business laptops
480
+ content: Updated Content
481
+ gid: 2
482
+ *************************** 3. row ***************************
483
+ id: 6775836565403860995
484
+ title: List of HP business laptops
485
+ content: Macbook
486
+ gid: 3
487
+ *************************** 4. row ***************************
488
+ id: 6775836565403860996
489
+ title: NEW
490
+ content: TABLE
491
+ gid: 4
0 commit comments