Fix test failure caused by allowing pings during load
Former-commit-id: 569a3d9ff86f4cd74e269391ce1d582e009147ce
This commit is contained in:
parent
10a745df65
commit
68ed1292ee
@ -689,7 +689,7 @@ struct redisCommand redisCommandTable[] = {
|
|||||||
* failure detection, and a loading server is considered to be
|
* failure detection, and a loading server is considered to be
|
||||||
* not available. */
|
* not available. */
|
||||||
{"ping",pingCommand,-1,
|
{"ping",pingCommand,-1,
|
||||||
"ok-stale fast @connection @replication",
|
"ok-stale ok-loading fast @connection @replication",
|
||||||
0,NULL,0,0,0,0,0,0},
|
0,NULL,0,0,0,0,0,0},
|
||||||
|
|
||||||
{"echo",echoCommand,2,
|
{"echo",echoCommand,2,
|
||||||
@ -3853,8 +3853,8 @@ int processCommand(client *c, int callFlags) {
|
|||||||
(c->cmd->proc == execCommand && (c->mstate.cmd_flags & CMD_DENYOOM));
|
(c->cmd->proc == execCommand && (c->mstate.cmd_flags & CMD_DENYOOM));
|
||||||
int is_denystale_command = !(c->cmd->flags & CMD_STALE) ||
|
int is_denystale_command = !(c->cmd->flags & CMD_STALE) ||
|
||||||
(c->cmd->proc == execCommand && (c->mstate.cmd_inv_flags & CMD_STALE));
|
(c->cmd->proc == execCommand && (c->mstate.cmd_inv_flags & CMD_STALE));
|
||||||
int is_denyloading_command = strcmp(c->cmd->name, "ping") && (!(c->cmd->flags & CMD_LOADING) ||
|
int is_denyloading_command = !(c->cmd->flags & CMD_LOADING) ||
|
||||||
(c->cmd->proc == execCommand && (c->mstate.cmd_inv_flags & CMD_LOADING)));
|
(c->cmd->proc == execCommand && (c->mstate.cmd_inv_flags & CMD_LOADING));
|
||||||
|
|
||||||
/* Check if the user is authenticated. This check is skipped in case
|
/* Check if the user is authenticated. This check is skipped in case
|
||||||
* the default user is flagged as "nopass" and is active. */
|
* the default user is flagged as "nopass" and is active. */
|
||||||
|
@ -449,7 +449,7 @@ start_server {tags {"scripting"}} {
|
|||||||
$rd eval {redis.call('set',KEYS[1],'y'); for i=1,1500000 do redis.call('ping') end return 'ok'} 1 x
|
$rd eval {redis.call('set',KEYS[1],'y'); for i=1,1500000 do redis.call('ping') end return 'ok'} 1 x
|
||||||
$rd flush
|
$rd flush
|
||||||
after 200
|
after 200
|
||||||
catch {r ping} err
|
catch {r echo "foo"} err
|
||||||
assert_match {BUSY*} $err
|
assert_match {BUSY*} $err
|
||||||
$rd read
|
$rd read
|
||||||
set elapsed [expr [clock clicks -milliseconds]-$start]
|
set elapsed [expr [clock clicks -milliseconds]-$start]
|
||||||
@ -458,7 +458,7 @@ start_server {tags {"scripting"}} {
|
|||||||
$rd debug loadaof
|
$rd debug loadaof
|
||||||
$rd flush
|
$rd flush
|
||||||
after 200
|
after 200
|
||||||
catch {r ping} err
|
catch {r echo "foo"} err
|
||||||
assert_match {LOADING*} $err
|
assert_match {LOADING*} $err
|
||||||
$rd read
|
$rd read
|
||||||
set elapsed [expr [clock clicks -milliseconds]-$start]
|
set elapsed [expr [clock clicks -milliseconds]-$start]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user