Unverified Commit 897c7bdd authored by yoav-steinberg's avatar yoav-steinberg Committed by GitHub
Browse files

Attempt to fix rare pubsub oubuf maxmemory eviction test failure (#9603)

* Reduce delay between publishes to allow less time to write the obufs.
* More subscribed clients to buffer more data per publish.
* Make sure main connection isn't evicted (it has a large qbuf).
parent 83478e61
...@@ -9,6 +9,7 @@ start_server {tags {"maxmemory" "external:skip"}} { ...@@ -9,6 +9,7 @@ start_server {tags {"maxmemory" "external:skip"}} {
set prev_maxmemory_clients [r config get maxmemory-clients] set prev_maxmemory_clients [r config get maxmemory-clients]
if $client_eviction { if $client_eviction {
r config set maxmemory-clients 3mb r config set maxmemory-clients 3mb
r client no-evict on
} else { } else {
r config set maxmemory-clients 0 r config set maxmemory-clients 0
} }
...@@ -116,7 +117,7 @@ start_server {tags {"maxmemory" "external:skip"}} { ...@@ -116,7 +117,7 @@ start_server {tags {"maxmemory" "external:skip"}} {
test "eviction due to output buffers of pubsub, client eviction: $client_eviction" { test "eviction due to output buffers of pubsub, client eviction: $client_eviction" {
init_test $client_eviction init_test $client_eviction
for {set j 0} {$j < 10} {incr j} { for {set j 0} {$j < 20} {incr j} {
set rr [redis_client] set rr [redis_client]
lappend clients $rr lappend clients $rr
} }
...@@ -125,8 +126,9 @@ start_server {tags {"maxmemory" "external:skip"}} { ...@@ -125,8 +126,9 @@ start_server {tags {"maxmemory" "external:skip"}} {
$rr subscribe bla $rr subscribe bla
} }
set bigstr [string repeat x 100000]
for {set j 0} {$j < 40} {incr j} { for {set j 0} {$j < 40} {incr j} {
if {[catch {r publish bla [string repeat x 100000]} err]} { if {[catch {r publish bla $bigstr} err]} {
if $::verbose { if $::verbose {
puts "Error publishing: $err" puts "Error publishing: $err"
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment