Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
44571088
Commit
44571088
authored
Jun 18, 2018
by
antirez
Browse files
Merge branch 'unstable' of github.com:/antirez/redis into unstable
parents
6967d0bd
3518bb66
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/config.c
View file @
44571088
...
...
@@ -1071,15 +1071,15 @@ void configSetCommand(client *c) {
/* Numerical fields.
* config_set_numerical_field(name,var,min,max) */
}
config_set_numerical_field
(
"tcp-keepalive"
,
server
.
tcpkeepalive
,
0
,
LLONG
_MAX
)
{
"tcp-keepalive"
,
server
.
tcpkeepalive
,
0
,
INT
_MAX
)
{
}
config_set_numerical_field
(
"maxmemory-samples"
,
server
.
maxmemory_samples
,
1
,
LLONG
_MAX
)
{
"maxmemory-samples"
,
server
.
maxmemory_samples
,
1
,
INT
_MAX
)
{
}
config_set_numerical_field
(
"lfu-log-factor"
,
server
.
lfu_log_factor
,
0
,
LLONG
_MAX
)
{
"lfu-log-factor"
,
server
.
lfu_log_factor
,
0
,
INT
_MAX
)
{
}
config_set_numerical_field
(
"lfu-decay-time"
,
server
.
lfu_decay_time
,
0
,
LLONG
_MAX
)
{
"lfu-decay-time"
,
server
.
lfu_decay_time
,
0
,
INT
_MAX
)
{
}
config_set_numerical_field
(
"timeout"
,
server
.
maxidletime
,
0
,
LONG
_MAX
)
{
"timeout"
,
server
.
maxidletime
,
0
,
INT
_MAX
)
{
}
config_set_numerical_field
(
"active-defrag-threshold-lower"
,
server
.
active_defrag_threshold_lower
,
0
,
1000
)
{
}
config_set_numerical_field
(
...
...
@@ -1091,15 +1091,15 @@ void configSetCommand(client *c) {
}
config_set_numerical_field
(
"active-defrag-cycle-max"
,
server
.
active_defrag_cycle_max
,
1
,
99
)
{
}
config_set_numerical_field
(
"active-defrag-max-scan-fields"
,
server
.
active_defrag_max_scan_fields
,
1
,
L
LONG_MAX
)
{
"active-defrag-max-scan-fields"
,
server
.
active_defrag_max_scan_fields
,
1
,
LONG_MAX
)
{
}
config_set_numerical_field
(
"auto-aof-rewrite-percentage"
,
server
.
aof_rewrite_perc
,
0
,
LLONG
_MAX
){
"auto-aof-rewrite-percentage"
,
server
.
aof_rewrite_perc
,
0
,
INT
_MAX
){
}
config_set_numerical_field
(
"hash-max-ziplist-entries"
,
server
.
hash_max_ziplist_entries
,
0
,
L
LONG_MAX
)
{
"hash-max-ziplist-entries"
,
server
.
hash_max_ziplist_entries
,
0
,
LONG_MAX
)
{
}
config_set_numerical_field
(
"hash-max-ziplist-value"
,
server
.
hash_max_ziplist_value
,
0
,
L
LONG_MAX
)
{
"hash-max-ziplist-value"
,
server
.
hash_max_ziplist_value
,
0
,
LONG_MAX
)
{
}
config_set_numerical_field
(
"stream-node-max-bytes"
,
server
.
stream_node_max_bytes
,
0
,
L
LONG_MAX
)
{
"stream-node-max-bytes"
,
server
.
stream_node_max_bytes
,
0
,
LONG_MAX
)
{
}
config_set_numerical_field
(
"stream-node-max-entries"
,
server
.
stream_node_max_entries
,
0
,
LLONG_MAX
)
{
}
config_set_numerical_field
(
...
...
@@ -1107,40 +1107,40 @@ void configSetCommand(client *c) {
}
config_set_numerical_field
(
"list-compress-depth"
,
server
.
list_compress_depth
,
0
,
INT_MAX
)
{
}
config_set_numerical_field
(
"set-max-intset-entries"
,
server
.
set_max_intset_entries
,
0
,
L
LONG_MAX
)
{
"set-max-intset-entries"
,
server
.
set_max_intset_entries
,
0
,
LONG_MAX
)
{
}
config_set_numerical_field
(
"zset-max-ziplist-entries"
,
server
.
zset_max_ziplist_entries
,
0
,
L
LONG_MAX
)
{
"zset-max-ziplist-entries"
,
server
.
zset_max_ziplist_entries
,
0
,
LONG_MAX
)
{
}
config_set_numerical_field
(
"zset-max-ziplist-value"
,
server
.
zset_max_ziplist_value
,
0
,
L
LONG_MAX
)
{
"zset-max-ziplist-value"
,
server
.
zset_max_ziplist_value
,
0
,
LONG_MAX
)
{
}
config_set_numerical_field
(
"hll-sparse-max-bytes"
,
server
.
hll_sparse_max_bytes
,
0
,
L
LONG_MAX
)
{
"hll-sparse-max-bytes"
,
server
.
hll_sparse_max_bytes
,
0
,
LONG_MAX
)
{
}
config_set_numerical_field
(
"lua-time-limit"
,
server
.
lua_time_limit
,
0
,
L
LONG_MAX
)
{
"lua-time-limit"
,
server
.
lua_time_limit
,
0
,
LONG_MAX
)
{
}
config_set_numerical_field
(
"slowlog-log-slower-than"
,
server
.
slowlog_log_slower_than
,
0
,
LLONG_MAX
)
{
}
config_set_numerical_field
(
"slowlog-max-len"
,
ll
,
0
,
L
LONG_MAX
)
{
"slowlog-max-len"
,
ll
,
0
,
LONG_MAX
)
{
/* Cast to unsigned. */
server
.
slowlog_max_len
=
(
unsigned
long
)
ll
;
}
config_set_numerical_field
(
"latency-monitor-threshold"
,
server
.
latency_monitor_threshold
,
0
,
LLONG_MAX
){
}
config_set_numerical_field
(
"repl-ping-slave-period"
,
server
.
repl_ping_slave_period
,
1
,
LLONG
_MAX
)
{
"repl-ping-slave-period"
,
server
.
repl_ping_slave_period
,
1
,
INT
_MAX
)
{
}
config_set_numerical_field
(
"repl-timeout"
,
server
.
repl_timeout
,
1
,
LLONG
_MAX
)
{
"repl-timeout"
,
server
.
repl_timeout
,
1
,
INT
_MAX
)
{
}
config_set_numerical_field
(
"repl-backlog-ttl"
,
server
.
repl_backlog_time_limit
,
0
,
L
LONG_MAX
)
{
"repl-backlog-ttl"
,
server
.
repl_backlog_time_limit
,
0
,
LONG_MAX
)
{
}
config_set_numerical_field
(
"repl-diskless-sync-delay"
,
server
.
repl_diskless_sync_delay
,
0
,
LLONG
_MAX
)
{
"repl-diskless-sync-delay"
,
server
.
repl_diskless_sync_delay
,
0
,
INT
_MAX
)
{
}
config_set_numerical_field
(
"slave-priority"
,
server
.
slave_priority
,
0
,
LLONG
_MAX
)
{
"slave-priority"
,
server
.
slave_priority
,
0
,
INT
_MAX
)
{
}
config_set_numerical_field
(
"slave-announce-port"
,
server
.
slave_announce_port
,
0
,
65535
)
{
}
config_set_numerical_field
(
"min-slaves-to-write"
,
server
.
repl_min_slaves_to_write
,
0
,
LLONG
_MAX
)
{
"min-slaves-to-write"
,
server
.
repl_min_slaves_to_write
,
0
,
INT
_MAX
)
{
refreshGoodSlavesCount
();
}
config_set_numerical_field
(
"min-slaves-max-lag"
,
server
.
repl_min_slaves_max_lag
,
0
,
LLONG
_MAX
)
{
"min-slaves-max-lag"
,
server
.
repl_min_slaves_max_lag
,
0
,
INT
_MAX
)
{
refreshGoodSlavesCount
();
}
config_set_numerical_field
(
"cluster-node-timeout"
,
server
.
cluster_node_timeout
,
0
,
LLONG_MAX
)
{
...
...
@@ -1149,17 +1149,17 @@ void configSetCommand(client *c) {
}
config_set_numerical_field
(
"cluster-announce-bus-port"
,
server
.
cluster_announce_bus_port
,
0
,
65535
)
{
}
config_set_numerical_field
(
"cluster-migration-barrier"
,
server
.
cluster_migration_barrier
,
0
,
LLONG
_MAX
){
"cluster-migration-barrier"
,
server
.
cluster_migration_barrier
,
0
,
INT
_MAX
){
}
config_set_numerical_field
(
"cluster-slave-validity-factor"
,
server
.
cluster_slave_validity_factor
,
0
,
LLONG
_MAX
)
{
"cluster-slave-validity-factor"
,
server
.
cluster_slave_validity_factor
,
0
,
INT
_MAX
)
{
}
config_set_numerical_field
(
"hz"
,
server
.
hz
,
0
,
LLONG
_MAX
)
{
"hz"
,
server
.
hz
,
0
,
INT
_MAX
)
{
/* Hz is more an hint from the user, so we accept values out of range
* but cap them to reasonable values. */
if
(
server
.
hz
<
CONFIG_MIN_HZ
)
server
.
hz
=
CONFIG_MIN_HZ
;
if
(
server
.
hz
>
CONFIG_MAX_HZ
)
server
.
hz
=
CONFIG_MAX_HZ
;
}
config_set_numerical_field
(
"watchdog-period"
,
ll
,
0
,
LLONG
_MAX
)
{
"watchdog-period"
,
ll
,
0
,
INT
_MAX
)
{
if
(
ll
)
enableWatchdog
(
ll
);
else
...
...
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