Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
af347a8c
Unverified
Commit
af347a8c
authored
Mar 05, 2020
by
Salvatore Sanfilippo
Committed by
GitHub
Mar 05, 2020
Browse files
Merge pull request #6954 from oranagra/fix-flaky-psync2-test
fix for flaky psync2 test
parents
f88f8661
27641ee4
Changes
1
Show whitespace changes
Inline
Side-by-side
tests/integration/psync2.tcl
View file @
af347a8c
...
...
@@ -114,6 +114,27 @@ start_server {} {
}
}
# wait for all the slaves to be in sync with the master
set master_ofs
[
status $R
(
$master
_id
)
master_repl_offset
]
wait_for_condition 500 100
{
$master_ofs ==
[
status $R
(
0
)
master_repl_offset
]
&&
$master_ofs ==
[
status $R
(
1
)
master_repl_offset
]
&&
$master_ofs ==
[
status $R
(
2
)
master_repl_offset
]
&&
$master_ofs ==
[
status $R
(
3
)
master_repl_offset
]
&&
$master_ofs ==
[
status $R
(
4
)
master_repl_offset
]
}
else
{
if
{
$debug
_msg
}
{
for
{
set j 0
}
{
$j
< 5
}
{
incr j
}
{
puts
"
$j:
sync_full:
[
status $R
(
$j
)
sync_full
]
"
puts
"
$j:
id1 :
[
status $R
(
$j
)
master_replid
]
:
[
status $R
(
$j
)
master_repl_offset
]
"
puts
"
$j:
id2 :
[
status $R
(
$j
)
master_replid2
]
:
[
status $R
(
$j
)
second_repl_offset
]
"
puts
"
$j:
backlog : firstbyte=
[
status $R
(
$j
)
repl_backlog_first_byte_offset
]
len=
[
status $R
(
$j
)
repl_backlog_histlen
]
"
puts
"---"
}
}
fail
"Slaves are not in sync with the master after too long time."
}
# Put down the old master so that it cannot generate more
# replication stream, this way in the next master switch, the time at
# which we move slaves away is not important, each will have full
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment