mirror of https://mirror.osredm.com/root/redis.git
Fix 'Client output buffer hard limit is enforced' test causing infinite loop (#13934)
This PR fixes an issue in the CI test for client-output-buffer-limit, which was causing an infinite loop when running on macOS 15.4. ### Problem This test start two clients, R and R1: ```c R1 subscribe foo R publish foo bar ``` When R executes `PUBLISH foo bar`, the server first stores the message `bar` in R1‘s buf. Only when the space in buf is insufficient does it call `_addReplyProtoToList`. Inside this function, `closeClientOnOutputBufferLimitReached` is invoked to check whether the client’s R1 output buffer has reached its configured limit. On macOS 15.4, because the server writes to the client at a high speed, R1’s buf never gets full. As a result, `closeClientOnOutputBufferLimitReached` in the test is never triggered, causing the test to never exit and fall into an infinite loop. --------- Co-authored-by: debing.sun <debing.sun@redis.com>
This commit is contained in:
parent
c37a782153
commit
47505c3533
|
@ -37,7 +37,9 @@ start_server {tags {"obuf-limits external:skip logreqres:skip"}} {
|
|||
|
||||
set omem 0
|
||||
while 1 {
|
||||
r publish foo bar
|
||||
# The larger content size ensures that client.buf gets filled more quickly,
|
||||
# allowing us to correctly observe the gradual increase of `omem`
|
||||
r publish foo [string repeat bar 50]
|
||||
set clients [split [r client list] "\r\n"]
|
||||
set c [split [lindex $clients 1] " "]
|
||||
if {![regexp {omem=([0-9]+)} $c - omem]} break
|
||||
|
|
Loading…
Reference in New Issue