mirror of
https://github.com/fluencelabs/redis
synced 2025-06-29 08:51:33 +00:00
fix #5024 - commandstats for multi-exec were logged as EXEC.
this was broken a while back by ba9154d7e7
the purpose of which was to fix commandstats for GEOADD
This commit is contained in:
@ -2408,6 +2408,7 @@ void preventCommandReplication(client *c) {
|
||||
void call(client *c, int flags) {
|
||||
long long dirty, start, duration;
|
||||
int client_old_flags = c->flags;
|
||||
struct redisCommand *real_cmd = c->cmd;
|
||||
|
||||
/* Sent the command to clients in MONITOR mode, only if the commands are
|
||||
* not generated from reading an AOF. */
|
||||
@ -2456,8 +2457,11 @@ void call(client *c, int flags) {
|
||||
slowlogPushEntryIfNeeded(c,c->argv,c->argc,duration);
|
||||
}
|
||||
if (flags & CMD_CALL_STATS) {
|
||||
c->lastcmd->microseconds += duration;
|
||||
c->lastcmd->calls++;
|
||||
/* use the real command that was executed (cmd and lastamc) may be
|
||||
* different, in case of MULTI-EXEC or re-written commands such as
|
||||
* EXPIRE, GEOADD, etc. */
|
||||
real_cmd->microseconds += duration;
|
||||
real_cmd->calls++;
|
||||
}
|
||||
|
||||
/* Propagate the command into the AOF and replication link */
|
||||
|
Reference in New Issue
Block a user