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
cef054e8
Commit
cef054e8
authored
Jul 26, 2015
by
antirez
Browse files
RDMF (Redis/Disque merge friendlyness) refactoring WIP 1.
parent
b684e2da
Changes
37
Hide whitespace changes
Inline
Side-by-side
src/Makefile
View file @
cef054e8
...
...
@@ -117,7 +117,7 @@ endif
REDIS_SERVER_NAME
=
redis-server
REDIS_SENTINEL_NAME
=
redis-sentinel
REDIS_SERVER_OBJ
=
adlist.o quicklist.o ae.o anet.o dict.o
redis
.o sds.o zmalloc.o lzf_c.o lzf_d.o pqsort.o zipmap.o sha1.o ziplist.o release.o networking.o util.o object.o db.o replication.o rdb.o t_string.o t_list.o t_set.o t_zset.o t_hash.o config.o aof.o pubsub.o multi.o debug.o sort.o intset.o syncio.o cluster.o crc16.o endianconv.o slowlog.o scripting.o bio.o rio.o rand.o memtest.o crc64.o bitops.o sentinel.o notify.o setproctitle.o blocked.o hyperloglog.o latency.o sparkline.o redis-check-rdb.o geo.o
REDIS_SERVER_OBJ
=
adlist.o quicklist.o ae.o anet.o dict.o
server
.o sds.o zmalloc.o lzf_c.o lzf_d.o pqsort.o zipmap.o sha1.o ziplist.o release.o networking.o util.o object.o db.o replication.o rdb.o t_string.o t_list.o t_set.o t_zset.o t_hash.o config.o aof.o pubsub.o multi.o debug.o sort.o intset.o syncio.o cluster.o crc16.o endianconv.o slowlog.o scripting.o bio.o rio.o rand.o memtest.o crc64.o bitops.o sentinel.o notify.o setproctitle.o blocked.o hyperloglog.o latency.o sparkline.o redis-check-rdb.o geo.o
REDIS_GEOHASH_OBJ
=
../deps/geohash-int/geohash.o ../deps/geohash-int/geohash_helper.o
REDIS_CLI_NAME
=
redis-cli
REDIS_CLI_OBJ
=
anet.o adlist.o redis-cli.o zmalloc.o release.o anet.o ae.o crc64.o
...
...
src/Makefile.dep
View file @
cef054e8
...
...
@@ -5,72 +5,72 @@ ae_evport.o: ae_evport.c
ae_kqueue.o
:
ae_kqueue.c
ae_select.o
:
ae_select.c
anet.o
:
anet.c fmacros.h anet.h
aof.o
:
aof.c
redis
.h fmacros.h config.h ../deps/lua/src/lua.h
\
aof.o
:
aof.c
server
.h fmacros.h config.h ../deps/lua/src/lua.h
\
../deps/lua/src/luaconf.h ae.h sds.h dict.h adlist.h zmalloc.h anet.h
\
ziplist.h intset.h version.h util.h latency.h sparkline.h rdb.h rio.h
\
bio.h
bio.o
:
bio.c
redis
.h fmacros.h config.h ../deps/lua/src/lua.h
\
bio.o
:
bio.c
server
.h fmacros.h config.h ../deps/lua/src/lua.h
\
../deps/lua/src/luaconf.h ae.h sds.h dict.h adlist.h zmalloc.h anet.h
\
ziplist.h intset.h version.h util.h latency.h sparkline.h rdb.h rio.h
\
bio.h
bitops.o
:
bitops.c
redis
.h fmacros.h config.h ../deps/lua/src/lua.h
\
bitops.o
:
bitops.c
server
.h fmacros.h config.h ../deps/lua/src/lua.h
\
../deps/lua/src/luaconf.h ae.h sds.h dict.h adlist.h zmalloc.h anet.h
\
ziplist.h intset.h version.h util.h latency.h sparkline.h rdb.h rio.h
blocked.o
:
blocked.c
redis
.h fmacros.h config.h ../deps/lua/src/lua.h
\
blocked.o
:
blocked.c
server
.h fmacros.h config.h ../deps/lua/src/lua.h
\
../deps/lua/src/luaconf.h ae.h sds.h dict.h adlist.h zmalloc.h anet.h
\
ziplist.h intset.h version.h util.h latency.h sparkline.h rdb.h rio.h
cluster.o
:
cluster.c
redis
.h fmacros.h config.h ../deps/lua/src/lua.h
\
cluster.o
:
cluster.c
server
.h fmacros.h config.h ../deps/lua/src/lua.h
\
../deps/lua/src/luaconf.h ae.h sds.h dict.h adlist.h zmalloc.h anet.h
\
ziplist.h intset.h version.h util.h latency.h sparkline.h rdb.h rio.h
\
cluster.h endianconv.h
config.o
:
config.c
redis
.h fmacros.h config.h ../deps/lua/src/lua.h
\
config.o
:
config.c
server
.h fmacros.h config.h ../deps/lua/src/lua.h
\
../deps/lua/src/luaconf.h ae.h sds.h dict.h adlist.h zmalloc.h anet.h
\
ziplist.h intset.h version.h util.h latency.h sparkline.h rdb.h rio.h
\
cluster.h
crc16.o
:
crc16.c
redis
.h fmacros.h config.h ../deps/lua/src/lua.h
\
crc16.o
:
crc16.c
server
.h fmacros.h config.h ../deps/lua/src/lua.h
\
../deps/lua/src/luaconf.h ae.h sds.h dict.h adlist.h zmalloc.h anet.h
\
ziplist.h intset.h version.h util.h latency.h sparkline.h rdb.h rio.h
crc64.o
:
crc64.c
db.o
:
db.c
redis
.h fmacros.h config.h ../deps/lua/src/lua.h
\
db.o
:
db.c
server
.h fmacros.h config.h ../deps/lua/src/lua.h
\
../deps/lua/src/luaconf.h ae.h sds.h dict.h adlist.h zmalloc.h anet.h
\
ziplist.h intset.h version.h util.h latency.h sparkline.h rdb.h rio.h
\
cluster.h
debug.o
:
debug.c
redis
.h fmacros.h config.h ../deps/lua/src/lua.h
\
debug.o
:
debug.c
server
.h fmacros.h config.h ../deps/lua/src/lua.h
\
../deps/lua/src/luaconf.h ae.h sds.h dict.h adlist.h zmalloc.h anet.h
\
ziplist.h intset.h version.h util.h latency.h sparkline.h rdb.h rio.h
\
sha1.h crc64.h bio.h
dict.o
:
dict.c fmacros.h dict.h zmalloc.h redisassert.h
endianconv.o
:
endianconv.c
hyperloglog.o
:
hyperloglog.c
redis
.h fmacros.h config.h
\
hyperloglog.o
:
hyperloglog.c
server
.h fmacros.h config.h
\
../deps/lua/src/lua.h ../deps/lua/src/luaconf.h ae.h sds.h dict.h
\
adlist.h zmalloc.h anet.h ziplist.h intset.h version.h util.h latency.h
\
sparkline.h rdb.h rio.h
intset.o
:
intset.c intset.h zmalloc.h endianconv.h config.h
latency.o
:
latency.c
redis
.h fmacros.h config.h ../deps/lua/src/lua.h
\
latency.o
:
latency.c
server
.h fmacros.h config.h ../deps/lua/src/lua.h
\
../deps/lua/src/luaconf.h ae.h sds.h dict.h adlist.h zmalloc.h anet.h
\
ziplist.h intset.h version.h util.h latency.h sparkline.h rdb.h rio.h
lzf_c.o
:
lzf_c.c lzfP.h
lzf_d.o
:
lzf_d.c lzfP.h
memtest.o
:
memtest.c config.h
multi.o
:
multi.c
redis
.h fmacros.h config.h ../deps/lua/src/lua.h
\
multi.o
:
multi.c
server
.h fmacros.h config.h ../deps/lua/src/lua.h
\
../deps/lua/src/luaconf.h ae.h sds.h dict.h adlist.h zmalloc.h anet.h
\
ziplist.h intset.h version.h util.h latency.h sparkline.h rdb.h rio.h
networking.o
:
networking.c
redis
.h fmacros.h config.h
\
networking.o
:
networking.c
server
.h fmacros.h config.h
\
../deps/lua/src/lua.h ../deps/lua/src/luaconf.h ae.h sds.h dict.h
\
adlist.h zmalloc.h anet.h ziplist.h intset.h version.h util.h latency.h
\
sparkline.h rdb.h rio.h
notify.o
:
notify.c
redis
.h fmacros.h config.h ../deps/lua/src/lua.h
\
notify.o
:
notify.c
server
.h fmacros.h config.h ../deps/lua/src/lua.h
\
../deps/lua/src/luaconf.h ae.h sds.h dict.h adlist.h zmalloc.h anet.h
\
ziplist.h intset.h version.h util.h latency.h sparkline.h rdb.h rio.h
object.o
:
object.c
redis
.h fmacros.h config.h ../deps/lua/src/lua.h
\
object.o
:
object.c
server
.h fmacros.h config.h ../deps/lua/src/lua.h
\
../deps/lua/src/luaconf.h ae.h sds.h dict.h adlist.h zmalloc.h anet.h
\
ziplist.h intset.h version.h util.h latency.h sparkline.h rdb.h rio.h
pqsort.o
:
pqsort.c
pubsub.o
:
pubsub.c
redis
.h fmacros.h config.h ../deps/lua/src/lua.h
\
pubsub.o
:
pubsub.c
server
.h fmacros.h config.h ../deps/lua/src/lua.h
\
../deps/lua/src/luaconf.h ae.h sds.h dict.h adlist.h zmalloc.h anet.h
\
ziplist.h intset.h version.h util.h latency.h sparkline.h rdb.h rio.h
rand.o
:
rand.c
rdb.o
:
rdb.c
redis
.h fmacros.h config.h ../deps/lua/src/lua.h
\
rdb.o
:
rdb.c
server
.h fmacros.h config.h ../deps/lua/src/lua.h
\
../deps/lua/src/luaconf.h ae.h sds.h dict.h adlist.h zmalloc.h anet.h
\
ziplist.h intset.h version.h util.h latency.h sparkline.h rdb.h rio.h
\
lzf.h zipmap.h endianconv.h
...
...
@@ -80,59 +80,59 @@ redis-check-aof.o: redis-check-aof.c fmacros.h config.h
redis-check-dump.o
:
redis-check-dump.c lzf.h crc64.h
redis-cli.o
:
redis-cli.c fmacros.h version.h ../deps/hiredis/hiredis.h
\
sds.h zmalloc.h ../deps/linenoise/linenoise.h help.h anet.h ae.h
redis.o
:
redis.c
redis
.h fmacros.h config.h ../deps/lua/src/lua.h
\
redis.o
:
redis.c
server
.h fmacros.h config.h ../deps/lua/src/lua.h
\
../deps/lua/src/luaconf.h ae.h sds.h dict.h adlist.h zmalloc.h anet.h
\
ziplist.h intset.h version.h util.h latency.h sparkline.h rdb.h rio.h
\
cluster.h slowlog.h bio.h asciilogo.h
release.o
:
release.c release.h version.h crc64.h
replication.o
:
replication.c
redis
.h fmacros.h config.h
\
replication.o
:
replication.c
server
.h fmacros.h config.h
\
../deps/lua/src/lua.h ../deps/lua/src/luaconf.h ae.h sds.h dict.h
\
adlist.h zmalloc.h anet.h ziplist.h intset.h version.h util.h latency.h
\
sparkline.h rdb.h rio.h
rio.o
:
rio.c fmacros.h rio.h sds.h util.h crc64.h config.h
redis
.h
\
rio.o
:
rio.c fmacros.h rio.h sds.h util.h crc64.h config.h
server
.h
\
../deps/lua/src/lua.h ../deps/lua/src/luaconf.h ae.h dict.h adlist.h
\
zmalloc.h anet.h ziplist.h intset.h version.h latency.h sparkline.h
\
rdb.h
scripting.o
:
scripting.c
redis
.h fmacros.h config.h ../deps/lua/src/lua.h
\
scripting.o
:
scripting.c
server
.h fmacros.h config.h ../deps/lua/src/lua.h
\
../deps/lua/src/luaconf.h ae.h sds.h dict.h adlist.h zmalloc.h anet.h
\
ziplist.h intset.h version.h util.h latency.h sparkline.h rdb.h rio.h
\
sha1.h rand.h ../deps/lua/src/lauxlib.h ../deps/lua/src/lua.h
\
../deps/lua/src/lualib.h
sds.o
:
sds.c sds.h zmalloc.h
sentinel.o
:
sentinel.c
redis
.h fmacros.h config.h ../deps/lua/src/lua.h
\
sentinel.o
:
sentinel.c
server
.h fmacros.h config.h ../deps/lua/src/lua.h
\
../deps/lua/src/luaconf.h ae.h sds.h dict.h adlist.h zmalloc.h anet.h
\
ziplist.h intset.h version.h util.h latency.h sparkline.h rdb.h rio.h
\
../deps/hiredis/hiredis.h ../deps/hiredis/async.h
\
../deps/hiredis/hiredis.h
setproctitle.o
:
setproctitle.c
sha1.o
:
sha1.c sha1.h config.h
slowlog.o
:
slowlog.c
redis
.h fmacros.h config.h ../deps/lua/src/lua.h
\
slowlog.o
:
slowlog.c
server
.h fmacros.h config.h ../deps/lua/src/lua.h
\
../deps/lua/src/luaconf.h ae.h sds.h dict.h adlist.h zmalloc.h anet.h
\
ziplist.h intset.h version.h util.h latency.h sparkline.h rdb.h rio.h
\
slowlog.h
sort.o
:
sort.c
redis
.h fmacros.h config.h ../deps/lua/src/lua.h
\
sort.o
:
sort.c
server
.h fmacros.h config.h ../deps/lua/src/lua.h
\
../deps/lua/src/luaconf.h ae.h sds.h dict.h adlist.h zmalloc.h anet.h
\
ziplist.h intset.h version.h util.h latency.h sparkline.h rdb.h rio.h
\
pqsort.h
sparkline.o
:
sparkline.c
redis
.h fmacros.h config.h ../deps/lua/src/lua.h
\
sparkline.o
:
sparkline.c
server
.h fmacros.h config.h ../deps/lua/src/lua.h
\
../deps/lua/src/luaconf.h ae.h sds.h dict.h adlist.h zmalloc.h anet.h
\
ziplist.h intset.h version.h util.h latency.h sparkline.h rdb.h rio.h
syncio.o
:
syncio.c
redis
.h fmacros.h config.h ../deps/lua/src/lua.h
\
syncio.o
:
syncio.c
server
.h fmacros.h config.h ../deps/lua/src/lua.h
\
../deps/lua/src/luaconf.h ae.h sds.h dict.h adlist.h zmalloc.h anet.h
\
ziplist.h intset.h version.h util.h latency.h sparkline.h rdb.h rio.h
t_hash.o
:
t_hash.c
redis
.h fmacros.h config.h ../deps/lua/src/lua.h
\
t_hash.o
:
t_hash.c
server
.h fmacros.h config.h ../deps/lua/src/lua.h
\
../deps/lua/src/luaconf.h ae.h sds.h dict.h adlist.h zmalloc.h anet.h
\
ziplist.h intset.h version.h util.h latency.h sparkline.h rdb.h rio.h
t_list.o
:
t_list.c
redis
.h fmacros.h config.h ../deps/lua/src/lua.h
\
t_list.o
:
t_list.c
server
.h fmacros.h config.h ../deps/lua/src/lua.h
\
../deps/lua/src/luaconf.h ae.h sds.h dict.h adlist.h zmalloc.h anet.h
\
ziplist.h intset.h version.h util.h latency.h sparkline.h rdb.h rio.h
t_set.o
:
t_set.c
redis
.h fmacros.h config.h ../deps/lua/src/lua.h
\
t_set.o
:
t_set.c
server
.h fmacros.h config.h ../deps/lua/src/lua.h
\
../deps/lua/src/luaconf.h ae.h sds.h dict.h adlist.h zmalloc.h anet.h
\
ziplist.h intset.h version.h util.h latency.h sparkline.h rdb.h rio.h
t_string.o
:
t_string.c
redis
.h fmacros.h config.h ../deps/lua/src/lua.h
\
t_string.o
:
t_string.c
server
.h fmacros.h config.h ../deps/lua/src/lua.h
\
../deps/lua/src/luaconf.h ae.h sds.h dict.h adlist.h zmalloc.h anet.h
\
ziplist.h intset.h version.h util.h latency.h sparkline.h rdb.h rio.h
t_zset.o
:
t_zset.c
redis
.h fmacros.h config.h ../deps/lua/src/lua.h
\
t_zset.o
:
t_zset.c
server
.h fmacros.h config.h ../deps/lua/src/lua.h
\
../deps/lua/src/luaconf.h ae.h sds.h dict.h adlist.h zmalloc.h anet.h
\
ziplist.h intset.h version.h util.h latency.h sparkline.h rdb.h rio.h
util.o
:
util.c fmacros.h util.h sds.h
...
...
src/aof.c
View file @
cef054e8
...
...
@@ -27,7 +27,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include "
redis
.h"
#include "
server
.h"
#include "bio.h"
#include "rio.h"
...
...
src/bio.c
View file @
cef054e8
...
...
@@ -58,7 +58,7 @@
*/
#include "
redis
.h"
#include "
server
.h"
#include "bio.h"
static
pthread_t
bio_threads
[
REDIS_BIO_NUM_OPS
];
...
...
src/bitops.c
View file @
cef054e8
...
...
@@ -28,7 +28,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include "
redis
.h"
#include "
server
.h"
/* -----------------------------------------------------------------------------
* Helpers and low level bit functions.
...
...
src/blocked.c
View file @
cef054e8
...
...
@@ -63,7 +63,7 @@
* clusterRedirectBlockedClientIfNeeded() function should also be updated.
*/
#include "
redis
.h"
#include "
server
.h"
/* Get a timeout value from an object and store it into 'timeout'.
* The final timeout is always stored as milliseconds as a time where the
...
...
src/cluster.c
View file @
cef054e8
...
...
@@ -28,7 +28,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include "
redis
.h"
#include "
server
.h"
#include "cluster.h"
#include "endianconv.h"
...
...
src/config.c
View file @
cef054e8
...
...
@@ -28,7 +28,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include "
redis
.h"
#include "
server
.h"
#include "cluster.h"
#include <fcntl.h>
...
...
@@ -1750,60 +1750,60 @@ int rewriteConfig(char *path) {
* the rewrite state. */
rewriteConfigYesNoOption
(
state
,
"daemonize"
,
server
.
daemonize
,
0
);
rewriteConfigStringOption
(
state
,
"pidfile"
,
server
.
pidfile
,
REDIS
_DEFAULT_PID_FILE
);
rewriteConfigStringOption
(
state
,
"pidfile"
,
server
.
pidfile
,
CONFIG
_DEFAULT_PID_FILE
);
rewriteConfigNumericalOption
(
state
,
"port"
,
server
.
port
,
REDIS_SERVERPORT
);
rewriteConfigNumericalOption
(
state
,
"tcp-backlog"
,
server
.
tcp_backlog
,
REDIS_TCP_BACKLOG
);
rewriteConfigBindOption
(
state
);
rewriteConfigStringOption
(
state
,
"unixsocket"
,
server
.
unixsocket
,
NULL
);
rewriteConfigOctalOption
(
state
,
"unixsocketperm"
,
server
.
unixsocketperm
,
REDIS
_DEFAULT_UNIX_SOCKET_PERM
);
rewriteConfigOctalOption
(
state
,
"unixsocketperm"
,
server
.
unixsocketperm
,
CONFIG
_DEFAULT_UNIX_SOCKET_PERM
);
rewriteConfigNumericalOption
(
state
,
"timeout"
,
server
.
maxidletime
,
REDIS_MAXIDLETIME
);
rewriteConfigNumericalOption
(
state
,
"tcp-keepalive"
,
server
.
tcpkeepalive
,
REDIS
_DEFAULT_TCP_KEEPALIVE
);
rewriteConfigEnumOption
(
state
,
"loglevel"
,
server
.
verbosity
,
loglevel_enum
,
REDIS
_DEFAULT_VERBOSITY
);
rewriteConfigStringOption
(
state
,
"logfile"
,
server
.
logfile
,
REDIS
_DEFAULT_LOGFILE
);
rewriteConfigYesNoOption
(
state
,
"syslog-enabled"
,
server
.
syslog_enabled
,
REDIS
_DEFAULT_SYSLOG_ENABLED
);
rewriteConfigStringOption
(
state
,
"syslog-ident"
,
server
.
syslog_ident
,
REDIS
_DEFAULT_SYSLOG_IDENT
);
rewriteConfigNumericalOption
(
state
,
"tcp-keepalive"
,
server
.
tcpkeepalive
,
CONFIG
_DEFAULT_TCP_KEEPALIVE
);
rewriteConfigEnumOption
(
state
,
"loglevel"
,
server
.
verbosity
,
loglevel_enum
,
CONFIG
_DEFAULT_VERBOSITY
);
rewriteConfigStringOption
(
state
,
"logfile"
,
server
.
logfile
,
CONFIG
_DEFAULT_LOGFILE
);
rewriteConfigYesNoOption
(
state
,
"syslog-enabled"
,
server
.
syslog_enabled
,
CONFIG
_DEFAULT_SYSLOG_ENABLED
);
rewriteConfigStringOption
(
state
,
"syslog-ident"
,
server
.
syslog_ident
,
CONFIG
_DEFAULT_SYSLOG_IDENT
);
rewriteConfigSyslogfacilityOption
(
state
);
rewriteConfigSaveOption
(
state
);
rewriteConfigNumericalOption
(
state
,
"databases"
,
server
.
dbnum
,
REDIS
_DEFAULT_DBNUM
);
rewriteConfigYesNoOption
(
state
,
"stop-writes-on-bgsave-error"
,
server
.
stop_writes_on_bgsave_err
,
REDIS
_DEFAULT_STOP_WRITES_ON_BGSAVE_ERROR
);
rewriteConfigYesNoOption
(
state
,
"rdbcompression"
,
server
.
rdb_compression
,
REDIS
_DEFAULT_RDB_COMPRESSION
);
rewriteConfigYesNoOption
(
state
,
"rdbchecksum"
,
server
.
rdb_checksum
,
REDIS
_DEFAULT_RDB_CHECKSUM
);
rewriteConfigStringOption
(
state
,
"dbfilename"
,
server
.
rdb_filename
,
REDIS
_DEFAULT_RDB_FILENAME
);
rewriteConfigNumericalOption
(
state
,
"databases"
,
server
.
dbnum
,
CONFIG
_DEFAULT_DBNUM
);
rewriteConfigYesNoOption
(
state
,
"stop-writes-on-bgsave-error"
,
server
.
stop_writes_on_bgsave_err
,
CONFIG
_DEFAULT_STOP_WRITES_ON_BGSAVE_ERROR
);
rewriteConfigYesNoOption
(
state
,
"rdbcompression"
,
server
.
rdb_compression
,
CONFIG
_DEFAULT_RDB_COMPRESSION
);
rewriteConfigYesNoOption
(
state
,
"rdbchecksum"
,
server
.
rdb_checksum
,
CONFIG
_DEFAULT_RDB_CHECKSUM
);
rewriteConfigStringOption
(
state
,
"dbfilename"
,
server
.
rdb_filename
,
CONFIG
_DEFAULT_RDB_FILENAME
);
rewriteConfigDirOption
(
state
);
rewriteConfigSlaveofOption
(
state
);
rewriteConfigStringOption
(
state
,
"masterauth"
,
server
.
masterauth
,
NULL
);
rewriteConfigYesNoOption
(
state
,
"slave-serve-stale-data"
,
server
.
repl_serve_stale_data
,
REDIS
_DEFAULT_SLAVE_SERVE_STALE_DATA
);
rewriteConfigYesNoOption
(
state
,
"slave-read-only"
,
server
.
repl_slave_ro
,
REDIS
_DEFAULT_SLAVE_READ_ONLY
);
rewriteConfigYesNoOption
(
state
,
"slave-serve-stale-data"
,
server
.
repl_serve_stale_data
,
CONFIG
_DEFAULT_SLAVE_SERVE_STALE_DATA
);
rewriteConfigYesNoOption
(
state
,
"slave-read-only"
,
server
.
repl_slave_ro
,
CONFIG
_DEFAULT_SLAVE_READ_ONLY
);
rewriteConfigNumericalOption
(
state
,
"repl-ping-slave-period"
,
server
.
repl_ping_slave_period
,
REDIS_REPL_PING_SLAVE_PERIOD
);
rewriteConfigNumericalOption
(
state
,
"repl-timeout"
,
server
.
repl_timeout
,
REDIS_REPL_TIMEOUT
);
rewriteConfigBytesOption
(
state
,
"repl-backlog-size"
,
server
.
repl_backlog_size
,
REDIS
_DEFAULT_REPL_BACKLOG_SIZE
);
rewriteConfigBytesOption
(
state
,
"repl-backlog-ttl"
,
server
.
repl_backlog_time_limit
,
REDIS
_DEFAULT_REPL_BACKLOG_TIME_LIMIT
);
rewriteConfigYesNoOption
(
state
,
"repl-disable-tcp-nodelay"
,
server
.
repl_disable_tcp_nodelay
,
REDIS
_DEFAULT_REPL_DISABLE_TCP_NODELAY
);
rewriteConfigYesNoOption
(
state
,
"repl-diskless-sync"
,
server
.
repl_diskless_sync
,
REDIS
_DEFAULT_REPL_DISKLESS_SYNC
);
rewriteConfigNumericalOption
(
state
,
"repl-diskless-sync-delay"
,
server
.
repl_diskless_sync_delay
,
REDIS
_DEFAULT_REPL_DISKLESS_SYNC_DELAY
);
rewriteConfigNumericalOption
(
state
,
"slave-priority"
,
server
.
slave_priority
,
REDIS
_DEFAULT_SLAVE_PRIORITY
);
rewriteConfigNumericalOption
(
state
,
"min-slaves-to-write"
,
server
.
repl_min_slaves_to_write
,
REDIS
_DEFAULT_MIN_SLAVES_TO_WRITE
);
rewriteConfigNumericalOption
(
state
,
"min-slaves-max-lag"
,
server
.
repl_min_slaves_max_lag
,
REDIS
_DEFAULT_MIN_SLAVES_MAX_LAG
);
rewriteConfigBytesOption
(
state
,
"repl-backlog-size"
,
server
.
repl_backlog_size
,
CONFIG
_DEFAULT_REPL_BACKLOG_SIZE
);
rewriteConfigBytesOption
(
state
,
"repl-backlog-ttl"
,
server
.
repl_backlog_time_limit
,
CONFIG
_DEFAULT_REPL_BACKLOG_TIME_LIMIT
);
rewriteConfigYesNoOption
(
state
,
"repl-disable-tcp-nodelay"
,
server
.
repl_disable_tcp_nodelay
,
CONFIG
_DEFAULT_REPL_DISABLE_TCP_NODELAY
);
rewriteConfigYesNoOption
(
state
,
"repl-diskless-sync"
,
server
.
repl_diskless_sync
,
CONFIG
_DEFAULT_REPL_DISKLESS_SYNC
);
rewriteConfigNumericalOption
(
state
,
"repl-diskless-sync-delay"
,
server
.
repl_diskless_sync_delay
,
CONFIG
_DEFAULT_REPL_DISKLESS_SYNC_DELAY
);
rewriteConfigNumericalOption
(
state
,
"slave-priority"
,
server
.
slave_priority
,
CONFIG
_DEFAULT_SLAVE_PRIORITY
);
rewriteConfigNumericalOption
(
state
,
"min-slaves-to-write"
,
server
.
repl_min_slaves_to_write
,
CONFIG
_DEFAULT_MIN_SLAVES_TO_WRITE
);
rewriteConfigNumericalOption
(
state
,
"min-slaves-max-lag"
,
server
.
repl_min_slaves_max_lag
,
CONFIG
_DEFAULT_MIN_SLAVES_MAX_LAG
);
rewriteConfigStringOption
(
state
,
"requirepass"
,
server
.
requirepass
,
NULL
);
rewriteConfigNumericalOption
(
state
,
"maxclients"
,
server
.
maxclients
,
REDIS
_MAX_CLIENTS
);
rewriteConfigBytesOption
(
state
,
"maxmemory"
,
server
.
maxmemory
,
REDIS
_DEFAULT_MAXMEMORY
);
rewriteConfigEnumOption
(
state
,
"maxmemory-policy"
,
server
.
maxmemory_policy
,
maxmemory_policy_enum
,
REDIS
_DEFAULT_MAXMEMORY_POLICY
);
rewriteConfigNumericalOption
(
state
,
"maxmemory-samples"
,
server
.
maxmemory_samples
,
REDIS
_DEFAULT_MAXMEMORY_SAMPLES
);
rewriteConfigNumericalOption
(
state
,
"maxclients"
,
server
.
maxclients
,
CONFIG_DEFAULT
_MAX_CLIENTS
);
rewriteConfigBytesOption
(
state
,
"maxmemory"
,
server
.
maxmemory
,
CONFIG
_DEFAULT_MAXMEMORY
);
rewriteConfigEnumOption
(
state
,
"maxmemory-policy"
,
server
.
maxmemory_policy
,
maxmemory_policy_enum
,
CONFIG
_DEFAULT_MAXMEMORY_POLICY
);
rewriteConfigNumericalOption
(
state
,
"maxmemory-samples"
,
server
.
maxmemory_samples
,
CONFIG
_DEFAULT_MAXMEMORY_SAMPLES
);
rewriteConfigYesNoOption
(
state
,
"appendonly"
,
server
.
aof_state
!=
REDIS_AOF_OFF
,
0
);
rewriteConfigStringOption
(
state
,
"appendfilename"
,
server
.
aof_filename
,
REDIS
_DEFAULT_AOF_FILENAME
);
rewriteConfigEnumOption
(
state
,
"appendfsync"
,
server
.
aof_fsync
,
aof_fsync_enum
,
REDIS
_DEFAULT_AOF_FSYNC
);
rewriteConfigYesNoOption
(
state
,
"no-appendfsync-on-rewrite"
,
server
.
aof_no_fsync_on_rewrite
,
REDIS
_DEFAULT_AOF_NO_FSYNC_ON_REWRITE
);
rewriteConfigStringOption
(
state
,
"appendfilename"
,
server
.
aof_filename
,
CONFIG
_DEFAULT_AOF_FILENAME
);
rewriteConfigEnumOption
(
state
,
"appendfsync"
,
server
.
aof_fsync
,
aof_fsync_enum
,
CONFIG
_DEFAULT_AOF_FSYNC
);
rewriteConfigYesNoOption
(
state
,
"no-appendfsync-on-rewrite"
,
server
.
aof_no_fsync_on_rewrite
,
CONFIG
_DEFAULT_AOF_NO_FSYNC_ON_REWRITE
);
rewriteConfigNumericalOption
(
state
,
"auto-aof-rewrite-percentage"
,
server
.
aof_rewrite_perc
,
REDIS_AOF_REWRITE_PERC
);
rewriteConfigBytesOption
(
state
,
"auto-aof-rewrite-min-size"
,
server
.
aof_rewrite_min_size
,
REDIS_AOF_REWRITE_MIN_SIZE
);
rewriteConfigNumericalOption
(
state
,
"lua-time-limit"
,
server
.
lua_time_limit
,
REDIS_LUA_TIME_LIMIT
);
rewriteConfigYesNoOption
(
state
,
"cluster-enabled"
,
server
.
cluster_enabled
,
0
);
rewriteConfigStringOption
(
state
,
"cluster-config-file"
,
server
.
cluster_configfile
,
REDIS
_DEFAULT_CLUSTER_CONFIG_FILE
);
rewriteConfigStringOption
(
state
,
"cluster-config-file"
,
server
.
cluster_configfile
,
CONFIG
_DEFAULT_CLUSTER_CONFIG_FILE
);
rewriteConfigYesNoOption
(
state
,
"cluster-require-full-coverage"
,
server
.
cluster_require_full_coverage
,
REDIS_CLUSTER_DEFAULT_REQUIRE_FULL_COVERAGE
);
rewriteConfigNumericalOption
(
state
,
"cluster-node-timeout"
,
server
.
cluster_node_timeout
,
REDIS_CLUSTER_DEFAULT_NODE_TIMEOUT
);
rewriteConfigNumericalOption
(
state
,
"cluster-migration-barrier"
,
server
.
cluster_migration_barrier
,
REDIS_CLUSTER_DEFAULT_MIGRATION_BARRIER
);
rewriteConfigNumericalOption
(
state
,
"cluster-slave-validity-factor"
,
server
.
cluster_slave_validity_factor
,
REDIS_CLUSTER_DEFAULT_SLAVE_VALIDITY
);
rewriteConfigNumericalOption
(
state
,
"slowlog-log-slower-than"
,
server
.
slowlog_log_slower_than
,
REDIS_SLOWLOG_LOG_SLOWER_THAN
);
rewriteConfigNumericalOption
(
state
,
"latency-monitor-threshold"
,
server
.
latency_monitor_threshold
,
REDIS
_DEFAULT_LATENCY_MONITOR_THRESHOLD
);
rewriteConfigNumericalOption
(
state
,
"latency-monitor-threshold"
,
server
.
latency_monitor_threshold
,
CONFIG
_DEFAULT_LATENCY_MONITOR_THRESHOLD
);
rewriteConfigNumericalOption
(
state
,
"slowlog-max-len"
,
server
.
slowlog_max_len
,
REDIS_SLOWLOG_MAX_LEN
);
rewriteConfigNotifykeyspaceeventsOption
(
state
);
rewriteConfigNumericalOption
(
state
,
"hash-max-ziplist-entries"
,
server
.
hash_max_ziplist_entries
,
REDIS_HASH_MAX_ZIPLIST_ENTRIES
);
...
...
@@ -1813,12 +1813,12 @@ int rewriteConfig(char *path) {
rewriteConfigNumericalOption
(
state
,
"set-max-intset-entries"
,
server
.
set_max_intset_entries
,
REDIS_SET_MAX_INTSET_ENTRIES
);
rewriteConfigNumericalOption
(
state
,
"zset-max-ziplist-entries"
,
server
.
zset_max_ziplist_entries
,
REDIS_ZSET_MAX_ZIPLIST_ENTRIES
);
rewriteConfigNumericalOption
(
state
,
"zset-max-ziplist-value"
,
server
.
zset_max_ziplist_value
,
REDIS_ZSET_MAX_ZIPLIST_VALUE
);
rewriteConfigNumericalOption
(
state
,
"hll-sparse-max-bytes"
,
server
.
hll_sparse_max_bytes
,
REDIS
_DEFAULT_HLL_SPARSE_MAX_BYTES
);
rewriteConfigYesNoOption
(
state
,
"activerehashing"
,
server
.
activerehashing
,
REDIS
_DEFAULT_ACTIVE_REHASHING
);
rewriteConfigNumericalOption
(
state
,
"hll-sparse-max-bytes"
,
server
.
hll_sparse_max_bytes
,
CONFIG
_DEFAULT_HLL_SPARSE_MAX_BYTES
);
rewriteConfigYesNoOption
(
state
,
"activerehashing"
,
server
.
activerehashing
,
CONFIG
_DEFAULT_ACTIVE_REHASHING
);
rewriteConfigClientoutputbufferlimitOption
(
state
);
rewriteConfigNumericalOption
(
state
,
"hz"
,
server
.
hz
,
REDIS
_DEFAULT_HZ
);
rewriteConfigYesNoOption
(
state
,
"aof-rewrite-incremental-fsync"
,
server
.
aof_rewrite_incremental_fsync
,
REDIS
_DEFAULT_AOF_REWRITE_INCREMENTAL_FSYNC
);
rewriteConfigYesNoOption
(
state
,
"aof-load-truncated"
,
server
.
aof_load_truncated
,
REDIS
_DEFAULT_AOF_LOAD_TRUNCATED
);
rewriteConfigNumericalOption
(
state
,
"hz"
,
server
.
hz
,
CONFIG
_DEFAULT_HZ
);
rewriteConfigYesNoOption
(
state
,
"aof-rewrite-incremental-fsync"
,
server
.
aof_rewrite_incremental_fsync
,
CONFIG
_DEFAULT_AOF_REWRITE_INCREMENTAL_FSYNC
);
rewriteConfigYesNoOption
(
state
,
"aof-load-truncated"
,
server
.
aof_load_truncated
,
CONFIG
_DEFAULT_AOF_LOAD_TRUNCATED
);
rewriteConfigEnumOption
(
state
,
"supervised"
,
server
.
supervised_mode
,
supervised_mode_enum
,
REDIS_SUPERVISED_NONE
);
/* Rewrite Sentinel config if in Sentinel mode. */
...
...
src/crc16.c
View file @
cef054e8
#include "
redis
.h"
#include "
server
.h"
/*
* Copyright 2001-2010 Georges Menie (www.menie.org)
...
...
src/db.c
View file @
cef054e8
...
...
@@ -27,7 +27,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include "
redis
.h"
#include "
server
.h"
#include "cluster.h"
#include <signal.h>
...
...
src/debug.c
View file @
cef054e8
...
...
@@ -27,7 +27,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include "
redis
.h"
#include "
server
.h"
#include "sha1.h"
/* SHA1 is used for DEBUG DIGEST */
#include "crc64.h"
...
...
src/geo.h
View file @
cef054e8
#ifndef __GEO_H__
#define __GEO_H__
#include "
redis
.h"
#include "
server
.h"
/* Structures used inside geo.c in order to represent points and array of
* points on the earth. */
...
...
src/hyperloglog.c
View file @
cef054e8
...
...
@@ -29,7 +29,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include "
redis
.h"
#include "
server
.h"
#include <stdint.h>
#include <math.h>
...
...
src/latency.c
View file @
cef054e8
...
...
@@ -33,7 +33,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include "
redis
.h"
#include "
server
.h"
/* Dictionary type for latency events. */
int
dictStringKeyCompare
(
void
*
privdata
,
const
void
*
key1
,
const
void
*
key2
)
{
...
...
src/multi.c
View file @
cef054e8
...
...
@@ -27,7 +27,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include "
redis
.h"
#include "
server
.h"
/* ================================ MULTI/EXEC ============================== */
...
...
src/networking.c
View file @
cef054e8
...
...
@@ -27,7 +27,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include "
redis
.h"
#include "
server
.h"
#include <sys/uio.h>
#include <math.h>
...
...
src/notify.c
View file @
cef054e8
...
...
@@ -27,7 +27,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include "
redis
.h"
#include "
server
.h"
/* This file implements keyspace events notification via Pub/Sub ad
* described at http://redis.io/topics/keyspace-events. */
...
...
src/object.c
View file @
cef054e8
...
...
@@ -28,7 +28,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include "
redis
.h"
#include "
server
.h"
#include <math.h>
#include <ctype.h>
...
...
src/pubsub.c
View file @
cef054e8
...
...
@@ -27,7 +27,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include "
redis
.h"
#include "
server
.h"
/*-----------------------------------------------------------------------------
* Pubsub low level API
...
...
src/rdb.c
View file @
cef054e8
...
...
@@ -27,7 +27,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include "
redis
.h"
#include "
server
.h"
#include "lzf.h"
/* LZF compression library */
#include "zipmap.h"
#include "endianconv.h"
...
...
Prev
1
2
Next
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