Fix: client pause uses an old timeout (#9477)
A write request may be paused unexpectedly because `server.client_pause_end_time` is old. **Recreate this:** redis-cli -p 6379 127.0.0.1:6379> client pause 500000000 write OK 127.0.0.1:6379> client unpause OK 127.0.0.1:6379> client pause 10000 write OK 127.0.0.1:6379> set key value The write request `set key value` is paused util the timeout of 500000000 milliseconds was reached. **Fix:** reset `server.client_pause_end_time` = 0 in `unpauseClients` (cherry picked from commit f560531d5b8a6e6d810b62114e69a5ffda7730f7)
This commit is contained in:
parent
e5e3cd469c
commit
1e21863e20
@ -3364,6 +3364,7 @@ void unpauseClients(void) {
|
|||||||
client *c;
|
client *c;
|
||||||
|
|
||||||
server.client_pause_type = CLIENT_PAUSE_OFF;
|
server.client_pause_type = CLIENT_PAUSE_OFF;
|
||||||
|
server.client_pause_end_time = 0;
|
||||||
|
|
||||||
/* Unblock all of the clients so they are reprocessed. */
|
/* Unblock all of the clients so they are reprocessed. */
|
||||||
listRewind(server.paused_clients,&li);
|
listRewind(server.paused_clients,&li);
|
||||||
|
@ -2764,6 +2764,10 @@ void initServerConfig(void) {
|
|||||||
* Redis 5. However it is possible to revert it via redis.conf. */
|
* Redis 5. However it is possible to revert it via redis.conf. */
|
||||||
server.lua_always_replicate_commands = 1;
|
server.lua_always_replicate_commands = 1;
|
||||||
|
|
||||||
|
/* Client Pause related */
|
||||||
|
server.client_pause_type = CLIENT_PAUSE_OFF;
|
||||||
|
server.client_pause_end_time = 0;
|
||||||
|
|
||||||
initConfigValues();
|
initConfigValues();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user