File: show_error_on_disconnect.result

package info (click to toggle)
tarantool 2.6.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 85,364 kB
  • sloc: ansic: 513,760; cpp: 69,489; sh: 25,650; python: 19,190; perl: 14,973; makefile: 4,173; yacc: 1,329; sql: 1,074; pascal: 620; ruby: 190; awk: 18; lisp: 7
file content (107 lines) | stat: -rw-r--r-- 1,670 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
--
-- gh-3365: display an error in upstream on downstream failure.
-- Create a gap in LSN to cause replica's failure.
-- The goal here is to see same error message on both side.
--
test_run = require('test_run').new()
---
...
SERVERS = {'master_quorum1', 'master_quorum2'}
---
...
-- Deploy a cluster.
test_run:create_cluster(SERVERS)
---
...
test_run:wait_fullmesh(SERVERS)
---
...
test_run:cmd("switch master_quorum1")
---
- true
...
repl = box.cfg.replication
---
...
box.cfg{replication = ""}
---
...
test_run:cmd("switch master_quorum2")
---
- true
...
box.space.test:insert{1}
---
- [1]
...
box.snapshot()
---
- ok
...
box.space.test:insert{2}
---
- [2]
...
box.snapshot()
---
- ok
...
-- Manually remove all xlogs on master_quorum2 to break replication to master_quorum1.
fio = require('fio')
---
...
for _, path in ipairs(fio.glob(fio.pathjoin(box.cfg.wal_dir, '*.xlog'))) do fio.unlink(path) end
---
...
box.space.test:insert{3}
---
- [3]
...
-- Check error reporting.
test_run:cmd("switch master_quorum1")
---
- true
...
box.cfg{replication = repl}
---
...
box.space.test:select()
---
- []
...
other_id = box.info.id % 2 + 1
---
...
test_run:wait_upstream(other_id, {status = 'stopped', message_re = 'Missing'})
---
- true
...
test_run:cmd("switch master_quorum2")
---
- true
...
box.space.test:select()
---
- - [1]
  - [2]
  - [3]
...
other_id = box.info.id % 2 + 1
---
...
test_run:wait_upstream(other_id, {status = 'follow', message_re = box.NULL})
---
- true
...
test_run:wait_downstream(other_id, {status = 'stopped', message_re = 'Missing'})
---
- true
...
test_run:cmd("switch default")
---
- true
...
-- Cleanup.
test_run:drop_cluster(SERVERS)
---
...