"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "tests/integration/replication-2.tcl" between
redis-6.2-rc3.tar.gz and redis-6.2.0.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-2.tcl  (redis-6.2-rc3):replication-2.tcl  (redis-6.2.0)
skipping to change at line 42 skipping to change at line 42
r config set min-slaves-max-lag 10 r config set min-slaves-max-lag 10
r set foo 12345 r set foo 12345
wait_for_condition 50 100 { wait_for_condition 50 100 {
[r -1 get foo] eq {12345} [r -1 get foo] eq {12345}
} else { } else {
fail "Write did not reached replica" fail "Write did not reached replica"
} }
} }
test {No write if min-slaves-max-lag is > of the slave lag} { test {No write if min-slaves-max-lag is > of the slave lag} {
r -1 deferred 1
r config set min-slaves-to-write 1 r config set min-slaves-to-write 1
r config set min-slaves-max-lag 2 r config set min-slaves-max-lag 2
r -1 debug sleep 6 exec kill -SIGSTOP [srv -1 pid]
assert {[r set foo 12345] eq {OK}} assert {[r set foo 12345] eq {OK}}
after 4000 wait_for_condition 100 100 {
[catch {r set foo 12345}] != 0
} else {
fail "Master didn't become readonly"
}
catch {r set foo 12345} err catch {r set foo 12345} err
assert {[r -1 read] eq {OK}} assert_match {NOREPLICAS*} $err
r -1 deferred 0 }
set err exec kill -SIGCONT [srv -1 pid]
} {NOREPLICAS*}
test {min-slaves-to-write is ignored by slaves} { test {min-slaves-to-write is ignored by slaves} {
r config set min-slaves-to-write 1 r config set min-slaves-to-write 1
r config set min-slaves-max-lag 10 r config set min-slaves-max-lag 10
r -1 config set min-slaves-to-write 1 r -1 config set min-slaves-to-write 1
r -1 config set min-slaves-max-lag 10 r -1 config set min-slaves-max-lag 10
r set foo aaabbb r set foo aaabbb
wait_for_condition 50 100 { wait_for_condition 50 100 {
[r -1 get foo] eq {aaabbb} [r -1 get foo] eq {aaabbb}
} else { } else {
 End of changes. 4 change blocks. 
7 lines changed or deleted 9 lines changed or added

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