mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-22 16:18:28 -05:00
RDMF (Redis/Disque merge friendlyness) refactoring WIP 1.
This commit is contained in:
parent
b684e2dad1
commit
cef054e868
@ -117,7 +117,7 @@ endif
|
|||||||
|
|
||||||
REDIS_SERVER_NAME=redis-server
|
REDIS_SERVER_NAME=redis-server
|
||||||
REDIS_SENTINEL_NAME=redis-sentinel
|
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_GEOHASH_OBJ=../deps/geohash-int/geohash.o ../deps/geohash-int/geohash_helper.o
|
||||||
REDIS_CLI_NAME=redis-cli
|
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
|
REDIS_CLI_OBJ=anet.o adlist.o redis-cli.o zmalloc.o release.o anet.o ae.o crc64.o
|
||||||
|
@ -5,72 +5,72 @@ ae_evport.o: ae_evport.c
|
|||||||
ae_kqueue.o: ae_kqueue.c
|
ae_kqueue.o: ae_kqueue.c
|
||||||
ae_select.o: ae_select.c
|
ae_select.o: ae_select.c
|
||||||
anet.o: anet.c fmacros.h anet.h
|
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 \
|
../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 \
|
ziplist.h intset.h version.h util.h latency.h sparkline.h rdb.h rio.h \
|
||||||
bio.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 \
|
../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 \
|
ziplist.h intset.h version.h util.h latency.h sparkline.h rdb.h rio.h \
|
||||||
bio.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 \
|
../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
|
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 \
|
../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
|
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 \
|
../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 \
|
ziplist.h intset.h version.h util.h latency.h sparkline.h rdb.h rio.h \
|
||||||
cluster.h endianconv.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 \
|
../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 \
|
ziplist.h intset.h version.h util.h latency.h sparkline.h rdb.h rio.h \
|
||||||
cluster.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 \
|
../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
|
ziplist.h intset.h version.h util.h latency.h sparkline.h rdb.h rio.h
|
||||||
crc64.o: crc64.c
|
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 \
|
../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 \
|
ziplist.h intset.h version.h util.h latency.h sparkline.h rdb.h rio.h \
|
||||||
cluster.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 \
|
../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 \
|
ziplist.h intset.h version.h util.h latency.h sparkline.h rdb.h rio.h \
|
||||||
sha1.h crc64.h bio.h
|
sha1.h crc64.h bio.h
|
||||||
dict.o: dict.c fmacros.h dict.h zmalloc.h redisassert.h
|
dict.o: dict.c fmacros.h dict.h zmalloc.h redisassert.h
|
||||||
endianconv.o: endianconv.c
|
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 \
|
../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 \
|
adlist.h zmalloc.h anet.h ziplist.h intset.h version.h util.h latency.h \
|
||||||
sparkline.h rdb.h rio.h
|
sparkline.h rdb.h rio.h
|
||||||
intset.o: intset.c intset.h zmalloc.h endianconv.h config.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 \
|
../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
|
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_c.o: lzf_c.c lzfP.h
|
||||||
lzf_d.o: lzf_d.c lzfP.h
|
lzf_d.o: lzf_d.c lzfP.h
|
||||||
memtest.o: memtest.c config.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 \
|
../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
|
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 \
|
../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 \
|
adlist.h zmalloc.h anet.h ziplist.h intset.h version.h util.h latency.h \
|
||||||
sparkline.h rdb.h rio.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 \
|
../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
|
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 \
|
../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
|
ziplist.h intset.h version.h util.h latency.h sparkline.h rdb.h rio.h
|
||||||
pqsort.o: pqsort.c
|
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 \
|
../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
|
ziplist.h intset.h version.h util.h latency.h sparkline.h rdb.h rio.h
|
||||||
rand.o: rand.c
|
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 \
|
../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 \
|
ziplist.h intset.h version.h util.h latency.h sparkline.h rdb.h rio.h \
|
||||||
lzf.h zipmap.h endianconv.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-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 \
|
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
|
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 \
|
../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 \
|
ziplist.h intset.h version.h util.h latency.h sparkline.h rdb.h rio.h \
|
||||||
cluster.h slowlog.h bio.h asciilogo.h
|
cluster.h slowlog.h bio.h asciilogo.h
|
||||||
release.o: release.c release.h version.h crc64.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 \
|
../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 \
|
adlist.h zmalloc.h anet.h ziplist.h intset.h version.h util.h latency.h \
|
||||||
sparkline.h rdb.h rio.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 \
|
../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 \
|
zmalloc.h anet.h ziplist.h intset.h version.h latency.h sparkline.h \
|
||||||
rdb.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 \
|
../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 \
|
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 \
|
sha1.h rand.h ../deps/lua/src/lauxlib.h ../deps/lua/src/lua.h \
|
||||||
../deps/lua/src/lualib.h
|
../deps/lua/src/lualib.h
|
||||||
sds.o: sds.c sds.h zmalloc.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 \
|
../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 \
|
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 ../deps/hiredis/async.h \
|
||||||
../deps/hiredis/hiredis.h
|
../deps/hiredis/hiredis.h
|
||||||
setproctitle.o: setproctitle.c
|
setproctitle.o: setproctitle.c
|
||||||
sha1.o: sha1.c sha1.h config.h
|
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 \
|
../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 \
|
ziplist.h intset.h version.h util.h latency.h sparkline.h rdb.h rio.h \
|
||||||
slowlog.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 \
|
../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 \
|
ziplist.h intset.h version.h util.h latency.h sparkline.h rdb.h rio.h \
|
||||||
pqsort.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 \
|
../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
|
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 \
|
../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
|
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 \
|
../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
|
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 \
|
../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
|
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 \
|
../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
|
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 \
|
../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
|
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 \
|
../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
|
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
|
util.o: util.c fmacros.h util.h sds.h
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "redis.h"
|
#include "server.h"
|
||||||
#include "bio.h"
|
#include "bio.h"
|
||||||
#include "rio.h"
|
#include "rio.h"
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include "redis.h"
|
#include "server.h"
|
||||||
#include "bio.h"
|
#include "bio.h"
|
||||||
|
|
||||||
static pthread_t bio_threads[REDIS_BIO_NUM_OPS];
|
static pthread_t bio_threads[REDIS_BIO_NUM_OPS];
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "redis.h"
|
#include "server.h"
|
||||||
|
|
||||||
/* -----------------------------------------------------------------------------
|
/* -----------------------------------------------------------------------------
|
||||||
* Helpers and low level bit functions.
|
* Helpers and low level bit functions.
|
||||||
|
@ -63,7 +63,7 @@
|
|||||||
* clusterRedirectBlockedClientIfNeeded() function should also be updated.
|
* clusterRedirectBlockedClientIfNeeded() function should also be updated.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "redis.h"
|
#include "server.h"
|
||||||
|
|
||||||
/* Get a timeout value from an object and store it into 'timeout'.
|
/* 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
|
* The final timeout is always stored as milliseconds as a time where the
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "redis.h"
|
#include "server.h"
|
||||||
#include "cluster.h"
|
#include "cluster.h"
|
||||||
#include "endianconv.h"
|
#include "endianconv.h"
|
||||||
|
|
||||||
|
74
src/config.c
74
src/config.c
@ -28,7 +28,7 @@
|
|||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "redis.h"
|
#include "server.h"
|
||||||
#include "cluster.h"
|
#include "cluster.h"
|
||||||
|
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
@ -1750,60 +1750,60 @@ int rewriteConfig(char *path) {
|
|||||||
* the rewrite state. */
|
* the rewrite state. */
|
||||||
|
|
||||||
rewriteConfigYesNoOption(state,"daemonize",server.daemonize,0);
|
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,"port",server.port,REDIS_SERVERPORT);
|
||||||
rewriteConfigNumericalOption(state,"tcp-backlog",server.tcp_backlog,REDIS_TCP_BACKLOG);
|
rewriteConfigNumericalOption(state,"tcp-backlog",server.tcp_backlog,REDIS_TCP_BACKLOG);
|
||||||
rewriteConfigBindOption(state);
|
rewriteConfigBindOption(state);
|
||||||
rewriteConfigStringOption(state,"unixsocket",server.unixsocket,NULL);
|
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,"timeout",server.maxidletime,REDIS_MAXIDLETIME);
|
||||||
rewriteConfigNumericalOption(state,"tcp-keepalive",server.tcpkeepalive,REDIS_DEFAULT_TCP_KEEPALIVE);
|
rewriteConfigNumericalOption(state,"tcp-keepalive",server.tcpkeepalive,CONFIG_DEFAULT_TCP_KEEPALIVE);
|
||||||
rewriteConfigEnumOption(state,"loglevel",server.verbosity,loglevel_enum,REDIS_DEFAULT_VERBOSITY);
|
rewriteConfigEnumOption(state,"loglevel",server.verbosity,loglevel_enum,CONFIG_DEFAULT_VERBOSITY);
|
||||||
rewriteConfigStringOption(state,"logfile",server.logfile,REDIS_DEFAULT_LOGFILE);
|
rewriteConfigStringOption(state,"logfile",server.logfile,CONFIG_DEFAULT_LOGFILE);
|
||||||
rewriteConfigYesNoOption(state,"syslog-enabled",server.syslog_enabled,REDIS_DEFAULT_SYSLOG_ENABLED);
|
rewriteConfigYesNoOption(state,"syslog-enabled",server.syslog_enabled,CONFIG_DEFAULT_SYSLOG_ENABLED);
|
||||||
rewriteConfigStringOption(state,"syslog-ident",server.syslog_ident,REDIS_DEFAULT_SYSLOG_IDENT);
|
rewriteConfigStringOption(state,"syslog-ident",server.syslog_ident,CONFIG_DEFAULT_SYSLOG_IDENT);
|
||||||
rewriteConfigSyslogfacilityOption(state);
|
rewriteConfigSyslogfacilityOption(state);
|
||||||
rewriteConfigSaveOption(state);
|
rewriteConfigSaveOption(state);
|
||||||
rewriteConfigNumericalOption(state,"databases",server.dbnum,REDIS_DEFAULT_DBNUM);
|
rewriteConfigNumericalOption(state,"databases",server.dbnum,CONFIG_DEFAULT_DBNUM);
|
||||||
rewriteConfigYesNoOption(state,"stop-writes-on-bgsave-error",server.stop_writes_on_bgsave_err,REDIS_DEFAULT_STOP_WRITES_ON_BGSAVE_ERROR);
|
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,REDIS_DEFAULT_RDB_COMPRESSION);
|
rewriteConfigYesNoOption(state,"rdbcompression",server.rdb_compression,CONFIG_DEFAULT_RDB_COMPRESSION);
|
||||||
rewriteConfigYesNoOption(state,"rdbchecksum",server.rdb_checksum,REDIS_DEFAULT_RDB_CHECKSUM);
|
rewriteConfigYesNoOption(state,"rdbchecksum",server.rdb_checksum,CONFIG_DEFAULT_RDB_CHECKSUM);
|
||||||
rewriteConfigStringOption(state,"dbfilename",server.rdb_filename,REDIS_DEFAULT_RDB_FILENAME);
|
rewriteConfigStringOption(state,"dbfilename",server.rdb_filename,CONFIG_DEFAULT_RDB_FILENAME);
|
||||||
rewriteConfigDirOption(state);
|
rewriteConfigDirOption(state);
|
||||||
rewriteConfigSlaveofOption(state);
|
rewriteConfigSlaveofOption(state);
|
||||||
rewriteConfigStringOption(state,"masterauth",server.masterauth,NULL);
|
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-serve-stale-data",server.repl_serve_stale_data,CONFIG_DEFAULT_SLAVE_SERVE_STALE_DATA);
|
||||||
rewriteConfigYesNoOption(state,"slave-read-only",server.repl_slave_ro,REDIS_DEFAULT_SLAVE_READ_ONLY);
|
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-ping-slave-period",server.repl_ping_slave_period,REDIS_REPL_PING_SLAVE_PERIOD);
|
||||||
rewriteConfigNumericalOption(state,"repl-timeout",server.repl_timeout,REDIS_REPL_TIMEOUT);
|
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-size",server.repl_backlog_size,CONFIG_DEFAULT_REPL_BACKLOG_SIZE);
|
||||||
rewriteConfigBytesOption(state,"repl-backlog-ttl",server.repl_backlog_time_limit,REDIS_DEFAULT_REPL_BACKLOG_TIME_LIMIT);
|
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,REDIS_DEFAULT_REPL_DISABLE_TCP_NODELAY);
|
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,REDIS_DEFAULT_REPL_DISKLESS_SYNC);
|
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,REDIS_DEFAULT_REPL_DISKLESS_SYNC_DELAY);
|
rewriteConfigNumericalOption(state,"repl-diskless-sync-delay",server.repl_diskless_sync_delay,CONFIG_DEFAULT_REPL_DISKLESS_SYNC_DELAY);
|
||||||
rewriteConfigNumericalOption(state,"slave-priority",server.slave_priority,REDIS_DEFAULT_SLAVE_PRIORITY);
|
rewriteConfigNumericalOption(state,"slave-priority",server.slave_priority,CONFIG_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-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,REDIS_DEFAULT_MIN_SLAVES_MAX_LAG);
|
rewriteConfigNumericalOption(state,"min-slaves-max-lag",server.repl_min_slaves_max_lag,CONFIG_DEFAULT_MIN_SLAVES_MAX_LAG);
|
||||||
rewriteConfigStringOption(state,"requirepass",server.requirepass,NULL);
|
rewriteConfigStringOption(state,"requirepass",server.requirepass,NULL);
|
||||||
rewriteConfigNumericalOption(state,"maxclients",server.maxclients,REDIS_MAX_CLIENTS);
|
rewriteConfigNumericalOption(state,"maxclients",server.maxclients,CONFIG_DEFAULT_MAX_CLIENTS);
|
||||||
rewriteConfigBytesOption(state,"maxmemory",server.maxmemory,REDIS_DEFAULT_MAXMEMORY);
|
rewriteConfigBytesOption(state,"maxmemory",server.maxmemory,CONFIG_DEFAULT_MAXMEMORY);
|
||||||
rewriteConfigEnumOption(state,"maxmemory-policy",server.maxmemory_policy,maxmemory_policy_enum,REDIS_DEFAULT_MAXMEMORY_POLICY);
|
rewriteConfigEnumOption(state,"maxmemory-policy",server.maxmemory_policy,maxmemory_policy_enum,CONFIG_DEFAULT_MAXMEMORY_POLICY);
|
||||||
rewriteConfigNumericalOption(state,"maxmemory-samples",server.maxmemory_samples,REDIS_DEFAULT_MAXMEMORY_SAMPLES);
|
rewriteConfigNumericalOption(state,"maxmemory-samples",server.maxmemory_samples,CONFIG_DEFAULT_MAXMEMORY_SAMPLES);
|
||||||
rewriteConfigYesNoOption(state,"appendonly",server.aof_state != REDIS_AOF_OFF,0);
|
rewriteConfigYesNoOption(state,"appendonly",server.aof_state != REDIS_AOF_OFF,0);
|
||||||
rewriteConfigStringOption(state,"appendfilename",server.aof_filename,REDIS_DEFAULT_AOF_FILENAME);
|
rewriteConfigStringOption(state,"appendfilename",server.aof_filename,CONFIG_DEFAULT_AOF_FILENAME);
|
||||||
rewriteConfigEnumOption(state,"appendfsync",server.aof_fsync,aof_fsync_enum,REDIS_DEFAULT_AOF_FSYNC);
|
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,REDIS_DEFAULT_AOF_NO_FSYNC_ON_REWRITE);
|
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);
|
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);
|
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);
|
rewriteConfigNumericalOption(state,"lua-time-limit",server.lua_time_limit,REDIS_LUA_TIME_LIMIT);
|
||||||
rewriteConfigYesNoOption(state,"cluster-enabled",server.cluster_enabled,0);
|
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);
|
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-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-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,"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,"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);
|
rewriteConfigNumericalOption(state,"slowlog-max-len",server.slowlog_max_len,REDIS_SLOWLOG_MAX_LEN);
|
||||||
rewriteConfigNotifykeyspaceeventsOption(state);
|
rewriteConfigNotifykeyspaceeventsOption(state);
|
||||||
rewriteConfigNumericalOption(state,"hash-max-ziplist-entries",server.hash_max_ziplist_entries,REDIS_HASH_MAX_ZIPLIST_ENTRIES);
|
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,"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-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,"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);
|
rewriteConfigNumericalOption(state,"hll-sparse-max-bytes",server.hll_sparse_max_bytes,CONFIG_DEFAULT_HLL_SPARSE_MAX_BYTES);
|
||||||
rewriteConfigYesNoOption(state,"activerehashing",server.activerehashing,REDIS_DEFAULT_ACTIVE_REHASHING);
|
rewriteConfigYesNoOption(state,"activerehashing",server.activerehashing,CONFIG_DEFAULT_ACTIVE_REHASHING);
|
||||||
rewriteConfigClientoutputbufferlimitOption(state);
|
rewriteConfigClientoutputbufferlimitOption(state);
|
||||||
rewriteConfigNumericalOption(state,"hz",server.hz,REDIS_DEFAULT_HZ);
|
rewriteConfigNumericalOption(state,"hz",server.hz,CONFIG_DEFAULT_HZ);
|
||||||
rewriteConfigYesNoOption(state,"aof-rewrite-incremental-fsync",server.aof_rewrite_incremental_fsync,REDIS_DEFAULT_AOF_REWRITE_INCREMENTAL_FSYNC);
|
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,REDIS_DEFAULT_AOF_LOAD_TRUNCATED);
|
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);
|
rewriteConfigEnumOption(state,"supervised",server.supervised_mode,supervised_mode_enum,REDIS_SUPERVISED_NONE);
|
||||||
|
|
||||||
/* Rewrite Sentinel config if in Sentinel mode. */
|
/* Rewrite Sentinel config if in Sentinel mode. */
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include "redis.h"
|
#include "server.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright 2001-2010 Georges Menie (www.menie.org)
|
* Copyright 2001-2010 Georges Menie (www.menie.org)
|
||||||
|
2
src/db.c
2
src/db.c
@ -27,7 +27,7 @@
|
|||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "redis.h"
|
#include "server.h"
|
||||||
#include "cluster.h"
|
#include "cluster.h"
|
||||||
|
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "redis.h"
|
#include "server.h"
|
||||||
#include "sha1.h" /* SHA1 is used for DEBUG DIGEST */
|
#include "sha1.h" /* SHA1 is used for DEBUG DIGEST */
|
||||||
#include "crc64.h"
|
#include "crc64.h"
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#ifndef __GEO_H__
|
#ifndef __GEO_H__
|
||||||
#define __GEO_H__
|
#define __GEO_H__
|
||||||
|
|
||||||
#include "redis.h"
|
#include "server.h"
|
||||||
|
|
||||||
/* Structures used inside geo.c in order to represent points and array of
|
/* Structures used inside geo.c in order to represent points and array of
|
||||||
* points on the earth. */
|
* points on the earth. */
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "redis.h"
|
#include "server.h"
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "redis.h"
|
#include "server.h"
|
||||||
|
|
||||||
/* Dictionary type for latency events. */
|
/* Dictionary type for latency events. */
|
||||||
int dictStringKeyCompare(void *privdata, const void *key1, const void *key2) {
|
int dictStringKeyCompare(void *privdata, const void *key1, const void *key2) {
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "redis.h"
|
#include "server.h"
|
||||||
|
|
||||||
/* ================================ MULTI/EXEC ============================== */
|
/* ================================ MULTI/EXEC ============================== */
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "redis.h"
|
#include "server.h"
|
||||||
#include <sys/uio.h>
|
#include <sys/uio.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "redis.h"
|
#include "server.h"
|
||||||
|
|
||||||
/* This file implements keyspace events notification via Pub/Sub ad
|
/* This file implements keyspace events notification via Pub/Sub ad
|
||||||
* described at http://redis.io/topics/keyspace-events. */
|
* described at http://redis.io/topics/keyspace-events. */
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "redis.h"
|
#include "server.h"
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "redis.h"
|
#include "server.h"
|
||||||
|
|
||||||
/*-----------------------------------------------------------------------------
|
/*-----------------------------------------------------------------------------
|
||||||
* Pubsub low level API
|
* Pubsub low level API
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "redis.h"
|
#include "server.h"
|
||||||
#include "lzf.h" /* LZF compression library */
|
#include "lzf.h" /* LZF compression library */
|
||||||
#include "zipmap.h"
|
#include "zipmap.h"
|
||||||
#include "endianconv.h"
|
#include "endianconv.h"
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
#include "rio.h"
|
#include "rio.h"
|
||||||
|
|
||||||
/* TBD: include only necessary headers. */
|
/* TBD: include only necessary headers. */
|
||||||
#include "redis.h"
|
#include "server.h"
|
||||||
|
|
||||||
/* The current RDB version. When the format changes in a way that is no longer
|
/* The current RDB version. When the format changes in a way that is no longer
|
||||||
* backward compatible this number gets incremented. */
|
* backward compatible this number gets incremented. */
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include "redis.h"
|
#include "server.h"
|
||||||
#include "rdb.h"
|
#include "rdb.h"
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include "redis.h"
|
#include "server.h"
|
||||||
|
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
@ -53,7 +53,7 @@
|
|||||||
#include "util.h"
|
#include "util.h"
|
||||||
#include "crc64.h"
|
#include "crc64.h"
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "redis.h"
|
#include "server.h"
|
||||||
|
|
||||||
/* ------------------------- Buffer I/O implementation ----------------------- */
|
/* ------------------------- Buffer I/O implementation ----------------------- */
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "redis.h"
|
#include "server.h"
|
||||||
#include "sha1.h"
|
#include "sha1.h"
|
||||||
#include "rand.h"
|
#include "rand.h"
|
||||||
#include "cluster.h"
|
#include "cluster.h"
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "redis.h"
|
#include "server.h"
|
||||||
#include "hiredis.h"
|
#include "hiredis.h"
|
||||||
#include "async.h"
|
#include "async.h"
|
||||||
|
|
||||||
@ -1840,7 +1840,7 @@ void sentinelFlushConfig(void) {
|
|||||||
int saved_hz = server.hz;
|
int saved_hz = server.hz;
|
||||||
int rewrite_status;
|
int rewrite_status;
|
||||||
|
|
||||||
server.hz = REDIS_DEFAULT_HZ;
|
server.hz = CONFIG_DEFAULT_HZ;
|
||||||
rewrite_status = rewriteConfig(server.configfile);
|
rewrite_status = rewriteConfig(server.configfile);
|
||||||
server.hz = saved_hz;
|
server.hz = saved_hz;
|
||||||
|
|
||||||
@ -4288,6 +4288,6 @@ void sentinelTimer(void) {
|
|||||||
* exactly continue to stay synchronized asking to be voted at the
|
* exactly continue to stay synchronized asking to be voted at the
|
||||||
* same time again and again (resulting in nobody likely winning the
|
* same time again and again (resulting in nobody likely winning the
|
||||||
* election because of split brain voting). */
|
* election because of split brain voting). */
|
||||||
server.hz = REDIS_DEFAULT_HZ + rand() % REDIS_DEFAULT_HZ;
|
server.hz = CONFIG_DEFAULT_HZ + rand() % CONFIG_DEFAULT_HZ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "redis.h"
|
#include "server.h"
|
||||||
#include "cluster.h"
|
#include "cluster.h"
|
||||||
#include "slowlog.h"
|
#include "slowlog.h"
|
||||||
#include "bio.h"
|
#include "bio.h"
|
||||||
@ -1416,34 +1416,34 @@ void initServerConfig(void) {
|
|||||||
|
|
||||||
getRandomHexChars(server.runid,REDIS_RUN_ID_SIZE);
|
getRandomHexChars(server.runid,REDIS_RUN_ID_SIZE);
|
||||||
server.configfile = NULL;
|
server.configfile = NULL;
|
||||||
server.hz = REDIS_DEFAULT_HZ;
|
server.hz = CONFIG_DEFAULT_HZ;
|
||||||
server.runid[REDIS_RUN_ID_SIZE] = '\0';
|
server.runid[REDIS_RUN_ID_SIZE] = '\0';
|
||||||
server.arch_bits = (sizeof(long) == 8) ? 64 : 32;
|
server.arch_bits = (sizeof(long) == 8) ? 64 : 32;
|
||||||
server.port = REDIS_SERVERPORT;
|
server.port = REDIS_SERVERPORT;
|
||||||
server.tcp_backlog = REDIS_TCP_BACKLOG;
|
server.tcp_backlog = REDIS_TCP_BACKLOG;
|
||||||
server.bindaddr_count = 0;
|
server.bindaddr_count = 0;
|
||||||
server.unixsocket = NULL;
|
server.unixsocket = NULL;
|
||||||
server.unixsocketperm = REDIS_DEFAULT_UNIX_SOCKET_PERM;
|
server.unixsocketperm = CONFIG_DEFAULT_UNIX_SOCKET_PERM;
|
||||||
server.ipfd_count = 0;
|
server.ipfd_count = 0;
|
||||||
server.sofd = -1;
|
server.sofd = -1;
|
||||||
server.dbnum = REDIS_DEFAULT_DBNUM;
|
server.dbnum = CONFIG_DEFAULT_DBNUM;
|
||||||
server.verbosity = REDIS_DEFAULT_VERBOSITY;
|
server.verbosity = CONFIG_DEFAULT_VERBOSITY;
|
||||||
server.maxidletime = REDIS_MAXIDLETIME;
|
server.maxidletime = REDIS_MAXIDLETIME;
|
||||||
server.tcpkeepalive = REDIS_DEFAULT_TCP_KEEPALIVE;
|
server.tcpkeepalive = CONFIG_DEFAULT_TCP_KEEPALIVE;
|
||||||
server.active_expire_enabled = 1;
|
server.active_expire_enabled = 1;
|
||||||
server.client_max_querybuf_len = REDIS_MAX_QUERYBUF_LEN;
|
server.client_max_querybuf_len = REDIS_MAX_QUERYBUF_LEN;
|
||||||
server.saveparams = NULL;
|
server.saveparams = NULL;
|
||||||
server.loading = 0;
|
server.loading = 0;
|
||||||
server.logfile = zstrdup(REDIS_DEFAULT_LOGFILE);
|
server.logfile = zstrdup(CONFIG_DEFAULT_LOGFILE);
|
||||||
server.syslog_enabled = REDIS_DEFAULT_SYSLOG_ENABLED;
|
server.syslog_enabled = CONFIG_DEFAULT_SYSLOG_ENABLED;
|
||||||
server.syslog_ident = zstrdup(REDIS_DEFAULT_SYSLOG_IDENT);
|
server.syslog_ident = zstrdup(CONFIG_DEFAULT_SYSLOG_IDENT);
|
||||||
server.syslog_facility = LOG_LOCAL0;
|
server.syslog_facility = LOG_LOCAL0;
|
||||||
server.daemonize = REDIS_DEFAULT_DAEMONIZE;
|
server.daemonize = CONFIG_DEFAULT_DAEMONIZE;
|
||||||
server.supervised = 0;
|
server.supervised = 0;
|
||||||
server.supervised_mode = REDIS_SUPERVISED_NONE;
|
server.supervised_mode = REDIS_SUPERVISED_NONE;
|
||||||
server.aof_state = REDIS_AOF_OFF;
|
server.aof_state = REDIS_AOF_OFF;
|
||||||
server.aof_fsync = REDIS_DEFAULT_AOF_FSYNC;
|
server.aof_fsync = CONFIG_DEFAULT_AOF_FSYNC;
|
||||||
server.aof_no_fsync_on_rewrite = REDIS_DEFAULT_AOF_NO_FSYNC_ON_REWRITE;
|
server.aof_no_fsync_on_rewrite = CONFIG_DEFAULT_AOF_NO_FSYNC_ON_REWRITE;
|
||||||
server.aof_rewrite_perc = REDIS_AOF_REWRITE_PERC;
|
server.aof_rewrite_perc = REDIS_AOF_REWRITE_PERC;
|
||||||
server.aof_rewrite_min_size = REDIS_AOF_REWRITE_MIN_SIZE;
|
server.aof_rewrite_min_size = REDIS_AOF_REWRITE_MIN_SIZE;
|
||||||
server.aof_rewrite_base_size = 0;
|
server.aof_rewrite_base_size = 0;
|
||||||
@ -1456,22 +1456,22 @@ void initServerConfig(void) {
|
|||||||
server.aof_fd = -1;
|
server.aof_fd = -1;
|
||||||
server.aof_selected_db = -1; /* Make sure the first time will not match */
|
server.aof_selected_db = -1; /* Make sure the first time will not match */
|
||||||
server.aof_flush_postponed_start = 0;
|
server.aof_flush_postponed_start = 0;
|
||||||
server.aof_rewrite_incremental_fsync = REDIS_DEFAULT_AOF_REWRITE_INCREMENTAL_FSYNC;
|
server.aof_rewrite_incremental_fsync = CONFIG_DEFAULT_AOF_REWRITE_INCREMENTAL_FSYNC;
|
||||||
server.aof_load_truncated = REDIS_DEFAULT_AOF_LOAD_TRUNCATED;
|
server.aof_load_truncated = CONFIG_DEFAULT_AOF_LOAD_TRUNCATED;
|
||||||
server.pidfile = NULL;
|
server.pidfile = NULL;
|
||||||
server.rdb_filename = zstrdup(REDIS_DEFAULT_RDB_FILENAME);
|
server.rdb_filename = zstrdup(CONFIG_DEFAULT_RDB_FILENAME);
|
||||||
server.aof_filename = zstrdup(REDIS_DEFAULT_AOF_FILENAME);
|
server.aof_filename = zstrdup(CONFIG_DEFAULT_AOF_FILENAME);
|
||||||
server.requirepass = NULL;
|
server.requirepass = NULL;
|
||||||
server.rdb_compression = REDIS_DEFAULT_RDB_COMPRESSION;
|
server.rdb_compression = CONFIG_DEFAULT_RDB_COMPRESSION;
|
||||||
server.rdb_checksum = REDIS_DEFAULT_RDB_CHECKSUM;
|
server.rdb_checksum = CONFIG_DEFAULT_RDB_CHECKSUM;
|
||||||
server.stop_writes_on_bgsave_err = REDIS_DEFAULT_STOP_WRITES_ON_BGSAVE_ERROR;
|
server.stop_writes_on_bgsave_err = CONFIG_DEFAULT_STOP_WRITES_ON_BGSAVE_ERROR;
|
||||||
server.activerehashing = REDIS_DEFAULT_ACTIVE_REHASHING;
|
server.activerehashing = CONFIG_DEFAULT_ACTIVE_REHASHING;
|
||||||
server.notify_keyspace_events = 0;
|
server.notify_keyspace_events = 0;
|
||||||
server.maxclients = REDIS_MAX_CLIENTS;
|
server.maxclients = CONFIG_DEFAULT_MAX_CLIENTS;
|
||||||
server.bpop_blocked_clients = 0;
|
server.bpop_blocked_clients = 0;
|
||||||
server.maxmemory = REDIS_DEFAULT_MAXMEMORY;
|
server.maxmemory = CONFIG_DEFAULT_MAXMEMORY;
|
||||||
server.maxmemory_policy = REDIS_DEFAULT_MAXMEMORY_POLICY;
|
server.maxmemory_policy = CONFIG_DEFAULT_MAXMEMORY_POLICY;
|
||||||
server.maxmemory_samples = REDIS_DEFAULT_MAXMEMORY_SAMPLES;
|
server.maxmemory_samples = CONFIG_DEFAULT_MAXMEMORY_SAMPLES;
|
||||||
server.hash_max_ziplist_entries = REDIS_HASH_MAX_ZIPLIST_ENTRIES;
|
server.hash_max_ziplist_entries = REDIS_HASH_MAX_ZIPLIST_ENTRIES;
|
||||||
server.hash_max_ziplist_value = REDIS_HASH_MAX_ZIPLIST_VALUE;
|
server.hash_max_ziplist_value = REDIS_HASH_MAX_ZIPLIST_VALUE;
|
||||||
server.list_max_ziplist_size = REDIS_LIST_MAX_ZIPLIST_SIZE;
|
server.list_max_ziplist_size = REDIS_LIST_MAX_ZIPLIST_SIZE;
|
||||||
@ -1479,18 +1479,18 @@ void initServerConfig(void) {
|
|||||||
server.set_max_intset_entries = REDIS_SET_MAX_INTSET_ENTRIES;
|
server.set_max_intset_entries = REDIS_SET_MAX_INTSET_ENTRIES;
|
||||||
server.zset_max_ziplist_entries = REDIS_ZSET_MAX_ZIPLIST_ENTRIES;
|
server.zset_max_ziplist_entries = REDIS_ZSET_MAX_ZIPLIST_ENTRIES;
|
||||||
server.zset_max_ziplist_value = REDIS_ZSET_MAX_ZIPLIST_VALUE;
|
server.zset_max_ziplist_value = REDIS_ZSET_MAX_ZIPLIST_VALUE;
|
||||||
server.hll_sparse_max_bytes = REDIS_DEFAULT_HLL_SPARSE_MAX_BYTES;
|
server.hll_sparse_max_bytes = CONFIG_DEFAULT_HLL_SPARSE_MAX_BYTES;
|
||||||
server.shutdown_asap = 0;
|
server.shutdown_asap = 0;
|
||||||
server.repl_ping_slave_period = REDIS_REPL_PING_SLAVE_PERIOD;
|
server.repl_ping_slave_period = REDIS_REPL_PING_SLAVE_PERIOD;
|
||||||
server.repl_timeout = REDIS_REPL_TIMEOUT;
|
server.repl_timeout = REDIS_REPL_TIMEOUT;
|
||||||
server.repl_min_slaves_to_write = REDIS_DEFAULT_MIN_SLAVES_TO_WRITE;
|
server.repl_min_slaves_to_write = CONFIG_DEFAULT_MIN_SLAVES_TO_WRITE;
|
||||||
server.repl_min_slaves_max_lag = REDIS_DEFAULT_MIN_SLAVES_MAX_LAG;
|
server.repl_min_slaves_max_lag = CONFIG_DEFAULT_MIN_SLAVES_MAX_LAG;
|
||||||
server.cluster_enabled = 0;
|
server.cluster_enabled = 0;
|
||||||
server.cluster_node_timeout = REDIS_CLUSTER_DEFAULT_NODE_TIMEOUT;
|
server.cluster_node_timeout = REDIS_CLUSTER_DEFAULT_NODE_TIMEOUT;
|
||||||
server.cluster_migration_barrier = REDIS_CLUSTER_DEFAULT_MIGRATION_BARRIER;
|
server.cluster_migration_barrier = REDIS_CLUSTER_DEFAULT_MIGRATION_BARRIER;
|
||||||
server.cluster_slave_validity_factor = REDIS_CLUSTER_DEFAULT_SLAVE_VALIDITY;
|
server.cluster_slave_validity_factor = REDIS_CLUSTER_DEFAULT_SLAVE_VALIDITY;
|
||||||
server.cluster_require_full_coverage = REDIS_CLUSTER_DEFAULT_REQUIRE_FULL_COVERAGE;
|
server.cluster_require_full_coverage = REDIS_CLUSTER_DEFAULT_REQUIRE_FULL_COVERAGE;
|
||||||
server.cluster_configfile = zstrdup(REDIS_DEFAULT_CLUSTER_CONFIG_FILE);
|
server.cluster_configfile = zstrdup(CONFIG_DEFAULT_CLUSTER_CONFIG_FILE);
|
||||||
server.lua_caller = NULL;
|
server.lua_caller = NULL;
|
||||||
server.lua_time_limit = REDIS_LUA_TIME_LIMIT;
|
server.lua_time_limit = REDIS_LUA_TIME_LIMIT;
|
||||||
server.lua_client = NULL;
|
server.lua_client = NULL;
|
||||||
@ -1514,22 +1514,22 @@ void initServerConfig(void) {
|
|||||||
server.repl_master_initial_offset = -1;
|
server.repl_master_initial_offset = -1;
|
||||||
server.repl_state = REDIS_REPL_NONE;
|
server.repl_state = REDIS_REPL_NONE;
|
||||||
server.repl_syncio_timeout = REDIS_REPL_SYNCIO_TIMEOUT;
|
server.repl_syncio_timeout = REDIS_REPL_SYNCIO_TIMEOUT;
|
||||||
server.repl_serve_stale_data = REDIS_DEFAULT_SLAVE_SERVE_STALE_DATA;
|
server.repl_serve_stale_data = CONFIG_DEFAULT_SLAVE_SERVE_STALE_DATA;
|
||||||
server.repl_slave_ro = REDIS_DEFAULT_SLAVE_READ_ONLY;
|
server.repl_slave_ro = CONFIG_DEFAULT_SLAVE_READ_ONLY;
|
||||||
server.repl_down_since = 0; /* Never connected, repl is down since EVER. */
|
server.repl_down_since = 0; /* Never connected, repl is down since EVER. */
|
||||||
server.repl_disable_tcp_nodelay = REDIS_DEFAULT_REPL_DISABLE_TCP_NODELAY;
|
server.repl_disable_tcp_nodelay = CONFIG_DEFAULT_REPL_DISABLE_TCP_NODELAY;
|
||||||
server.repl_diskless_sync = REDIS_DEFAULT_REPL_DISKLESS_SYNC;
|
server.repl_diskless_sync = CONFIG_DEFAULT_REPL_DISKLESS_SYNC;
|
||||||
server.repl_diskless_sync_delay = REDIS_DEFAULT_REPL_DISKLESS_SYNC_DELAY;
|
server.repl_diskless_sync_delay = CONFIG_DEFAULT_REPL_DISKLESS_SYNC_DELAY;
|
||||||
server.slave_priority = REDIS_DEFAULT_SLAVE_PRIORITY;
|
server.slave_priority = CONFIG_DEFAULT_SLAVE_PRIORITY;
|
||||||
server.master_repl_offset = 0;
|
server.master_repl_offset = 0;
|
||||||
|
|
||||||
/* Replication partial resync backlog */
|
/* Replication partial resync backlog */
|
||||||
server.repl_backlog = NULL;
|
server.repl_backlog = NULL;
|
||||||
server.repl_backlog_size = REDIS_DEFAULT_REPL_BACKLOG_SIZE;
|
server.repl_backlog_size = CONFIG_DEFAULT_REPL_BACKLOG_SIZE;
|
||||||
server.repl_backlog_histlen = 0;
|
server.repl_backlog_histlen = 0;
|
||||||
server.repl_backlog_idx = 0;
|
server.repl_backlog_idx = 0;
|
||||||
server.repl_backlog_off = 0;
|
server.repl_backlog_off = 0;
|
||||||
server.repl_backlog_time_limit = REDIS_DEFAULT_REPL_BACKLOG_TIME_LIMIT;
|
server.repl_backlog_time_limit = CONFIG_DEFAULT_REPL_BACKLOG_TIME_LIMIT;
|
||||||
server.repl_no_slaves_since = time(NULL);
|
server.repl_no_slaves_since = time(NULL);
|
||||||
|
|
||||||
/* Client output buffer limits */
|
/* Client output buffer limits */
|
||||||
@ -1560,7 +1560,7 @@ void initServerConfig(void) {
|
|||||||
server.slowlog_max_len = REDIS_SLOWLOG_MAX_LEN;
|
server.slowlog_max_len = REDIS_SLOWLOG_MAX_LEN;
|
||||||
|
|
||||||
/* Latency monitor */
|
/* Latency monitor */
|
||||||
server.latency_monitor_threshold = REDIS_DEFAULT_LATENCY_MONITOR_THRESHOLD;
|
server.latency_monitor_threshold = CONFIG_DEFAULT_LATENCY_MONITOR_THRESHOLD;
|
||||||
|
|
||||||
/* Debugging */
|
/* Debugging */
|
||||||
server.assert_failed = "<no assertion failed>";
|
server.assert_failed = "<no assertion failed>";
|
||||||
@ -3455,7 +3455,7 @@ void linuxMemoryWarnings(void) {
|
|||||||
void createPidFile(void) {
|
void createPidFile(void) {
|
||||||
/* If pidfile requested, but no pidfile defined, use
|
/* If pidfile requested, but no pidfile defined, use
|
||||||
* default pidfile path */
|
* default pidfile path */
|
||||||
if (!server.pidfile) server.pidfile = zstrdup(REDIS_DEFAULT_PID_FILE);
|
if (!server.pidfile) server.pidfile = zstrdup(CONFIG_DEFAULT_PID_FILE);
|
||||||
|
|
||||||
/* Try to write the pid file in a best-effort way. */
|
/* Try to write the pid file in a best-effort way. */
|
||||||
FILE *fp = fopen(server.pidfile,"w");
|
FILE *fp = fopen(server.pidfile,"w");
|
@ -75,13 +75,13 @@ typedef long long mstime_t; /* millisecond time type. */
|
|||||||
#define REDIS_ERR -1
|
#define REDIS_ERR -1
|
||||||
|
|
||||||
/* Static server configuration */
|
/* Static server configuration */
|
||||||
#define REDIS_DEFAULT_HZ 10 /* Time interrupt calls/sec. */
|
#define CONFIG_DEFAULT_HZ 10 /* Time interrupt calls/sec. */
|
||||||
#define REDIS_MIN_HZ 1
|
#define REDIS_MIN_HZ 1
|
||||||
#define REDIS_MAX_HZ 500
|
#define REDIS_MAX_HZ 500
|
||||||
#define REDIS_SERVERPORT 6379 /* TCP port */
|
#define REDIS_SERVERPORT 6379 /* TCP port */
|
||||||
#define REDIS_TCP_BACKLOG 511 /* TCP listen backlog */
|
#define REDIS_TCP_BACKLOG 511 /* TCP listen backlog */
|
||||||
#define REDIS_MAXIDLETIME 0 /* default client timeout: infinite */
|
#define REDIS_MAXIDLETIME 0 /* default client timeout: infinite */
|
||||||
#define REDIS_DEFAULT_DBNUM 16
|
#define CONFIG_DEFAULT_DBNUM 16
|
||||||
#define REDIS_CONFIGLINE_MAX 1024
|
#define REDIS_CONFIGLINE_MAX 1024
|
||||||
#define REDIS_DBCRON_DBS_PER_CALL 16
|
#define REDIS_DBCRON_DBS_PER_CALL 16
|
||||||
#define REDIS_MAX_WRITE_PER_EVENT (1024*64)
|
#define REDIS_MAX_WRITE_PER_EVENT (1024*64)
|
||||||
@ -94,48 +94,48 @@ typedef long long mstime_t; /* millisecond time type. */
|
|||||||
#define REDIS_AOF_REWRITE_ITEMS_PER_CMD 64
|
#define REDIS_AOF_REWRITE_ITEMS_PER_CMD 64
|
||||||
#define REDIS_SLOWLOG_LOG_SLOWER_THAN 10000
|
#define REDIS_SLOWLOG_LOG_SLOWER_THAN 10000
|
||||||
#define REDIS_SLOWLOG_MAX_LEN 128
|
#define REDIS_SLOWLOG_MAX_LEN 128
|
||||||
#define REDIS_MAX_CLIENTS 10000
|
#define CONFIG_DEFAULT_MAX_CLIENTS 10000
|
||||||
#define REDIS_AUTHPASS_MAX_LEN 512
|
#define REDIS_AUTHPASS_MAX_LEN 512
|
||||||
#define REDIS_DEFAULT_SLAVE_PRIORITY 100
|
#define CONFIG_DEFAULT_SLAVE_PRIORITY 100
|
||||||
#define REDIS_REPL_TIMEOUT 60
|
#define REDIS_REPL_TIMEOUT 60
|
||||||
#define REDIS_REPL_PING_SLAVE_PERIOD 10
|
#define REDIS_REPL_PING_SLAVE_PERIOD 10
|
||||||
#define REDIS_RUN_ID_SIZE 40
|
#define REDIS_RUN_ID_SIZE 40
|
||||||
#define REDIS_EOF_MARK_SIZE 40
|
#define REDIS_EOF_MARK_SIZE 40
|
||||||
#define REDIS_DEFAULT_REPL_BACKLOG_SIZE (1024*1024) /* 1mb */
|
#define CONFIG_DEFAULT_REPL_BACKLOG_SIZE (1024*1024) /* 1mb */
|
||||||
#define REDIS_DEFAULT_REPL_BACKLOG_TIME_LIMIT (60*60) /* 1 hour */
|
#define CONFIG_DEFAULT_REPL_BACKLOG_TIME_LIMIT (60*60) /* 1 hour */
|
||||||
#define REDIS_REPL_BACKLOG_MIN_SIZE (1024*16) /* 16k */
|
#define REDIS_REPL_BACKLOG_MIN_SIZE (1024*16) /* 16k */
|
||||||
#define REDIS_BGSAVE_RETRY_DELAY 5 /* Wait a few secs before trying again. */
|
#define REDIS_BGSAVE_RETRY_DELAY 5 /* Wait a few secs before trying again. */
|
||||||
#define REDIS_DEFAULT_PID_FILE "/var/run/redis.pid"
|
#define CONFIG_DEFAULT_PID_FILE "/var/run/redis.pid"
|
||||||
#define REDIS_DEFAULT_SYSLOG_IDENT "redis"
|
#define CONFIG_DEFAULT_SYSLOG_IDENT "redis"
|
||||||
#define REDIS_DEFAULT_CLUSTER_CONFIG_FILE "nodes.conf"
|
#define CONFIG_DEFAULT_CLUSTER_CONFIG_FILE "nodes.conf"
|
||||||
#define REDIS_DEFAULT_DAEMONIZE 0
|
#define CONFIG_DEFAULT_DAEMONIZE 0
|
||||||
#define REDIS_DEFAULT_UNIX_SOCKET_PERM 0
|
#define CONFIG_DEFAULT_UNIX_SOCKET_PERM 0
|
||||||
#define REDIS_DEFAULT_TCP_KEEPALIVE 0
|
#define CONFIG_DEFAULT_TCP_KEEPALIVE 0
|
||||||
#define REDIS_DEFAULT_LOGFILE ""
|
#define CONFIG_DEFAULT_LOGFILE ""
|
||||||
#define REDIS_DEFAULT_SYSLOG_ENABLED 0
|
#define CONFIG_DEFAULT_SYSLOG_ENABLED 0
|
||||||
#define REDIS_DEFAULT_STOP_WRITES_ON_BGSAVE_ERROR 1
|
#define CONFIG_DEFAULT_STOP_WRITES_ON_BGSAVE_ERROR 1
|
||||||
#define REDIS_DEFAULT_RDB_COMPRESSION 1
|
#define CONFIG_DEFAULT_RDB_COMPRESSION 1
|
||||||
#define REDIS_DEFAULT_RDB_CHECKSUM 1
|
#define CONFIG_DEFAULT_RDB_CHECKSUM 1
|
||||||
#define REDIS_DEFAULT_RDB_FILENAME "dump.rdb"
|
#define CONFIG_DEFAULT_RDB_FILENAME "dump.rdb"
|
||||||
#define REDIS_DEFAULT_REPL_DISKLESS_SYNC 0
|
#define CONFIG_DEFAULT_REPL_DISKLESS_SYNC 0
|
||||||
#define REDIS_DEFAULT_REPL_DISKLESS_SYNC_DELAY 5
|
#define CONFIG_DEFAULT_REPL_DISKLESS_SYNC_DELAY 5
|
||||||
#define REDIS_DEFAULT_SLAVE_SERVE_STALE_DATA 1
|
#define CONFIG_DEFAULT_SLAVE_SERVE_STALE_DATA 1
|
||||||
#define REDIS_DEFAULT_SLAVE_READ_ONLY 1
|
#define CONFIG_DEFAULT_SLAVE_READ_ONLY 1
|
||||||
#define REDIS_DEFAULT_REPL_DISABLE_TCP_NODELAY 0
|
#define CONFIG_DEFAULT_REPL_DISABLE_TCP_NODELAY 0
|
||||||
#define REDIS_DEFAULT_MAXMEMORY 0
|
#define CONFIG_DEFAULT_MAXMEMORY 0
|
||||||
#define REDIS_DEFAULT_MAXMEMORY_SAMPLES 5
|
#define CONFIG_DEFAULT_MAXMEMORY_SAMPLES 5
|
||||||
#define REDIS_DEFAULT_AOF_FILENAME "appendonly.aof"
|
#define CONFIG_DEFAULT_AOF_FILENAME "appendonly.aof"
|
||||||
#define REDIS_DEFAULT_AOF_NO_FSYNC_ON_REWRITE 0
|
#define CONFIG_DEFAULT_AOF_NO_FSYNC_ON_REWRITE 0
|
||||||
#define REDIS_DEFAULT_AOF_LOAD_TRUNCATED 1
|
#define CONFIG_DEFAULT_AOF_LOAD_TRUNCATED 1
|
||||||
#define REDIS_DEFAULT_ACTIVE_REHASHING 1
|
#define CONFIG_DEFAULT_ACTIVE_REHASHING 1
|
||||||
#define REDIS_DEFAULT_AOF_REWRITE_INCREMENTAL_FSYNC 1
|
#define CONFIG_DEFAULT_AOF_REWRITE_INCREMENTAL_FSYNC 1
|
||||||
#define REDIS_DEFAULT_MIN_SLAVES_TO_WRITE 0
|
#define CONFIG_DEFAULT_MIN_SLAVES_TO_WRITE 0
|
||||||
#define REDIS_DEFAULT_MIN_SLAVES_MAX_LAG 10
|
#define CONFIG_DEFAULT_MIN_SLAVES_MAX_LAG 10
|
||||||
#define REDIS_IP_STR_LEN 46 /* INET6_ADDRSTRLEN is 46, but we need to be sure */
|
#define REDIS_IP_STR_LEN 46 /* INET6_ADDRSTRLEN is 46, but we need to be sure */
|
||||||
#define REDIS_PEER_ID_LEN (REDIS_IP_STR_LEN+32) /* Must be enough for ip:port */
|
#define REDIS_PEER_ID_LEN (REDIS_IP_STR_LEN+32) /* Must be enough for ip:port */
|
||||||
#define REDIS_BINDADDR_MAX 16
|
#define REDIS_BINDADDR_MAX 16
|
||||||
#define REDIS_MIN_RESERVED_FDS 32
|
#define REDIS_MIN_RESERVED_FDS 32
|
||||||
#define REDIS_DEFAULT_LATENCY_MONITOR_THRESHOLD 0
|
#define CONFIG_DEFAULT_LATENCY_MONITOR_THRESHOLD 0
|
||||||
|
|
||||||
#define ACTIVE_EXPIRE_CYCLE_LOOKUPS_PER_LOOP 20 /* Loopkups per loop. */
|
#define ACTIVE_EXPIRE_CYCLE_LOOKUPS_PER_LOOP 20 /* Loopkups per loop. */
|
||||||
#define ACTIVE_EXPIRE_CYCLE_FAST_DURATION 1000 /* Microseconds */
|
#define ACTIVE_EXPIRE_CYCLE_FAST_DURATION 1000 /* Microseconds */
|
||||||
@ -312,7 +312,7 @@ typedef long long mstime_t; /* millisecond time type. */
|
|||||||
#define REDIS_NOTICE 2
|
#define REDIS_NOTICE 2
|
||||||
#define REDIS_WARNING 3
|
#define REDIS_WARNING 3
|
||||||
#define REDIS_LOG_RAW (1<<10) /* Modifier to log without timestamp */
|
#define REDIS_LOG_RAW (1<<10) /* Modifier to log without timestamp */
|
||||||
#define REDIS_DEFAULT_VERBOSITY REDIS_NOTICE
|
#define CONFIG_DEFAULT_VERBOSITY REDIS_NOTICE
|
||||||
|
|
||||||
/* Supervision options */
|
/* Supervision options */
|
||||||
#define REDIS_SUPERVISED_NONE 0
|
#define REDIS_SUPERVISED_NONE 0
|
||||||
@ -330,7 +330,7 @@ typedef long long mstime_t; /* millisecond time type. */
|
|||||||
#define AOF_FSYNC_NO 0
|
#define AOF_FSYNC_NO 0
|
||||||
#define AOF_FSYNC_ALWAYS 1
|
#define AOF_FSYNC_ALWAYS 1
|
||||||
#define AOF_FSYNC_EVERYSEC 2
|
#define AOF_FSYNC_EVERYSEC 2
|
||||||
#define REDIS_DEFAULT_AOF_FSYNC AOF_FSYNC_EVERYSEC
|
#define CONFIG_DEFAULT_AOF_FSYNC AOF_FSYNC_EVERYSEC
|
||||||
|
|
||||||
/* Zip structure related defaults */
|
/* Zip structure related defaults */
|
||||||
#define REDIS_HASH_MAX_ZIPLIST_ENTRIES 512
|
#define REDIS_HASH_MAX_ZIPLIST_ENTRIES 512
|
||||||
@ -344,7 +344,7 @@ typedef long long mstime_t; /* millisecond time type. */
|
|||||||
#define REDIS_LIST_COMPRESS_DEPTH 0
|
#define REDIS_LIST_COMPRESS_DEPTH 0
|
||||||
|
|
||||||
/* HyperLogLog defines */
|
/* HyperLogLog defines */
|
||||||
#define REDIS_DEFAULT_HLL_SPARSE_MAX_BYTES 3000
|
#define CONFIG_DEFAULT_HLL_SPARSE_MAX_BYTES 3000
|
||||||
|
|
||||||
/* Sets operations codes */
|
/* Sets operations codes */
|
||||||
#define REDIS_OP_UNION 0
|
#define REDIS_OP_UNION 0
|
||||||
@ -358,7 +358,7 @@ typedef long long mstime_t; /* millisecond time type. */
|
|||||||
#define REDIS_MAXMEMORY_ALLKEYS_LRU 3
|
#define REDIS_MAXMEMORY_ALLKEYS_LRU 3
|
||||||
#define REDIS_MAXMEMORY_ALLKEYS_RANDOM 4
|
#define REDIS_MAXMEMORY_ALLKEYS_RANDOM 4
|
||||||
#define REDIS_MAXMEMORY_NO_EVICTION 5
|
#define REDIS_MAXMEMORY_NO_EVICTION 5
|
||||||
#define REDIS_DEFAULT_MAXMEMORY_POLICY REDIS_MAXMEMORY_NO_EVICTION
|
#define CONFIG_DEFAULT_MAXMEMORY_POLICY REDIS_MAXMEMORY_NO_EVICTION
|
||||||
|
|
||||||
/* Scripting */
|
/* Scripting */
|
||||||
#define REDIS_LUA_TIME_LIMIT 5000 /* milliseconds */
|
#define REDIS_LUA_TIME_LIMIT 5000 /* milliseconds */
|
@ -39,7 +39,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include "redis.h"
|
#include "server.h"
|
||||||
#include "slowlog.h"
|
#include "slowlog.h"
|
||||||
|
|
||||||
/* Create a new slowlog entry.
|
/* Create a new slowlog entry.
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include "redis.h"
|
#include "server.h"
|
||||||
#include "pqsort.h" /* Partial qsort for SORT+LIMIT */
|
#include "pqsort.h" /* Partial qsort for SORT+LIMIT */
|
||||||
#include <math.h> /* isnan() */
|
#include <math.h> /* isnan() */
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "redis.h"
|
#include "server.h"
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "redis.h"
|
#include "server.h"
|
||||||
|
|
||||||
/* ----------------- Blocking sockets I/O with timeouts --------------------- */
|
/* ----------------- Blocking sockets I/O with timeouts --------------------- */
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "redis.h"
|
#include "server.h"
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
/*-----------------------------------------------------------------------------
|
/*-----------------------------------------------------------------------------
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "redis.h"
|
#include "server.h"
|
||||||
|
|
||||||
/*-----------------------------------------------------------------------------
|
/*-----------------------------------------------------------------------------
|
||||||
* List API
|
* List API
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "redis.h"
|
#include "server.h"
|
||||||
|
|
||||||
/*-----------------------------------------------------------------------------
|
/*-----------------------------------------------------------------------------
|
||||||
* Set Commands
|
* Set Commands
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "redis.h"
|
#include "server.h"
|
||||||
#include <math.h> /* isnan(), isinf() */
|
#include <math.h> /* isnan(), isinf() */
|
||||||
|
|
||||||
/*-----------------------------------------------------------------------------
|
/*-----------------------------------------------------------------------------
|
||||||
|
@ -49,7 +49,7 @@
|
|||||||
* pointers being only at "level 1". This allows to traverse the list
|
* pointers being only at "level 1". This allows to traverse the list
|
||||||
* from tail to head, useful for ZREVRANGE. */
|
* from tail to head, useful for ZREVRANGE. */
|
||||||
|
|
||||||
#include "redis.h"
|
#include "server.h"
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
static int zslLexValueGteMin(robj *value, zlexrangespec *spec);
|
static int zslLexValueGteMin(robj *value, zlexrangespec *spec);
|
||||||
|
Loading…
Reference in New Issue
Block a user