mirror of
https://github.com/fluencelabs/redis
synced 2025-06-14 01:31:21 +00:00
Slowlog: don't log EXEC but just the executed commands.
The Redis Slow Log always used to log the slow commands executed inside a MULTI/EXEC block. However also EXEC was logged at the end, which is perfectly useless. Now EXEC is no longer logged and a test was added to test this behavior. This fixes issue #759.
This commit is contained in:
@ -1511,7 +1511,7 @@ void call(redisClient *c, int flags) {
|
||||
|
||||
/* Log the command into the Slow log if needed, and populate the
|
||||
* per-command statistics that we show in INFO commandstats. */
|
||||
if (flags & REDIS_CALL_SLOWLOG)
|
||||
if (flags & REDIS_CALL_SLOWLOG && c->cmd->proc != execCommand)
|
||||
slowlogPushEntryIfNeeded(c->argv,c->argc,duration);
|
||||
if (flags & REDIS_CALL_STATS) {
|
||||
c->cmd->microseconds += duration;
|
||||
|
Reference in New Issue
Block a user