Fix module blocked clients RESP version (#9634)

Before this commit, module blocked clients did not carry through the original RESP version, resulting with RESP3 clients receiving unexpected RESP2 replies.
This commit is contained in:
Shaya Potter
2021-10-21 14:01:10 +03:00
committed by GitHub
parent 8f745da159
commit cf860df599
3 changed files with 38 additions and 1 deletions
+14
View File
@@ -78,6 +78,20 @@ start_server {tags {"modules"}} {
r do_bg_rm_call hgetall hash
} {foo bar}
test {RESP version carries through to blocked client} {
for {set client_proto 2} {$client_proto <= 3} {incr client_proto} {
r hello $client_proto
r readraw 1
set ret [r do_fake_bg_true]
if {$client_proto == 2} {
assert_equal $ret {:1}
} else {
assert_equal $ret "#t"
}
r readraw 0
}
}
test {blocked client reaches client output buffer limit} {
r hset hash big [string repeat x 50000]
r hset hash bada [string repeat x 50000]