"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "tests/integration/rdb.tcl" between
redis-6.0.7.tar.gz and redis-6.0.8.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.

rdb.tcl  (redis-6.0.7):rdb.tcl  (redis-6.0.8)
skipping to change at line 28 skipping to change at line 28
"0","set_zipped_2","set","100000","200000","300000","400000", "0","set_zipped_2","set","100000","200000","300000","400000",
"0","set_zipped_3","set","1000000000","2000000000","3000000000","4000000000","50 00000000","6000000000", "0","set_zipped_3","set","1000000000","2000000000","3000000000","4000000000","50 00000000","6000000000",
"0","string","string","Hello World" "0","string","string","Hello World"
"0","zset","zset","a","1","b","2","c","3","aa","10","bb","20","cc","30","aaa","1 00","bbb","200","ccc","300","aaaa","1000","cccc","123456789","bbbb","5000000000" , "0","zset","zset","a","1","b","2","c","3","aa","10","bb","20","cc","30","aaa","1 00","bbb","200","ccc","300","aaaa","1000","cccc","123456789","bbbb","5000000000" ,
"0","zset_zipped","zset","a","1","b","2","c","3", "0","zset_zipped","zset","a","1","b","2","c","3",
} }
} }
set server_path [tmpdir "server.rdb-startup-test"] set server_path [tmpdir "server.rdb-startup-test"]
start_server [list overrides [list "dir" $server_path]] { start_server [list overrides [list "dir" $server_path] keep_persistence true] {
test {Server started empty with non-existing RDB file} { test {Server started empty with non-existing RDB file} {
r debug digest r debug digest
} {0000000000000000000000000000000000000000} } {0000000000000000000000000000000000000000}
# Save an RDB file, needed for the next test. # Save an RDB file, needed for the next test.
r save r save
} }
start_server [list overrides [list "dir" $server_path]] { start_server [list overrides [list "dir" $server_path] keep_persistence true] {
test {Server started empty with empty RDB file} { test {Server started empty with empty RDB file} {
r debug digest r debug digest
} {0000000000000000000000000000000000000000} } {0000000000000000000000000000000000000000}
} }
start_server [list overrides [list "dir" $server_path]] { start_server [list overrides [list "dir" $server_path] keep_persistence true] {
test {Test RDB stream encoding} { test {Test RDB stream encoding} {
for {set j 0} {$j < 1000} {incr j} { for {set j 0} {$j < 1000} {incr j} {
if {rand() < 0.9} { if {rand() < 0.9} {
r xadd stream * foo $j r xadd stream * foo $j
} else { } else {
r xadd stream * bar $j r xadd stream * bar $j
} }
} }
r xgroup create stream mygroup 0 r xgroup create stream mygroup 0
r xreadgroup GROUP mygroup Alice COUNT 1 STREAMS stream > r xreadgroup GROUP mygroup Alice COUNT 1 STREAMS stream >
skipping to change at line 67 skipping to change at line 67
r del stream r del stream
} }
} }
# Helper function to start a server and kill it, just to check the error # Helper function to start a server and kill it, just to check the error
# logged. # logged.
set defaults {} set defaults {}
proc start_server_and_kill_it {overrides code} { proc start_server_and_kill_it {overrides code} {
upvar defaults defaults srv srv server_path server_path upvar defaults defaults srv srv server_path server_path
set config [concat $defaults $overrides] set config [concat $defaults $overrides]
set srv [start_server [list overrides $config]] set srv [start_server [list overrides $config keep_persistence true]]
uplevel 1 $code uplevel 1 $code
kill_server $srv kill_server $srv
} }
# Make the RDB file unreadable # Make the RDB file unreadable
file attributes [file join $server_path dump.rdb] -permissions 0222 file attributes [file join $server_path dump.rdb] -permissions 0222
# Detect root account (it is able to read the file even with 002 perm) # Detect root account (it is able to read the file even with 002 perm)
set isroot 0 set isroot 0
catch { catch {
 End of changes. 4 change blocks. 
4 lines changed or deleted 4 lines changed or added

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