mirror of
https://github.com/fluencelabs/redis
synced 2025-07-31 00:11:56 +00:00
Cluster test: also write from Lua script in resharding test.
This commit is contained in:
@@ -66,9 +66,18 @@ test "Cluster consistency during live resharding" {
|
||||
}
|
||||
|
||||
# Write random data to random list.
|
||||
set key "key:[randomInt $numkeys]"
|
||||
set listid [randomInt $numkeys]
|
||||
set key "key:$listid"
|
||||
set ele [randomValue]
|
||||
$cluster rpush $key $ele
|
||||
# We write both with Lua scripts and with plain commands.
|
||||
# This way we are able to stress Lua -> Redis command invocation
|
||||
# as well, that has tests to prevent Lua to write into wrong
|
||||
# hash slots.
|
||||
if {$listid % 2} {
|
||||
$cluster rpush $key $ele
|
||||
} else {
|
||||
$cluster eval {redis.call("rpush",KEYS[1],ARGV[1])} 1 $key $ele
|
||||
}
|
||||
lappend content($key) $ele
|
||||
|
||||
if {($j % 1000) == 0} {
|
||||
|
Reference in New Issue
Block a user