"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "tests/integration/replication.tcl" between
redis-6.2.4.tar.gz and redis-6.2.5.tar.gz

About: redis is an advanced key-value store. It is often referred to as a data structure server since keys can contain strings, hashes, lists, sets and sorted sets.

replication.tcl  (redis-6.2.4):replication.tcl  (redis-6.2.5)
skipping to change at line 319 skipping to change at line 319
fail "Slaves still not connected after some time " fail "Slaves still not connected after some time "
} }
# Stop the write load # Stop the write load
stop_bg_complex_data $load_handle0 stop_bg_complex_data $load_handle0
stop_bg_complex_data $load_handle1 stop_bg_complex_data $load_handle1
stop_bg_complex_data $load_handle2 stop_bg_complex_data $load_handle2
stop_write_load $load_handle3 stop_write_load $load_handle3
stop_write_load $load_handle4 stop_write_load $load_handle4
# Make sure that slaves and master have same # Make sure no more commands processed
# number of keys wait_load_handlers_disconnected
wait_for_condition 500 100 {
[$master dbsize] == [[lindex $slaves 0] dbsize] wait_for_ofs_sync $master [lindex $slaves 0]
&& wait_for_ofs_sync $master [lindex $slaves 1]
[$master dbsize] == [[lindex $slaves 1] dbsize] wait_for_ofs_sync $master [lindex $slaves 2]
&&
[$master dbsize] == [[lindex $slaves 2] dbsize]
} else {
fail "Different number of keys between master an
d replica after too long time."
}
# Check digests # Check digests
set digest [$master debug digest] set digest [$master debug digest]
set digest0 [[lindex $slaves 0] debug digest] set digest0 [[lindex $slaves 0] debug digest]
set digest1 [[lindex $slaves 1] debug digest] set digest1 [[lindex $slaves 1] debug digest]
set digest2 [[lindex $slaves 2] debug digest] set digest2 [[lindex $slaves 2] debug digest]
assert {$digest ne 000000000000000000000000000000000 0000000} assert {$digest ne 000000000000000000000000000000000 0000000}
assert {$digest eq $digest0} assert {$digest eq $digest0}
assert {$digest eq $digest1} assert {$digest eq $digest1}
assert {$digest eq $digest2} assert {$digest eq $digest2}
skipping to change at line 905 skipping to change at line 902
# Slave1 disconnect with master # Slave1 disconnect with master
$slave1 slaveof no one $slave1 slaveof no one
# Shouldn't kill child since another slave wait for rdb # Shouldn't kill child since another slave wait for rdb
after 100 after 100
assert {[s 0 rdb_bgsave_in_progress] == 1} assert {[s 0 rdb_bgsave_in_progress] == 1}
# Slave2 disconnect with master # Slave2 disconnect with master
$slave2 slaveof no one $slave2 slaveof no one
# Should kill child # Should kill child
wait_for_condition 20 10 { wait_for_condition 100 10 {
[s 0 rdb_bgsave_in_progress] eq 0 [s 0 rdb_bgsave_in_progress] eq 0
} else { } else {
fail "can't kill rdb child" fail "can't kill rdb child"
} }
# If have save parameters, won't kill child # If have save parameters, won't kill child
$master config set save "900 1" $master config set save "900 1"
$slave1 slaveof $master_host $master_port $slave1 slaveof $master_host $master_port
$slave2 slaveof $master_host $master_port $slave2 slaveof $master_host $master_port
wait_for_condition 50 100 { wait_for_condition 50 100 {
 End of changes. 2 change blocks. 
13 lines changed or deleted 7 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)