Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
69997153
Commit
69997153
authored
Jul 13, 2018
by
antirez
Browse files
Merge branch 'unstable' of github.com:/antirez/redis into unstable
parents
a93f8f09
a44a5934
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/config.c
View file @
69997153
...
@@ -1122,7 +1122,7 @@ void configSetCommand(client *c) {
...
@@ -1122,7 +1122,7 @@ void configSetCommand(client *c) {
}
config_set_numerical_field
(
}
config_set_numerical_field
(
"lua-time-limit"
,
server
.
lua_time_limit
,
0
,
LONG_MAX
)
{
"lua-time-limit"
,
server
.
lua_time_limit
,
0
,
LONG_MAX
)
{
}
config_set_numerical_field
(
}
config_set_numerical_field
(
"slowlog-log-slower-than"
,
server
.
slowlog_log_slower_than
,
0
,
LLONG_MAX
)
{
"slowlog-log-slower-than"
,
server
.
slowlog_log_slower_than
,
-
1
,
LLONG_MAX
)
{
}
config_set_numerical_field
(
}
config_set_numerical_field
(
"slowlog-max-len"
,
ll
,
0
,
LONG_MAX
)
{
"slowlog-max-len"
,
ll
,
0
,
LONG_MAX
)
{
/* Cast to unsigned. */
/* Cast to unsigned. */
...
...
src/latency.c
View file @
69997153
...
@@ -294,7 +294,7 @@ sds createLatencyReport(void) {
...
@@ -294,7 +294,7 @@ sds createLatencyReport(void) {
/* Potentially commands. */
/* Potentially commands. */
if
(
!
strcasecmp
(
event
,
"command"
))
{
if
(
!
strcasecmp
(
event
,
"command"
))
{
if
(
server
.
slowlog_log_slower_than
==
0
)
{
if
(
server
.
slowlog_log_slower_than
<
0
)
{
advise_slowlog_enabled
=
1
;
advise_slowlog_enabled
=
1
;
advices
++
;
advices
++
;
}
else
if
(
server
.
slowlog_log_slower_than
/
1000
>
}
else
if
(
server
.
slowlog_log_slower_than
/
1000
>
...
...
tests/unit/slowlog.tcl
View file @
69997153
...
@@ -78,4 +78,14 @@ start_server {tags {"slowlog"} overrides {slowlog-log-slower-than 1000000}} {
...
@@ -78,4 +78,14 @@ start_server {tags {"slowlog"} overrides {slowlog-log-slower-than 1000000}} {
set e
[
lindex
[
r slowlog get
]
0
]
set e
[
lindex
[
r slowlog get
]
0
]
assert_equal
{
lastentry_client
}
[
lindex $e 5
]
assert_equal
{
lastentry_client
}
[
lindex $e 5
]
}
}
test
{
SLOWLOG - can be disabled
}
{
r config set slowlog-log-slower-than 1
r slowlog reset
assert_equal
[
r slowlog len
]
1
r config set slowlog-log-slower-than -1
r slowlog reset
r debug sleep 0.2
assert_equal
[
r slowlog len
]
0
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment