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
593ce5b2
Commit
593ce5b2
authored
Aug 31, 2018
by
antirez
Browse files
Test: processing of master stream in slave -BUSY state.
See #5297.
parent
f2739ca9
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/integration/replication.tcl
View file @
593ce5b2
...
...
@@ -266,3 +266,47 @@ foreach dl {no yes} {
}
}
}
start_server
{
tags
{
"repl"
}}
{
set master
[
srv 0 client
]
set master_host
[
srv 0 host
]
set master_port
[
srv 0 port
]
set load_handle0
[
start_write_load $master_host $master_port 3
]
start_server
{}
{
test
"Master stream is correctly processed while the slave has a script in -BUSY state"
{
set slave
[
srv 0 client
]
puts
[
srv 0 port
]
$slave config set lua-time-limit 500
$slave slaveof $master_host $master_port
# Wait for the slave to be online
wait_for_condition 500 100
{
[
lindex
[
$slave
role
]
3
]
eq
{
connected
}
}
else
{
fail
"Slave still not connected after some time"
}
# Wait some time to make sure the master is sending data
# to the slave.
after 5000
# Stop the ability of the slave to process data by sendig
# a script that will put it in BUSY state.
$slave eval
{
for i=1,3000000000 do end
}
0
# Wait some time again so that more master stream will
# be processed.
after 2000
# Stop the write load
stop_write_load $load_handle0
# number of keys
wait_for_condition 500 100
{
[
$master
debug digest
]
eq
[
$slave
debug digest
]
}
else
{
fail
"Different datasets between slave and master"
}
}
}
}
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