mirror of
https://github.com/fluencelabs/redis
synced 2025-06-13 01:01:22 +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:
@ -55,4 +55,16 @@ start_server {tags {"slowlog"} overrides {slowlog-log-slower-than 1000000}} {
|
||||
set e [lindex [r slowlog get] 0]
|
||||
lindex $e 3
|
||||
} {sadd set foo {AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA... (1 more bytes)}}
|
||||
|
||||
test {SLOWLOG - EXEC is not logged, just executed commands} {
|
||||
r config set slowlog-log-slower-than 100000
|
||||
r slowlog reset
|
||||
assert_equal [r slowlog len] 0
|
||||
r multi
|
||||
r debug sleep 0.2
|
||||
r exec
|
||||
assert_equal [r slowlog len] 1
|
||||
set e [lindex [r slowlog get] 0]
|
||||
assert_equal [lindex $e 3] {debug sleep 0.2}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user