complete rebranding with tests passing
This commit is contained in:
parent
5420f93de9
commit
dac1213462
12
README.md
12
README.md
@ -108,19 +108,19 @@ Running Redis
|
|||||||
To run Redis with the default configuration just type:
|
To run Redis with the default configuration just type:
|
||||||
|
|
||||||
% cd src
|
% cd src
|
||||||
% ./redis-server
|
% ./keydb-server
|
||||||
|
|
||||||
If you want to provide your redis.conf, you have to run it using an additional
|
If you want to provide your redis.conf, you have to run it using an additional
|
||||||
parameter (the path of the configuration file):
|
parameter (the path of the configuration file):
|
||||||
|
|
||||||
% cd src
|
% cd src
|
||||||
% ./redis-server /path/to/redis.conf
|
% ./keydb-server /path/to/redis.conf
|
||||||
|
|
||||||
It is possible to alter the Redis configuration by passing parameters directly
|
It is possible to alter the Redis configuration by passing parameters directly
|
||||||
as options using the command line. Examples:
|
as options using the command line. Examples:
|
||||||
|
|
||||||
% ./redis-server --port 9999 --replicaof 127.0.0.1 6379
|
% ./keydb-server --port 9999 --replicaof 127.0.0.1 6379
|
||||||
% ./redis-server /etc/redis/6379.conf --loglevel debug
|
% ./keydb-server /etc/redis/6379.conf --loglevel debug
|
||||||
|
|
||||||
All the options in redis.conf are also supported as options using the command
|
All the options in redis.conf are also supported as options using the command
|
||||||
line, with exactly the same name.
|
line, with exactly the same name.
|
||||||
@ -128,11 +128,11 @@ line, with exactly the same name.
|
|||||||
Playing with Redis
|
Playing with Redis
|
||||||
------------------
|
------------------
|
||||||
|
|
||||||
You can use redis-cli to play with Redis. Start a redis-server instance,
|
You can use keydb-cli to play with Redis. Start a keydb-server instance,
|
||||||
then in another terminal try the following:
|
then in another terminal try the following:
|
||||||
|
|
||||||
% cd src
|
% cd src
|
||||||
% ./redis-cli
|
% ./keydb-cli
|
||||||
redis> ping
|
redis> ping
|
||||||
PONG
|
PONG
|
||||||
redis> set foo bar
|
redis> set foo bar
|
||||||
|
4
deps/hiredis/Makefile
vendored
4
deps/hiredis/Makefile
vendored
@ -23,9 +23,9 @@ INSTALL_INCLUDE_PATH= $(DESTDIR)$(PREFIX)/$(INCLUDE_PATH)
|
|||||||
INSTALL_LIBRARY_PATH= $(DESTDIR)$(PREFIX)/$(LIBRARY_PATH)
|
INSTALL_LIBRARY_PATH= $(DESTDIR)$(PREFIX)/$(LIBRARY_PATH)
|
||||||
INSTALL_PKGCONF_PATH= $(INSTALL_LIBRARY_PATH)/$(PKGCONF_PATH)
|
INSTALL_PKGCONF_PATH= $(INSTALL_LIBRARY_PATH)/$(PKGCONF_PATH)
|
||||||
|
|
||||||
# redis-server configuration used for testing
|
# keydb-server configuration used for testing
|
||||||
REDIS_PORT=56379
|
REDIS_PORT=56379
|
||||||
REDIS_SERVER=redis-server
|
REDIS_SERVER=keydb-server
|
||||||
define REDIS_TEST_CONFIG
|
define REDIS_TEST_CONFIG
|
||||||
daemonize yes
|
daemonize yes
|
||||||
pidfile /tmp/hiredis-test-redis.pid
|
pidfile /tmp/hiredis-test-redis.pid
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
# Note that in order to read the configuration file, Redis must be
|
# Note that in order to read the configuration file, Redis must be
|
||||||
# started with the file path as first argument:
|
# started with the file path as first argument:
|
||||||
#
|
#
|
||||||
# ./redis-server /path/to/redis.conf
|
# ./keydb-server /path/to/redis.conf
|
||||||
|
|
||||||
# Note on units: when memory size is needed, it is possible to specify
|
# Note on units: when memory size is needed, it is possible to specify
|
||||||
# it in the usual form of 1k 5GB 4M and so forth:
|
# it in the usual form of 1k 5GB 4M and so forth:
|
||||||
@ -804,7 +804,7 @@ auto-aof-rewrite-min-size 64mb
|
|||||||
# the Redis server starts emitting a log to inform the user of the event.
|
# the Redis server starts emitting a log to inform the user of the event.
|
||||||
# Otherwise if the option is set to no, the server aborts with an error
|
# Otherwise if the option is set to no, the server aborts with an error
|
||||||
# and refuses to start. When the option is set to no, the user requires
|
# and refuses to start. When the option is set to no, the user requires
|
||||||
# to fix the AOF file using the "redis-check-aof" utility before to restart
|
# to fix the AOF file using the "keydb-check-aof" utility before to restart
|
||||||
# the server.
|
# the server.
|
||||||
#
|
#
|
||||||
# Note that if the AOF file will be found to be corrupted in the middle
|
# Note that if the AOF file will be found to be corrupted in the middle
|
||||||
@ -1313,8 +1313,8 @@ rdb-save-incremental-fsync yes
|
|||||||
#
|
#
|
||||||
# NOTE: The above table was obtained by running the following commands:
|
# NOTE: The above table was obtained by running the following commands:
|
||||||
#
|
#
|
||||||
# redis-benchmark -n 1000000 incr foo
|
# keydb-benchmark -n 1000000 incr foo
|
||||||
# redis-cli object freq foo
|
# keydb-cli object freq foo
|
||||||
#
|
#
|
||||||
# NOTE 2: The counter initial value is 5 in order to give new objects a chance
|
# NOTE 2: The counter initial value is 5 in order to give new objects a chance
|
||||||
# to accumulate hits.
|
# to accumulate hits.
|
||||||
|
@ -21,14 +21,14 @@
|
|||||||
port 26379
|
port 26379
|
||||||
|
|
||||||
# By default Redis Sentinel does not run as a daemon. Use 'yes' if you need it.
|
# By default Redis Sentinel does not run as a daemon. Use 'yes' if you need it.
|
||||||
# Note that Redis will write a pid file in /var/run/redis-sentinel.pid when
|
# Note that Redis will write a pid file in /var/run/keydb-sentinel.pid when
|
||||||
# daemonized.
|
# daemonized.
|
||||||
daemonize no
|
daemonize no
|
||||||
|
|
||||||
# When running daemonized, Redis Sentinel writes a pid file in
|
# When running daemonized, Redis Sentinel writes a pid file in
|
||||||
# /var/run/redis-sentinel.pid by default. You can specify a custom pid file
|
# /var/run/keydb-sentinel.pid by default. You can specify a custom pid file
|
||||||
# location here.
|
# location here.
|
||||||
pidfile /var/run/redis-sentinel.pid
|
pidfile /var/run/keydb-sentinel.pid
|
||||||
|
|
||||||
# Specify the log file name. Also the empty string can be used to force
|
# Specify the log file name. Also the empty string can be used to force
|
||||||
# Sentinel to log on the standard output. Note that if you use standard
|
# Sentinel to log on the standard output. Note that if you use standard
|
||||||
@ -64,7 +64,7 @@ logfile ""
|
|||||||
# unmounting filesystems.
|
# unmounting filesystems.
|
||||||
dir /tmp
|
dir /tmp
|
||||||
|
|
||||||
# sentinel monitor <master-name> <ip> <redis-port> <quorum>
|
# sentinel monitor <master-name> <ip> <keydb-port> <quorum>
|
||||||
#
|
#
|
||||||
# Tells Sentinel to monitor this master, and to consider it in O_DOWN
|
# Tells Sentinel to monitor this master, and to consider it in O_DOWN
|
||||||
# (Objectively Down) state only if at least <quorum> sentinels agree.
|
# (Objectively Down) state only if at least <quorum> sentinels agree.
|
||||||
|
@ -867,12 +867,12 @@ uxeof: /* Unexpected AOF end of file. */
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (fakeClient) freeFakeClient(fakeClient); /* avoid valgrind warning */
|
if (fakeClient) freeFakeClient(fakeClient); /* avoid valgrind warning */
|
||||||
serverLog(LL_WARNING,"Unexpected end of file reading the append only file. You can: 1) Make a backup of your AOF file, then use ./redis-check-aof --fix <filename>. 2) Alternatively you can set the 'aof-load-truncated' configuration option to yes and restart the server.");
|
serverLog(LL_WARNING,"Unexpected end of file reading the append only file. You can: 1) Make a backup of your AOF file, then use ./keydb-check-aof --fix <filename>. 2) Alternatively you can set the 'aof-load-truncated' configuration option to yes and restart the server.");
|
||||||
exit(1);
|
exit(1);
|
||||||
|
|
||||||
fmterr: /* Format error. */
|
fmterr: /* Format error. */
|
||||||
if (fakeClient) freeFakeClient(fakeClient); /* avoid valgrind warning */
|
if (fakeClient) freeFakeClient(fakeClient); /* avoid valgrind warning */
|
||||||
serverLog(LL_WARNING,"Bad file format reading the append only file: make a backup of your AOF file, then use ./redis-check-aof --fix <filename>");
|
serverLog(LL_WARNING,"Bad file format reading the append only file: make a backup of your AOF file, then use ./keydb-check-aof --fix <filename>");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1546,7 +1546,7 @@ int rewriteAppendOnlyFileBackground(void) {
|
|||||||
|
|
||||||
/* Child */
|
/* Child */
|
||||||
closeListeningSockets(0);
|
closeListeningSockets(0);
|
||||||
redisSetProcTitle("redis-aof-rewrite");
|
redisSetProcTitle("keydb-aof-rewrite");
|
||||||
snprintf(tmpfile,256,"temp-rewriteaof-bg-%d.aof", (int) getpid());
|
snprintf(tmpfile,256,"temp-rewriteaof-bg-%d.aof", (int) getpid());
|
||||||
if (rewriteAppendOnlyFile(tmpfile) == C_OK) {
|
if (rewriteAppendOnlyFile(tmpfile) == C_OK) {
|
||||||
size_t private_dirty = zmalloc_get_private_dirty(-1);
|
size_t private_dirty = zmalloc_get_private_dirty(-1);
|
||||||
|
@ -1104,7 +1104,7 @@ void clusterHandleConfigEpochCollision(clusterNode *sender) {
|
|||||||
* about the node we want to remove, we don't re-add it before some time.
|
* about the node we want to remove, we don't re-add it before some time.
|
||||||
*
|
*
|
||||||
* Currently the CLUSTER_BLACKLIST_TTL is set to 1 minute, this means
|
* Currently the CLUSTER_BLACKLIST_TTL is set to 1 minute, this means
|
||||||
* that redis-trib has 60 seconds to send CLUSTER FORGET messages to nodes
|
* that keydb-trib has 60 seconds to send CLUSTER FORGET messages to nodes
|
||||||
* in the cluster without dealing with the problem of other nodes re-adding
|
* in the cluster without dealing with the problem of other nodes re-adding
|
||||||
* back the node to nodes we already sent the FORGET command to.
|
* back the node to nodes we already sent the FORGET command to.
|
||||||
*
|
*
|
||||||
@ -1556,7 +1556,7 @@ void clusterUpdateSlotsConfigWith(clusterNode *sender, uint64_t senderConfigEpoc
|
|||||||
if (server.cluster->slots[j] == sender) continue;
|
if (server.cluster->slots[j] == sender) continue;
|
||||||
|
|
||||||
/* The slot is in importing state, it should be modified only
|
/* The slot is in importing state, it should be modified only
|
||||||
* manually via redis-trib (example: a resharding is in progress
|
* manually via keydb-trib (example: a resharding is in progress
|
||||||
* and the migrating side slot was already closed and is advertising
|
* and the migrating side slot was already closed and is advertising
|
||||||
* a new config. We still want the slot to be closed manually). */
|
* a new config. We still want the slot to be closed manually). */
|
||||||
if (server.cluster->importing_slots_from[j]) continue;
|
if (server.cluster->importing_slots_from[j]) continue;
|
||||||
@ -3861,7 +3861,7 @@ void clusterUpdateState(void) {
|
|||||||
* B) If according to our config other nodes are already in charge for
|
* B) If according to our config other nodes are already in charge for
|
||||||
* this lots, we set the slots as IMPORTING from our point of view
|
* this lots, we set the slots as IMPORTING from our point of view
|
||||||
* in order to justify we have those slots, and in order to make
|
* in order to justify we have those slots, and in order to make
|
||||||
* redis-trib aware of the issue, so that it can try to fix it.
|
* keydb-trib aware of the issue, so that it can try to fix it.
|
||||||
* 2) If we find data in a DB different than DB0 we return C_ERR to
|
* 2) If we find data in a DB different than DB0 we return C_ERR to
|
||||||
* signal the caller it should quit the server with an error message
|
* signal the caller it should quit the server with an error message
|
||||||
* or take other actions.
|
* or take other actions.
|
||||||
|
@ -1383,7 +1383,7 @@ void sigsegvHandler(int sig, siginfo_t *info, void *secret) {
|
|||||||
"\n=== REDIS BUG REPORT END. Make sure to include from START to END. ===\n\n"
|
"\n=== REDIS BUG REPORT END. Make sure to include from START to END. ===\n\n"
|
||||||
" Please report the crash by opening an issue on github:\n\n"
|
" Please report the crash by opening an issue on github:\n\n"
|
||||||
" http://github.com/antirez/redis/issues\n\n"
|
" http://github.com/antirez/redis/issues\n\n"
|
||||||
" Suspect RAM error? Use redis-server --test-memory to verify it.\n\n"
|
" Suspect RAM error? Use keydb-server --test-memory to verify it.\n\n"
|
||||||
);
|
);
|
||||||
|
|
||||||
/* free(messages); Don't call free() with possibly corrupted memory. */
|
/* free(messages); Don't call free() with possibly corrupted memory. */
|
||||||
|
@ -418,7 +418,7 @@ sds createLatencyReport(void) {
|
|||||||
" 1) Lower the system load.\n"
|
" 1) Lower the system load.\n"
|
||||||
" 2) Use a computer / VM just for Redis if you are running other softawre in the same system.\n"
|
" 2) Use a computer / VM just for Redis if you are running other softawre in the same system.\n"
|
||||||
" 3) Check if you have a \"noisy neighbour\" problem.\n"
|
" 3) Check if you have a \"noisy neighbour\" problem.\n"
|
||||||
" 4) Check with 'redis-cli --intrinsic-latency 100' what is the intrinsic latency in your system.\n"
|
" 4) Check with 'keydb-cli --intrinsic-latency 100' what is the intrinsic latency in your system.\n"
|
||||||
" 5) Check if the problem is allocator-related by recompiling Redis with MALLOC=libc, if you are using Jemalloc. However this may create fragmentation problems.\n");
|
" 5) Check if the problem is allocator-related by recompiling Redis with MALLOC=libc, if you are using Jemalloc. However this may create fragmentation problems.\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1316,7 +1316,7 @@ int rdbSaveBackground(rdbSaveInfo *rsi) {
|
|||||||
|
|
||||||
/* Child */
|
/* Child */
|
||||||
closeListeningSockets(0);
|
closeListeningSockets(0);
|
||||||
redisSetProcTitle("redis-rdb-bgsave");
|
redisSetProcTitle("keydb-rdb-bgsave");
|
||||||
retval = rdbSave(rsi);
|
retval = rdbSave(rsi);
|
||||||
if (retval == C_OK) {
|
if (retval == C_OK) {
|
||||||
size_t private_dirty = zmalloc_get_private_dirty(-1);
|
size_t private_dirty = zmalloc_get_private_dirty(-1);
|
||||||
@ -2314,7 +2314,7 @@ int rdbSaveToSlavesSockets(rdbSaveInfo *rsi) {
|
|||||||
zfree(fds);
|
zfree(fds);
|
||||||
|
|
||||||
closeListeningSockets(0);
|
closeListeningSockets(0);
|
||||||
redisSetProcTitle("redis-rdb-to-slaves");
|
redisSetProcTitle("keydb-rdb-to-slaves");
|
||||||
|
|
||||||
retval = rdbSaveRioWithEOFMark(&slave_sockets,NULL,rsi);
|
retval = rdbSaveRioWithEOFMark(&slave_sockets,NULL,rsi);
|
||||||
if (retval == C_OK && rioFlush(&slave_sockets) == 0)
|
if (retval == C_OK && rioFlush(&slave_sockets) == 0)
|
||||||
|
@ -566,7 +566,7 @@ invalid:
|
|||||||
|
|
||||||
usage:
|
usage:
|
||||||
printf(
|
printf(
|
||||||
"Usage: redis-benchmark [-h <host>] [-p <port>] [-c <clients>] [-n <requests>] [-k <boolean>]\n\n"
|
"Usage: keydb-benchmark [-h <host>] [-p <port>] [-c <clients>] [-n <requests>] [-k <boolean>]\n\n"
|
||||||
" -h <hostname> Server hostname (default 127.0.0.1)\n"
|
" -h <hostname> Server hostname (default 127.0.0.1)\n"
|
||||||
" -p <port> Server port (default 6379)\n"
|
" -p <port> Server port (default 6379)\n"
|
||||||
" -s <socket> Server socket (overrides host and port)\n"
|
" -s <socket> Server socket (overrides host and port)\n"
|
||||||
@ -593,17 +593,17 @@ usage:
|
|||||||
" -I Idle mode. Just open N idle connections and wait.\n\n"
|
" -I Idle mode. Just open N idle connections and wait.\n\n"
|
||||||
"Examples:\n\n"
|
"Examples:\n\n"
|
||||||
" Run the benchmark with the default configuration against 127.0.0.1:6379:\n"
|
" Run the benchmark with the default configuration against 127.0.0.1:6379:\n"
|
||||||
" $ redis-benchmark\n\n"
|
" $ keydb-benchmark\n\n"
|
||||||
" Use 20 parallel clients, for a total of 100k requests, against 192.168.1.1:\n"
|
" Use 20 parallel clients, for a total of 100k requests, against 192.168.1.1:\n"
|
||||||
" $ redis-benchmark -h 192.168.1.1 -p 6379 -n 100000 -c 20\n\n"
|
" $ keydb-benchmark -h 192.168.1.1 -p 6379 -n 100000 -c 20\n\n"
|
||||||
" Fill 127.0.0.1:6379 with about 1 million keys only using the SET test:\n"
|
" Fill 127.0.0.1:6379 with about 1 million keys only using the SET test:\n"
|
||||||
" $ redis-benchmark -t set -n 1000000 -r 100000000\n\n"
|
" $ keydb-benchmark -t set -n 1000000 -r 100000000\n\n"
|
||||||
" Benchmark 127.0.0.1:6379 for a few commands producing CSV output:\n"
|
" Benchmark 127.0.0.1:6379 for a few commands producing CSV output:\n"
|
||||||
" $ redis-benchmark -t ping,set,get -n 100000 --csv\n\n"
|
" $ keydb-benchmark -t ping,set,get -n 100000 --csv\n\n"
|
||||||
" Benchmark a specific command line:\n"
|
" Benchmark a specific command line:\n"
|
||||||
" $ redis-benchmark -r 10000 -n 10000 eval 'return redis.call(\"ping\")' 0\n\n"
|
" $ keydb-benchmark -r 10000 -n 10000 eval 'return redis.call(\"ping\")' 0\n\n"
|
||||||
" Fill a list with 10000 random elements:\n"
|
" Fill a list with 10000 random elements:\n"
|
||||||
" $ redis-benchmark -r 10000 -n 10000 lpush mylist __rand_int__\n\n"
|
" $ keydb-benchmark -r 10000 -n 10000 lpush mylist __rand_int__\n\n"
|
||||||
" On user specified command lines __rand_int__ is replaced with a random integer\n"
|
" On user specified command lines __rand_int__ is replaced with a random integer\n"
|
||||||
" with a range of values selected by the -r option.\n"
|
" with a range of values selected by the -r option.\n"
|
||||||
);
|
);
|
||||||
|
@ -328,7 +328,7 @@ err:
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* RDB check main: called form redis.c when Redis is executed with the
|
/* RDB check main: called form redis.c when Redis is executed with the
|
||||||
* redis-check-rdb alias, on during RDB loading errors.
|
* keydb-check-rdb alias, on during RDB loading errors.
|
||||||
*
|
*
|
||||||
* The function works in two ways: can be called with argc/argv as a
|
* The function works in two ways: can be called with argc/argv as a
|
||||||
* standalone executable, or called with a non NULL 'fp' argument if we
|
* standalone executable, or called with a non NULL 'fp' argument if we
|
||||||
|
@ -573,14 +573,14 @@ static void cliOutputCommandHelp(struct commandHelp *help, int group) {
|
|||||||
static void cliOutputGenericHelp(void) {
|
static void cliOutputGenericHelp(void) {
|
||||||
sds version = cliVersion();
|
sds version = cliVersion();
|
||||||
printf(
|
printf(
|
||||||
"redis-cli %s\n"
|
"keydb-cli %s\n"
|
||||||
"To get help about Redis commands type:\n"
|
"To get help about Redis commands type:\n"
|
||||||
" \"help @<group>\" to get a list of commands in <group>\n"
|
" \"help @<group>\" to get a list of commands in <group>\n"
|
||||||
" \"help <command>\" for help on <command>\n"
|
" \"help <command>\" for help on <command>\n"
|
||||||
" \"help <tab>\" to get a list of possible help topics\n"
|
" \"help <tab>\" to get a list of possible help topics\n"
|
||||||
" \"quit\" to exit\n"
|
" \"quit\" to exit\n"
|
||||||
"\n"
|
"\n"
|
||||||
"To set redis-cli preferences:\n"
|
"To set keydb-cli preferences:\n"
|
||||||
" \":set hints\" enable online hints\n"
|
" \":set hints\" enable online hints\n"
|
||||||
" \":set nohints\" disable online hints\n"
|
" \":set nohints\" disable online hints\n"
|
||||||
"Set your preferences in ~/.redisclirc\n",
|
"Set your preferences in ~/.redisclirc\n",
|
||||||
@ -1426,7 +1426,7 @@ static int parseOptions(int argc, char **argv) {
|
|||||||
CLUSTER_MANAGER_CMD_FLAG_CHECK_OWNERS;
|
CLUSTER_MANAGER_CMD_FLAG_CHECK_OWNERS;
|
||||||
} else if (!strcmp(argv[i],"-v") || !strcmp(argv[i], "--version")) {
|
} else if (!strcmp(argv[i],"-v") || !strcmp(argv[i], "--version")) {
|
||||||
sds version = cliVersion();
|
sds version = cliVersion();
|
||||||
printf("redis-cli %s\n", version);
|
printf("keydb-cli %s\n", version);
|
||||||
sdsfree(version);
|
sdsfree(version);
|
||||||
exit(0);
|
exit(0);
|
||||||
} else if (CLUSTER_MANAGER_MODE() && argv[i][0] != '-') {
|
} else if (CLUSTER_MANAGER_MODE() && argv[i][0] != '-') {
|
||||||
@ -1494,9 +1494,9 @@ static sds readArgFromStdin(void) {
|
|||||||
static void usage(void) {
|
static void usage(void) {
|
||||||
sds version = cliVersion();
|
sds version = cliVersion();
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"redis-cli %s\n"
|
"keydb-cli %s\n"
|
||||||
"\n"
|
"\n"
|
||||||
"Usage: redis-cli [OPTIONS] [cmd [arg [arg ...]]]\n"
|
"Usage: keydb-cli [OPTIONS] [cmd [arg [arg ...]]]\n"
|
||||||
" -h <hostname> Server hostname (default: 127.0.0.1).\n"
|
" -h <hostname> Server hostname (default: 127.0.0.1).\n"
|
||||||
" -p <port> Server port (default: 6379).\n"
|
" -p <port> Server port (default: 6379).\n"
|
||||||
" -s <socket> Server socket (overrides hostname and port).\n"
|
" -s <socket> Server socket (overrides hostname and port).\n"
|
||||||
@ -1562,16 +1562,16 @@ static void usage(void) {
|
|||||||
" Use --cluster help to list all available cluster manager commands.\n"
|
" Use --cluster help to list all available cluster manager commands.\n"
|
||||||
"\n"
|
"\n"
|
||||||
"Examples:\n"
|
"Examples:\n"
|
||||||
" cat /etc/passwd | redis-cli -x set mypasswd\n"
|
" cat /etc/passwd | keydb-cli -x set mypasswd\n"
|
||||||
" redis-cli get mypasswd\n"
|
" keydb-cli get mypasswd\n"
|
||||||
" redis-cli -r 100 lpush mylist x\n"
|
" keydb-cli -r 100 lpush mylist x\n"
|
||||||
" redis-cli -r 100 -i 1 info | grep used_memory_human:\n"
|
" keydb-cli -r 100 -i 1 info | grep used_memory_human:\n"
|
||||||
" redis-cli --eval myscript.lua key1 key2 , arg1 arg2 arg3\n"
|
" keydb-cli --eval myscript.lua key1 key2 , arg1 arg2 arg3\n"
|
||||||
" redis-cli --scan --pattern '*:12345*'\n"
|
" keydb-cli --scan --pattern '*:12345*'\n"
|
||||||
"\n"
|
"\n"
|
||||||
" (Note: when using --eval the comma separates KEYS[] from ARGV[] items)\n"
|
" (Note: when using --eval the comma separates KEYS[] from ARGV[] items)\n"
|
||||||
"\n"
|
"\n"
|
||||||
"When no command is given, redis-cli starts in interactive mode.\n"
|
"When no command is given, keydb-cli starts in interactive mode.\n"
|
||||||
"Type \"help\" in interactive mode for information on available commands\n"
|
"Type \"help\" in interactive mode for information on available commands\n"
|
||||||
"and settings.\n"
|
"and settings.\n"
|
||||||
"\n");
|
"\n");
|
||||||
@ -1656,12 +1656,12 @@ void cliSetPreferences(char **argv, int argc, int interactive) {
|
|||||||
if (!strcasecmp(argv[1],"hints")) pref.hints = 1;
|
if (!strcasecmp(argv[1],"hints")) pref.hints = 1;
|
||||||
else if (!strcasecmp(argv[1],"nohints")) pref.hints = 0;
|
else if (!strcasecmp(argv[1],"nohints")) pref.hints = 0;
|
||||||
else {
|
else {
|
||||||
printf("%sunknown redis-cli preference '%s'\n",
|
printf("%sunknown keydb-cli preference '%s'\n",
|
||||||
interactive ? "" : ".redisclirc: ",
|
interactive ? "" : ".redisclirc: ",
|
||||||
argv[1]);
|
argv[1]);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
printf("%sunknown redis-cli internal command '%s'\n",
|
printf("%sunknown keydb-cli internal command '%s'\n",
|
||||||
interactive ? "" : ".redisclirc: ",
|
interactive ? "" : ".redisclirc: ",
|
||||||
argv[0]);
|
argv[0]);
|
||||||
}
|
}
|
||||||
@ -1733,7 +1733,7 @@ static void repl(void) {
|
|||||||
repeat = strtol(argv[0], &endptr, 10);
|
repeat = strtol(argv[0], &endptr, 10);
|
||||||
if (argc > 1 && *endptr == '\0') {
|
if (argc > 1 && *endptr == '\0') {
|
||||||
if (errno == ERANGE || errno == EINVAL || repeat <= 0) {
|
if (errno == ERANGE || errno == EINVAL || repeat <= 0) {
|
||||||
fputs("Invalid redis-cli repeat command option value.\n", stdout);
|
fputs("Invalid keydb-cli repeat command option value.\n", stdout);
|
||||||
sdsfreesplitres(argv, argc);
|
sdsfreesplitres(argv, argc);
|
||||||
linenoiseFree(line);
|
linenoiseFree(line);
|
||||||
continue;
|
continue;
|
||||||
@ -4398,7 +4398,7 @@ static int clusterManagerFixOpenSlot(int slot) {
|
|||||||
} else {
|
} else {
|
||||||
unhandled_case:
|
unhandled_case:
|
||||||
success = 0;
|
success = 0;
|
||||||
clusterManagerLogErr("[ERR] Sorry, redis-cli can't fix this slot "
|
clusterManagerLogErr("[ERR] Sorry, keydb-cli can't fix this slot "
|
||||||
"yet (work in progress). Slot is set as "
|
"yet (work in progress). Slot is set as "
|
||||||
"migrating in %s, as importing in %s, "
|
"migrating in %s, as importing in %s, "
|
||||||
"owner is %s:%d\n", migrating_str,
|
"owner is %s:%d\n", migrating_str,
|
||||||
@ -4784,7 +4784,7 @@ static void clusterManagerPrintNotClusterNodeError(clusterManagerNode *node,
|
|||||||
clusterManagerLogErr("[ERR] Node %s:%d %s\n", node->ip, node->port, msg);
|
clusterManagerLogErr("[ERR] Node %s:%d %s\n", node->ip, node->port, msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Execute redis-cli in Cluster Manager mode */
|
/* Execute keydb-cli in Cluster Manager mode */
|
||||||
static void clusterManagerMode(clusterManagerCommandProc *proc) {
|
static void clusterManagerMode(clusterManagerCommandProc *proc) {
|
||||||
int argc = config.cluster_manager_command.argc;
|
int argc = config.cluster_manager_command.argc;
|
||||||
char **argv = config.cluster_manager_command.argv;
|
char **argv = config.cluster_manager_command.argv;
|
||||||
|
@ -84,7 +84,7 @@ def parse_options(cmd)
|
|||||||
end
|
end
|
||||||
|
|
||||||
def command_example(cmd, args, opts)
|
def command_example(cmd, args, opts)
|
||||||
cmd = "redis-cli --cluster #{cmd}"
|
cmd = "keydb-cli --cluster #{cmd}"
|
||||||
args.each{|a|
|
args.each{|a|
|
||||||
a = a.to_s
|
a = a.to_s
|
||||||
a = a.inspect if a[' ']
|
a = a.inspect if a[' ']
|
||||||
@ -104,26 +104,26 @@ end
|
|||||||
$command = ARGV.shift
|
$command = ARGV.shift
|
||||||
$opts, $args = parse_options($command) if $command
|
$opts, $args = parse_options($command) if $command
|
||||||
|
|
||||||
puts "WARNING: redis-trib.rb is not longer available!".yellow
|
puts "WARNING: keydb-trib.rb is not longer available!".yellow
|
||||||
puts "You should use #{'redis-cli'.bold} instead."
|
puts "You should use #{'keydb-cli'.bold} instead."
|
||||||
puts ''
|
puts ''
|
||||||
puts "All commands and features belonging to redis-trib.rb "+
|
puts "All commands and features belonging to keydb-trib.rb "+
|
||||||
"have been moved\nto redis-cli."
|
"have been moved\nto keydb-cli."
|
||||||
puts "In order to use them you should call redis-cli with the #{'--cluster'.bold}"
|
puts "In order to use them you should call keydb-cli with the #{'--cluster'.bold}"
|
||||||
puts "option followed by the subcommand name, arguments and options."
|
puts "option followed by the subcommand name, arguments and options."
|
||||||
puts ''
|
puts ''
|
||||||
puts "Use the following syntax:"
|
puts "Use the following syntax:"
|
||||||
puts "redis-cli --cluster SUBCOMMAND [ARGUMENTS] [OPTIONS]".bold
|
puts "keydb-cli --cluster SUBCOMMAND [ARGUMENTS] [OPTIONS]".bold
|
||||||
puts ''
|
puts ''
|
||||||
puts "Example:"
|
puts "Example:"
|
||||||
if $command
|
if $command
|
||||||
example = command_example $command, $args, $opts
|
example = command_example $command, $args, $opts
|
||||||
else
|
else
|
||||||
example = "redis-cli --cluster info 127.0.0.1:7000"
|
example = "keydb-cli --cluster info 127.0.0.1:7000"
|
||||||
end
|
end
|
||||||
puts example.bold
|
puts example.bold
|
||||||
puts ''
|
puts ''
|
||||||
puts "To get help about all subcommands, type:"
|
puts "To get help about all subcommands, type:"
|
||||||
puts "redis-cli --cluster help".bold
|
puts "keydb-cli --cluster help".bold
|
||||||
puts ''
|
puts ''
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -671,7 +671,7 @@ void syncCommand(client *c) {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
/* If a slave uses SYNC, we are dealing with an old implementation
|
/* If a slave uses SYNC, we are dealing with an old implementation
|
||||||
* of the replication protocol (like redis-cli --slave). Flag the client
|
* of the replication protocol (like keydb-cli --slave). Flag the client
|
||||||
* so that we don't expect to receive REPLCONF ACK feedbacks. */
|
* so that we don't expect to receive REPLCONF ACK feedbacks. */
|
||||||
c->flags |= CLIENT_PRE_PSYNC;
|
c->flags |= CLIENT_PRE_PSYNC;
|
||||||
}
|
}
|
||||||
|
34
src/server.c
34
src/server.c
@ -4466,19 +4466,19 @@ void version(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void usage(void) {
|
void usage(void) {
|
||||||
fprintf(stderr,"Usage: ./redis-server [/path/to/redis.conf] [options]\n");
|
fprintf(stderr,"Usage: ./keydb-server [/path/to/redis.conf] [options]\n");
|
||||||
fprintf(stderr," ./redis-server - (read config from stdin)\n");
|
fprintf(stderr," ./keydb-server - (read config from stdin)\n");
|
||||||
fprintf(stderr," ./redis-server -v or --version\n");
|
fprintf(stderr," ./keydb-server -v or --version\n");
|
||||||
fprintf(stderr," ./redis-server -h or --help\n");
|
fprintf(stderr," ./keydb-server -h or --help\n");
|
||||||
fprintf(stderr," ./redis-server --test-memory <megabytes>\n\n");
|
fprintf(stderr," ./keydb-server --test-memory <megabytes>\n\n");
|
||||||
fprintf(stderr,"Examples:\n");
|
fprintf(stderr,"Examples:\n");
|
||||||
fprintf(stderr," ./redis-server (run the server with default conf)\n");
|
fprintf(stderr," ./keydb-server (run the server with default conf)\n");
|
||||||
fprintf(stderr," ./redis-server /etc/redis/6379.conf\n");
|
fprintf(stderr," ./keydb-server /etc/redis/6379.conf\n");
|
||||||
fprintf(stderr," ./redis-server --port 7777\n");
|
fprintf(stderr," ./keydb-server --port 7777\n");
|
||||||
fprintf(stderr," ./redis-server --port 7777 --replicaof 127.0.0.1 8888\n");
|
fprintf(stderr," ./keydb-server --port 7777 --replicaof 127.0.0.1 8888\n");
|
||||||
fprintf(stderr," ./redis-server /etc/myredis.conf --loglevel verbose\n\n");
|
fprintf(stderr," ./keydb-server /etc/myredis.conf --loglevel verbose\n\n");
|
||||||
fprintf(stderr,"Sentinel mode:\n");
|
fprintf(stderr,"Sentinel mode:\n");
|
||||||
fprintf(stderr," ./redis-server /etc/sentinel.conf --sentinel\n");
|
fprintf(stderr," ./keydb-server /etc/sentinel.conf --sentinel\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4574,11 +4574,11 @@ void setupSignalHandlers(void) {
|
|||||||
void memtest(size_t megabytes, int passes);
|
void memtest(size_t megabytes, int passes);
|
||||||
|
|
||||||
/* Returns 1 if there is --sentinel among the arguments or if
|
/* Returns 1 if there is --sentinel among the arguments or if
|
||||||
* argv[0] contains "redis-sentinel". */
|
* argv[0] contains "keydb-sentinel". */
|
||||||
int checkForSentinelMode(int argc, char **argv) {
|
int checkForSentinelMode(int argc, char **argv) {
|
||||||
int j;
|
int j;
|
||||||
|
|
||||||
if (strstr(argv[0],"redis-sentinel") != NULL) return 1;
|
if (strstr(argv[0],"keydb-sentinel") != NULL) return 1;
|
||||||
for (j = 1; j < argc; j++)
|
for (j = 1; j < argc; j++)
|
||||||
if (!strcmp(argv[j],"--sentinel")) return 1;
|
if (!strcmp(argv[j],"--sentinel")) return 1;
|
||||||
return 0;
|
return 0;
|
||||||
@ -4806,12 +4806,12 @@ int main(int argc, char **argv) {
|
|||||||
initSentinel();
|
initSentinel();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check if we need to start in redis-check-rdb/aof mode. We just execute
|
/* Check if we need to start in keydb-check-rdb/aof mode. We just execute
|
||||||
* the program main. However the program is part of the Redis executable
|
* the program main. However the program is part of the Redis executable
|
||||||
* so that we can easily execute an RDB check on loading errors. */
|
* so that we can easily execute an RDB check on loading errors. */
|
||||||
if (strstr(argv[0],"redis-check-rdb") != NULL)
|
if (strstr(argv[0],"keydb-check-rdb") != NULL)
|
||||||
redis_check_rdb_main(argc,argv,NULL);
|
redis_check_rdb_main(argc,argv,NULL);
|
||||||
else if (strstr(argv[0],"redis-check-aof") != NULL)
|
else if (strstr(argv[0],"keydb-check-aof") != NULL)
|
||||||
redis_check_aof_main(argc,argv);
|
redis_check_aof_main(argc,argv);
|
||||||
|
|
||||||
if (argc >= 2) {
|
if (argc >= 2) {
|
||||||
@ -4830,7 +4830,7 @@ int main(int argc, char **argv) {
|
|||||||
exit(0);
|
exit(0);
|
||||||
} else {
|
} else {
|
||||||
fprintf(stderr,"Please specify the amount of memory to test in megabytes.\n");
|
fprintf(stderr,"Please specify the amount of memory to test in megabytes.\n");
|
||||||
fprintf(stderr,"Example: ./redis-server --test-memory 4096\n\n");
|
fprintf(stderr,"Example: ./keydb-server --test-memory 4096\n\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1994,7 +1994,7 @@ void sentinelTimer(void);
|
|||||||
char *sentinelHandleConfiguration(char **argv, int argc);
|
char *sentinelHandleConfiguration(char **argv, int argc);
|
||||||
void sentinelIsRunning(void);
|
void sentinelIsRunning(void);
|
||||||
|
|
||||||
/* redis-check-rdb & aof */
|
/* keydb-check-rdb & aof */
|
||||||
int redis_check_rdb(char *rdbfilename, FILE *fp);
|
int redis_check_rdb(char *rdbfilename, FILE *fp);
|
||||||
int redis_check_rdb_main(int argc, char **argv, FILE *fp);
|
int redis_check_rdb_main(int argc, char **argv, FILE *fp);
|
||||||
int redis_check_aof_main(int argc, char **argv);
|
int redis_check_aof_main(int argc, char **argv);
|
||||||
|
@ -73,7 +73,7 @@ test "Cluster consistency during live resharding" {
|
|||||||
flush stdout
|
flush stdout
|
||||||
set target [dict get [get_myself [randomInt 5]] id]
|
set target [dict get [get_myself [randomInt 5]] id]
|
||||||
set tribpid [lindex [exec \
|
set tribpid [lindex [exec \
|
||||||
../../../src/redis-cli --cluster reshard \
|
../../../src/keydb-cli --cluster reshard \
|
||||||
127.0.0.1:[get_instance_attrib redis 0 port] \
|
127.0.0.1:[get_instance_attrib redis 0 port] \
|
||||||
--cluster-from all \
|
--cluster-from all \
|
||||||
--cluster-to $target \
|
--cluster-to $target \
|
||||||
|
@ -31,7 +31,7 @@ test "Each master should have at least two replicas attached" {
|
|||||||
set master0_id [dict get [get_myself 0] id]
|
set master0_id [dict get [get_myself 0] id]
|
||||||
test "Resharding all the master #0 slots away from it" {
|
test "Resharding all the master #0 slots away from it" {
|
||||||
set output [exec \
|
set output [exec \
|
||||||
../../../src/redis-cli --cluster rebalance \
|
../../../src/keydb-cli --cluster rebalance \
|
||||||
127.0.0.1:[get_instance_attrib redis 0 port] \
|
127.0.0.1:[get_instance_attrib redis 0 port] \
|
||||||
--cluster-weight ${master0_id}=0 >@ stdout ]
|
--cluster-weight ${master0_id}=0 >@ stdout ]
|
||||||
}
|
}
|
||||||
@ -49,7 +49,7 @@ test "Resharding back some slot to master #0" {
|
|||||||
# new resharding.
|
# new resharding.
|
||||||
after 10000
|
after 10000
|
||||||
set output [exec \
|
set output [exec \
|
||||||
../../../src/redis-cli --cluster rebalance \
|
../../../src/keydb-cli --cluster rebalance \
|
||||||
127.0.0.1:[get_instance_attrib redis 0 port] \
|
127.0.0.1:[get_instance_attrib redis 0 port] \
|
||||||
--cluster-weight ${master0_id}=.01 \
|
--cluster-weight ${master0_id}=.01 \
|
||||||
--cluster-use-empty-masters >@ stdout]
|
--cluster-use-empty-masters >@ stdout]
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# Read the standard input and only shows dots in the output, filtering out
|
# Read the standard input and only shows dots in the output, filtering out
|
||||||
# all the other characters. Designed to avoid bufferization so that when
|
# all the other characters. Designed to avoid bufferization so that when
|
||||||
# we get the output of redis-trib and want to show just the dots, we'll see
|
# we get the output of keydb-trib and want to show just the dots, we'll see
|
||||||
# the dots as soon as redis-trib will output them.
|
# the dots as soon as keydb-trib will output them.
|
||||||
|
|
||||||
fconfigure stdin -buffering none
|
fconfigure stdin -buffering none
|
||||||
|
|
||||||
|
@ -38,9 +38,9 @@ if {[catch {cd tmp}]} {
|
|||||||
# the provided configuration file. Returns the PID of the process.
|
# the provided configuration file. Returns the PID of the process.
|
||||||
proc exec_instance {type cfgfile} {
|
proc exec_instance {type cfgfile} {
|
||||||
if {$type eq "redis"} {
|
if {$type eq "redis"} {
|
||||||
set prgname redis-server
|
set prgname keydb-server
|
||||||
} elseif {$type eq "sentinel"} {
|
} elseif {$type eq "sentinel"} {
|
||||||
set prgname redis-sentinel
|
set prgname keydb-sentinel
|
||||||
} else {
|
} else {
|
||||||
error "Unknown instance type."
|
error "Unknown instance type."
|
||||||
}
|
}
|
||||||
@ -179,7 +179,7 @@ proc pause_on_error {} {
|
|||||||
set cmd [lindex $argv 0]
|
set cmd [lindex $argv 0]
|
||||||
if {$cmd eq {continue}} {
|
if {$cmd eq {continue}} {
|
||||||
break
|
break
|
||||||
} elseif {$cmd eq {show-redis-logs}} {
|
} elseif {$cmd eq {show-keydb-logs}} {
|
||||||
set count 10
|
set count 10
|
||||||
if {[lindex $argv 1] ne {}} {set count [lindex $argv 1]}
|
if {[lindex $argv 1] ne {}} {set count [lindex $argv 1]}
|
||||||
foreach_redis_id id {
|
foreach_redis_id id {
|
||||||
@ -230,7 +230,7 @@ proc pause_on_error {} {
|
|||||||
} elseif {$cmd eq {help}} {
|
} elseif {$cmd eq {help}} {
|
||||||
puts "ls List Sentinel and Redis instances."
|
puts "ls List Sentinel and Redis instances."
|
||||||
puts "show-sentinel-logs \[N\] Show latest N lines of logs."
|
puts "show-sentinel-logs \[N\] Show latest N lines of logs."
|
||||||
puts "show-redis-logs \[N\] Show latest N lines of logs."
|
puts "show-keydb-logs \[N\] Show latest N lines of logs."
|
||||||
puts "S <id> cmd ... arg Call command in Sentinel <id>."
|
puts "S <id> cmd ... arg Call command in Sentinel <id>."
|
||||||
puts "R <id> cmd ... arg Call command in Redis <id>."
|
puts "R <id> cmd ... arg Call command in Redis <id>."
|
||||||
puts "SI <id> <field> Show Sentinel <id> INFO <field>."
|
puts "SI <id> <field> Show Sentinel <id> INFO <field>."
|
||||||
|
@ -14,7 +14,7 @@ tags {"aof"} {
|
|||||||
# was subsequently appended to the new AOF, resulting in duplicate commands.
|
# was subsequently appended to the new AOF, resulting in duplicate commands.
|
||||||
start_server_aof [list dir $server_path] {
|
start_server_aof [list dir $server_path] {
|
||||||
set client [redis [srv host] [srv port]]
|
set client [redis [srv host] [srv port]]
|
||||||
set bench [open "|src/redis-benchmark -q -p [srv port] -c 20 -n 20000 incr foo" "r+"]
|
set bench [open "|src/keydb-benchmark -q -p [srv port] -c 20 -n 20000 incr foo" "r+"]
|
||||||
after 100
|
after 100
|
||||||
|
|
||||||
# Benchmark should be running by now: start background rewrite
|
# Benchmark should be running by now: start background rewrite
|
||||||
|
@ -150,16 +150,16 @@ tags {"aof"} {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
## Test that redis-check-aof indeed sees this AOF is not valid
|
## Test that keydb-check-aof indeed sees this AOF is not valid
|
||||||
test "Short read: Utility should confirm the AOF is not valid" {
|
test "Short read: Utility should confirm the AOF is not valid" {
|
||||||
catch {
|
catch {
|
||||||
exec src/redis-check-aof $aof_path
|
exec src/keydb-check-aof $aof_path
|
||||||
} result
|
} result
|
||||||
assert_match "*not valid*" $result
|
assert_match "*not valid*" $result
|
||||||
}
|
}
|
||||||
|
|
||||||
test "Short read: Utility should be able to fix the AOF" {
|
test "Short read: Utility should be able to fix the AOF" {
|
||||||
set result [exec src/redis-check-aof --fix $aof_path << "y\n"]
|
set result [exec src/keydb-check-aof --fix $aof_path << "y\n"]
|
||||||
assert_match "*Successfully truncated AOF*" $result
|
assert_match "*Successfully truncated AOF*" $result
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# Issue 3899 regression test.
|
# Issue 3899 regression test.
|
||||||
# We create a chain of three instances: master -> slave -> slave2
|
# We create a chain of three instances: master -> slave -> slave2
|
||||||
# and continuously break the link while traffic is generated by
|
# and continuously break the link while traffic is generated by
|
||||||
# redis-benchmark. At the end we check that the data is the same
|
# keydb-benchmark. At the end we check that the data is the same
|
||||||
# everywhere.
|
# everywhere.
|
||||||
|
|
||||||
start_server {tags {"psync2"}} {
|
start_server {tags {"psync2"}} {
|
||||||
@ -36,7 +36,7 @@ start_server {} {
|
|||||||
}
|
}
|
||||||
|
|
||||||
set cycle_start_time [clock milliseconds]
|
set cycle_start_time [clock milliseconds]
|
||||||
set bench_pid [exec src/redis-benchmark -p $R_port(0) -n 10000000 -r 1000 incr __rand_int__ > /dev/null &]
|
set bench_pid [exec src/keydb-benchmark -p $R_port(0) -n 10000000 -r 1000 incr __rand_int__ > /dev/null &]
|
||||||
while 1 {
|
while 1 {
|
||||||
set elapsed [expr {[clock milliseconds]-$cycle_start_time}]
|
set elapsed [expr {[clock milliseconds]-$cycle_start_time}]
|
||||||
if {$elapsed > $duration*1000} break
|
if {$elapsed > $duration*1000} break
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
start_server {tags {"cli"}} {
|
start_server {tags {"cli"}} {
|
||||||
proc open_cli {} {
|
proc open_cli {} {
|
||||||
set ::env(TERM) dumb
|
set ::env(TERM) dumb
|
||||||
set fd [open [format "|src/redis-cli -p %d -n 9" [srv port]] "r+"]
|
set fd [open [format "|src/keydb-cli -p %d -n 9" [srv port]] "r+"]
|
||||||
fconfigure $fd -buffering none
|
fconfigure $fd -buffering none
|
||||||
fconfigure $fd -blocking false
|
fconfigure $fd -blocking false
|
||||||
fconfigure $fd -translation binary
|
fconfigure $fd -translation binary
|
||||||
@ -54,7 +54,7 @@ start_server {tags {"cli"}} {
|
|||||||
}
|
}
|
||||||
|
|
||||||
proc _run_cli {opts args} {
|
proc _run_cli {opts args} {
|
||||||
set cmd [format "src/redis-cli -p %d -n 9 $args" [srv port]]
|
set cmd [format "src/keydb-cli -p %d -n 9 $args" [srv port]]
|
||||||
foreach {key value} $opts {
|
foreach {key value} $opts {
|
||||||
if {$key eq "pipe"} {
|
if {$key eq "pipe"} {
|
||||||
set cmd "sh -c \"$value | $cmd\""
|
set cmd "sh -c \"$value | $cmd\""
|
||||||
|
@ -28,7 +28,7 @@ test "Crash the majority of Sentinels to prevent failovers for this unit" {
|
|||||||
test "SDOWN is triggered by non-responding but not crashed instance" {
|
test "SDOWN is triggered by non-responding but not crashed instance" {
|
||||||
lassign [S 4 SENTINEL GET-MASTER-ADDR-BY-NAME mymaster] host port
|
lassign [S 4 SENTINEL GET-MASTER-ADDR-BY-NAME mymaster] host port
|
||||||
ensure_master_up
|
ensure_master_up
|
||||||
exec ../../../src/redis-cli -h $host -p $port debug sleep 10 > /dev/null &
|
exec ../../../src/keydb-cli -h $host -p $port debug sleep 10 > /dev/null &
|
||||||
ensure_master_down
|
ensure_master_down
|
||||||
ensure_master_up
|
ensure_master_up
|
||||||
}
|
}
|
||||||
|
@ -212,11 +212,11 @@ proc start_server {options {code undefined}} {
|
|||||||
set stderr [format "%s/%s" [dict get $config "dir"] "stderr"]
|
set stderr [format "%s/%s" [dict get $config "dir"] "stderr"]
|
||||||
|
|
||||||
if {$::valgrind} {
|
if {$::valgrind} {
|
||||||
set pid [exec valgrind --track-origins=yes --suppressions=src/valgrind.sup --show-reachable=no --show-possibly-lost=no --leak-check=full src/redis-server $config_file > $stdout 2> $stderr &]
|
set pid [exec valgrind --track-origins=yes --suppressions=src/valgrind.sup --show-reachable=no --show-possibly-lost=no --leak-check=full src/keydb-server $config_file > $stdout 2> $stderr &]
|
||||||
} elseif ($::stack_logging) {
|
} elseif ($::stack_logging) {
|
||||||
set pid [exec /usr/bin/env MallocStackLogging=1 MallocLogFile=/tmp/malloc_log.txt src/redis-server $config_file > $stdout 2> $stderr &]
|
set pid [exec /usr/bin/env MallocStackLogging=1 MallocLogFile=/tmp/malloc_log.txt src/keydb-server $config_file > $stdout 2> $stderr &]
|
||||||
} else {
|
} else {
|
||||||
set pid [exec src/redis-server $config_file > $stdout 2> $stderr &]
|
set pid [exec src/keydb-server $config_file > $stdout 2> $stderr &]
|
||||||
}
|
}
|
||||||
|
|
||||||
# Tell the test server about this new instance.
|
# Tell the test server about this new instance.
|
||||||
|
@ -139,7 +139,7 @@ proc test {name code {okpattern undefined}} {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if {$::traceleaks} {
|
if {$::traceleaks} {
|
||||||
set output [exec leaks redis-server]
|
set output [exec leaks keydb-server]
|
||||||
if {![string match {*0 leaks*} $output]} {
|
if {![string match {*0 leaks*} $output]} {
|
||||||
send_data_packet $::test_server_fd err "Detected a memory leak in test '$name': $output"
|
send_data_packet $::test_server_fd err "Detected a memory leak in test '$name': $output"
|
||||||
}
|
}
|
||||||
|
@ -31,8 +31,8 @@ start_server {} {
|
|||||||
}
|
}
|
||||||
|
|
||||||
test {WAIT should not acknowledge 1 additional copy if slave is blocked} {
|
test {WAIT should not acknowledge 1 additional copy if slave is blocked} {
|
||||||
exec src/redis-cli -h $slave_host -p $slave_port debug sleep 5 > /dev/null 2> /dev/null &
|
exec src/keydb-cli -h $slave_host -p $slave_port debug sleep 5 > /dev/null 2> /dev/null &
|
||||||
after 1000 ;# Give redis-cli the time to execute the command.
|
after 1000 ;# Give keydb-cli the time to execute the command.
|
||||||
$master set foo 0
|
$master set foo 0
|
||||||
$master incr foo
|
$master incr foo
|
||||||
$master incr foo
|
$master incr foo
|
||||||
|
@ -15,11 +15,11 @@ proc avg vector {
|
|||||||
|
|
||||||
set samples {}
|
set samples {}
|
||||||
while 1 {
|
while 1 {
|
||||||
exec redis-cli -p $::fail_port debug sleep $::sleep_time > /dev/null &
|
exec keydb-cli -p $::fail_port debug sleep $::sleep_time > /dev/null &
|
||||||
|
|
||||||
# Wait for fail? to appear.
|
# Wait for fail? to appear.
|
||||||
while 1 {
|
while 1 {
|
||||||
set output [exec redis-cli -p $::other_port cluster nodes]
|
set output [exec keydb-cli -p $::other_port cluster nodes]
|
||||||
if {[string match {*fail\?*} $output]} break
|
if {[string match {*fail\?*} $output]} break
|
||||||
after 100
|
after 100
|
||||||
}
|
}
|
||||||
@ -29,7 +29,7 @@ while 1 {
|
|||||||
|
|
||||||
# Wait for fail? to disappear.
|
# Wait for fail? to disappear.
|
||||||
while 1 {
|
while 1 {
|
||||||
set output [exec redis-cli -p $::other_port cluster nodes]
|
set output [exec keydb-cli -p $::other_port cluster nodes]
|
||||||
if {![string match {*fail\?*} $output]} break
|
if {![string match {*fail\?*} $output]} break
|
||||||
after 100
|
after 100
|
||||||
}
|
}
|
||||||
@ -43,7 +43,7 @@ while 1 {
|
|||||||
puts "AVG([llength $samples]): [avg $samples]"
|
puts "AVG([llength $samples]): [avg $samples]"
|
||||||
|
|
||||||
# Wait for the instance to be available again.
|
# Wait for the instance to be available again.
|
||||||
exec redis-cli -p $::fail_port ping
|
exec keydb-cli -p $::fail_port ping
|
||||||
|
|
||||||
# Wait for the fail flag to be cleared.
|
# Wait for the fail flag to be cleared.
|
||||||
after 2000
|
after 2000
|
||||||
|
@ -15,7 +15,7 @@ To create a cluster, follow these steps:
|
|||||||
1. Edit create-cluster and change the start / end port, depending on the
|
1. Edit create-cluster and change the start / end port, depending on the
|
||||||
number of instances you want to create.
|
number of instances you want to create.
|
||||||
2. Use "./create-cluster start" in order to run the instances.
|
2. Use "./create-cluster start" in order to run the instances.
|
||||||
3. Use "./create-cluster create" in order to execute redis-cli --cluster create, so that
|
3. Use "./create-cluster create" in order to execute keydb-cli --cluster create, so that
|
||||||
an actual Redis cluster will be created.
|
an actual Redis cluster will be created.
|
||||||
4. Now you are ready to play with the cluster. AOF files and logs for each instances are created in the current directory.
|
4. Now you are ready to play with the cluster. AOF files and logs for each instances are created in the current directory.
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ then
|
|||||||
while [ $((PORT < ENDPORT)) != "0" ]; do
|
while [ $((PORT < ENDPORT)) != "0" ]; do
|
||||||
PORT=$((PORT+1))
|
PORT=$((PORT+1))
|
||||||
echo "Starting $PORT"
|
echo "Starting $PORT"
|
||||||
../../src/redis-server --port $PORT --cluster-enabled yes --cluster-config-file nodes-${PORT}.conf --cluster-node-timeout $TIMEOUT --appendonly yes --appendfilename appendonly-${PORT}.aof --dbfilename dump-${PORT}.rdb --logfile ${PORT}.log --daemonize yes
|
../../src/keydb-server --port $PORT --cluster-enabled yes --cluster-config-file nodes-${PORT}.conf --cluster-node-timeout $TIMEOUT --appendonly yes --appendfilename appendonly-${PORT}.aof --dbfilename dump-${PORT}.rdb --logfile ${PORT}.log --daemonize yes
|
||||||
done
|
done
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
@ -34,7 +34,7 @@ then
|
|||||||
PORT=$((PORT+1))
|
PORT=$((PORT+1))
|
||||||
HOSTS="$HOSTS 127.0.0.1:$PORT"
|
HOSTS="$HOSTS 127.0.0.1:$PORT"
|
||||||
done
|
done
|
||||||
../../src/redis-cli --cluster create $HOSTS --cluster-replicas $REPLICAS
|
../../src/keydb-cli --cluster create $HOSTS --cluster-replicas $REPLICAS
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -43,7 +43,7 @@ then
|
|||||||
while [ $((PORT < ENDPORT)) != "0" ]; do
|
while [ $((PORT < ENDPORT)) != "0" ]; do
|
||||||
PORT=$((PORT+1))
|
PORT=$((PORT+1))
|
||||||
echo "Stopping $PORT"
|
echo "Stopping $PORT"
|
||||||
../../src/redis-cli -p $PORT shutdown nosave
|
../../src/keydb-cli -p $PORT shutdown nosave
|
||||||
done
|
done
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
@ -54,7 +54,7 @@ then
|
|||||||
while [ 1 ]; do
|
while [ 1 ]; do
|
||||||
clear
|
clear
|
||||||
date
|
date
|
||||||
../../src/redis-cli -p $PORT cluster nodes | head -30
|
../../src/keydb-cli -p $PORT cluster nodes | head -30
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
exit 0
|
exit 0
|
||||||
@ -72,7 +72,7 @@ if [ "$1" == "call" ]
|
|||||||
then
|
then
|
||||||
while [ $((PORT < ENDPORT)) != "0" ]; do
|
while [ $((PORT < ENDPORT)) != "0" ]; do
|
||||||
PORT=$((PORT+1))
|
PORT=$((PORT+1))
|
||||||
../../src/redis-cli -p $PORT $2 $3 $4 $5 $6 $7 $8 $9
|
../../src/keydb-cli -p $PORT $2 $3 $4 $5 $6 $7 $8 $9
|
||||||
done
|
done
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
@ -94,7 +94,7 @@ fi
|
|||||||
|
|
||||||
echo "Usage: $0 [start|create|stop|watch|tail|clean]"
|
echo "Usage: $0 [start|create|stop|watch|tail|clean]"
|
||||||
echo "start -- Launch Redis Cluster instances."
|
echo "start -- Launch Redis Cluster instances."
|
||||||
echo "create -- Create a cluster using redis-cli --cluster create."
|
echo "create -- Create a cluster using keydb-cli --cluster create."
|
||||||
echo "stop -- Stop Redis Cluster instances."
|
echo "stop -- Stop Redis Cluster instances."
|
||||||
echo "watch -- Show CLUSTER NODES output (first 30 lines) of first node."
|
echo "watch -- Show CLUSTER NODES output (first 30 lines) of first node."
|
||||||
echo "tail <id> -- Run tail -f of instance at base port + ID."
|
echo "tail <id> -- Run tail -f of instance at base port + ID."
|
||||||
|
@ -53,7 +53,7 @@ def commands
|
|||||||
require "json"
|
require "json"
|
||||||
require "uri"
|
require "uri"
|
||||||
|
|
||||||
url = URI.parse "https://raw.githubusercontent.com/antirez/redis-doc/master/commands.json"
|
url = URI.parse "https://raw.githubusercontent.com/antirez/keydb-doc/master/commands.json"
|
||||||
client = Net::HTTP.new url.host, url.port
|
client = Net::HTTP.new url.host, url.port
|
||||||
client.use_ssl = true
|
client.use_ssl = true
|
||||||
response = client.get url.path
|
response = client.get url.path
|
||||||
|
@ -37,7 +37,7 @@
|
|||||||
# REDIS_CONFIG_FILE=/etc/redis/1234.conf \
|
# REDIS_CONFIG_FILE=/etc/redis/1234.conf \
|
||||||
# REDIS_LOG_FILE=/var/log/redis_1234.log \
|
# REDIS_LOG_FILE=/var/log/redis_1234.log \
|
||||||
# REDIS_DATA_DIR=/var/lib/redis/1234 \
|
# REDIS_DATA_DIR=/var/lib/redis/1234 \
|
||||||
# REDIS_EXECUTABLE=`command -v redis-server` ./utils/install_server.sh
|
# REDIS_EXECUTABLE=`command -v keydb-server` ./utils/install_server.sh
|
||||||
#
|
#
|
||||||
# This generates a redis config file and an /etc/init.d script, and installs them.
|
# This generates a redis config file and an /etc/init.d script, and installs them.
|
||||||
#
|
#
|
||||||
@ -116,7 +116,7 @@ fi
|
|||||||
if [ ! -x "$REDIS_EXECUTABLE" ] ; then
|
if [ ! -x "$REDIS_EXECUTABLE" ] ; then
|
||||||
_MANUAL_EXECUTION=true
|
_MANUAL_EXECUTION=true
|
||||||
#get the redis executable path
|
#get the redis executable path
|
||||||
_REDIS_EXECUTABLE=`command -v redis-server`
|
_REDIS_EXECUTABLE=`command -v keydb-server`
|
||||||
read -p "Please select the redis executable path [$_REDIS_EXECUTABLE] " REDIS_EXECUTABLE
|
read -p "Please select the redis executable path [$_REDIS_EXECUTABLE] " REDIS_EXECUTABLE
|
||||||
if [ ! -x "$REDIS_EXECUTABLE" ] ; then
|
if [ ! -x "$REDIS_EXECUTABLE" ] ; then
|
||||||
REDIS_EXECUTABLE=$_REDIS_EXECUTABLE
|
REDIS_EXECUTABLE=$_REDIS_EXECUTABLE
|
||||||
@ -129,9 +129,9 @@ if [ ! -x "$REDIS_EXECUTABLE" ] ; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
#check the default for redis cli
|
#check the default for redis cli
|
||||||
CLI_EXEC=`command -v redis-cli`
|
CLI_EXEC=`command -v keydb-cli`
|
||||||
if [ -z "$CLI_EXEC" ] ; then
|
if [ -z "$CLI_EXEC" ] ; then
|
||||||
CLI_EXEC=`dirname $REDIS_EXECUTABLE`"/redis-cli"
|
CLI_EXEC=`dirname $REDIS_EXECUTABLE`"/keydb-cli"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Selected config:"
|
echo "Selected config:"
|
||||||
|
@ -1,27 +1,27 @@
|
|||||||
# redis-copy.rb - Copyright (C) 2009-2010 Salvatore Sanfilippo
|
# keydb-copy.rb - Copyright (C) 2009-2010 Salvatore Sanfilippo
|
||||||
# BSD license, See the COPYING file for more information.
|
# BSD license, See the COPYING file for more information.
|
||||||
#
|
#
|
||||||
# Copy the whole dataset from one Redis instance to another one
|
# Copy the whole dataset from one Redis instance to another one
|
||||||
#
|
#
|
||||||
# WARNING: this utility is deprecated and serves as a legacy adapter
|
# WARNING: this utility is deprecated and serves as a legacy adapter
|
||||||
# for the more-robust redis-copy gem.
|
# for the more-robust keydb-copy gem.
|
||||||
|
|
||||||
require 'shellwords'
|
require 'shellwords'
|
||||||
|
|
||||||
def redisCopy(opts={})
|
def redisCopy(opts={})
|
||||||
src = "#{opts[:srchost]}:#{opts[:srcport]}"
|
src = "#{opts[:srchost]}:#{opts[:srcport]}"
|
||||||
dst = "#{opts[:dsthost]}:#{opts[:dstport]}"
|
dst = "#{opts[:dsthost]}:#{opts[:dstport]}"
|
||||||
`redis-copy #{src.shellescape} #{dst.shellescape}`
|
`keydb-copy #{src.shellescape} #{dst.shellescape}`
|
||||||
rescue Errno::ENOENT
|
rescue Errno::ENOENT
|
||||||
$stderr.puts 'This utility requires the redis-copy executable',
|
$stderr.puts 'This utility requires the keydb-copy executable',
|
||||||
'from the redis-copy gem on https://rubygems.org',
|
'from the keydb-copy gem on https://rubygems.org',
|
||||||
'To install it, run `gem install redis-copy`.'
|
'To install it, run `gem install keydb-copy`.'
|
||||||
exit 1
|
exit 1
|
||||||
end
|
end
|
||||||
|
|
||||||
$stderr.puts "This utility is deprecated. Use the redis-copy gem instead."
|
$stderr.puts "This utility is deprecated. Use the keydb-copy gem instead."
|
||||||
if ARGV.length != 4
|
if ARGV.length != 4
|
||||||
puts "Usage: redis-copy.rb <srchost> <srcport> <dsthost> <dstport>"
|
puts "Usage: keydb-copy.rb <srchost> <srcport> <dsthost> <dstport>"
|
||||||
exit 1
|
exit 1
|
||||||
end
|
end
|
||||||
puts "WARNING: it's up to you to FLUSHDB the destination host before to continue, press any key when ready."
|
puts "WARNING: it's up to you to FLUSHDB the destination host before to continue, press any key when ready."
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# redis-sha1.rb - Copyright (C) 2009 Salvatore Sanfilippo
|
# keydb-sha1.rb - Copyright (C) 2009 Salvatore Sanfilippo
|
||||||
# BSD license, See the COPYING file for more information.
|
# BSD license, See the COPYING file for more information.
|
||||||
#
|
#
|
||||||
# Performs the SHA1 sum of the whole datset.
|
# Performs the SHA1 sum of the whole datset.
|
||||||
|
@ -12,8 +12,8 @@
|
|||||||
### END INIT INFO
|
### END INIT INFO
|
||||||
|
|
||||||
REDISPORT=6379
|
REDISPORT=6379
|
||||||
EXEC=/usr/local/bin/redis-server
|
EXEC=/usr/local/bin/keydb-server
|
||||||
CLIEXEC=/usr/local/bin/redis-cli
|
CLIEXEC=/usr/local/bin/keydb-cli
|
||||||
|
|
||||||
PIDFILE=/var/run/redis_${REDISPORT}.pid
|
PIDFILE=/var/run/redis_${REDISPORT}.pid
|
||||||
CONF="/etc/redis/${REDISPORT}.conf"
|
CONF="/etc/redis/${REDISPORT}.conf"
|
||||||
|
@ -6,10 +6,10 @@ then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
TAG=$1
|
TAG=$1
|
||||||
TARNAME="redis-${TAG}.tar"
|
TARNAME="keydb-${TAG}.tar"
|
||||||
echo "Generating /tmp/${TARNAME}"
|
echo "Generating /tmp/${TARNAME}"
|
||||||
cd ~/hack/redis
|
cd ~/hack/redis
|
||||||
git archive $TAG --prefix redis-${TAG}/ > /tmp/$TARNAME || exit 1
|
git archive $TAG --prefix keydb-${TAG}/ > /tmp/$TARNAME || exit 1
|
||||||
echo "Gizipping the archive"
|
echo "Gizipping the archive"
|
||||||
rm -f /tmp/$TARNAME.gz
|
rm -f /tmp/$TARNAME.gz
|
||||||
gzip -9 /tmp/$TARNAME
|
gzip -9 /tmp/$TARNAME
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
echo "Uploading..."
|
echo "Uploading..."
|
||||||
scp /tmp/redis-${1}.tar.gz antirez@antirez.com:/var/virtual/download.redis.io/httpdocs/releases/
|
scp /tmp/keydb-${1}.tar.gz antirez@antirez.com:/var/virtual/download.redis.io/httpdocs/releases/
|
||||||
echo "Updating web site... (press any key if it is a stable release, or Ctrl+C)"
|
echo "Updating web site... (press any key if it is a stable release, or Ctrl+C)"
|
||||||
read x
|
read x
|
||||||
ssh antirez@antirez.com "cd /var/virtual/download.redis.io/httpdocs; ./update.sh ${1}"
|
ssh antirez@antirez.com "cd /var/virtual/download.redis.io/httpdocs; ./update.sh ${1}"
|
||||||
|
@ -6,7 +6,7 @@ then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
TAG=$1
|
TAG=$1
|
||||||
TARNAME="redis-${TAG}.tar.gz"
|
TARNAME="keydb-${TAG}.tar.gz"
|
||||||
DOWNLOADURL="http://download.redis.io/releases/${TARNAME}"
|
DOWNLOADURL="http://download.redis.io/releases/${TARNAME}"
|
||||||
|
|
||||||
ssh antirez@metal "export TERM=xterm;
|
ssh antirez@metal "export TERM=xterm;
|
||||||
@ -14,10 +14,10 @@ ssh antirez@metal "export TERM=xterm;
|
|||||||
rm -rf test_release_tmp_dir;
|
rm -rf test_release_tmp_dir;
|
||||||
cd test_release_tmp_dir;
|
cd test_release_tmp_dir;
|
||||||
rm -f $TARNAME;
|
rm -f $TARNAME;
|
||||||
rm -rf redis-${TAG};
|
rm -rf keydb-${TAG};
|
||||||
wget $DOWNLOADURL;
|
wget $DOWNLOADURL;
|
||||||
tar xvzf $TARNAME;
|
tar xvzf $TARNAME;
|
||||||
cd redis-${TAG};
|
cd keydb-${TAG};
|
||||||
make;
|
make;
|
||||||
./runtest;
|
./runtest;
|
||||||
./runtest-sentinel;
|
./runtest-sentinel;
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
SHA=$(curl -s http://download.redis.io/releases/redis-${1}.tar.gz | shasum -a 256 | cut -f 1 -d' ')
|
SHA=$(curl -s http://download.redis.io/releases/keydb-${1}.tar.gz | shasum -a 256 | cut -f 1 -d' ')
|
||||||
ENTRY="hash redis-${1}.tar.gz sha256 $SHA http://download.redis.io/releases/redis-${1}.tar.gz"
|
ENTRY="hash keydb-${1}.tar.gz sha256 $SHA http://download.redis.io/releases/keydb-${1}.tar.gz"
|
||||||
echo $ENTRY >> ~/hack/redis-hashes/README
|
echo $ENTRY >> ~/hack/keydb-hashes/README
|
||||||
vi ~/hack/redis-hashes/README
|
vi ~/hack/keydb-hashes/README
|
||||||
echo "Press any key to commit, Ctrl-C to abort)."
|
echo "Press any key to commit, Ctrl-C to abort)."
|
||||||
read yes
|
read yes
|
||||||
(cd ~/hack/redis-hashes; git commit -a -m "${1} hash."; git push)
|
(cd ~/hack/keydb-hashes; git commit -a -m "${1} hash."; git push)
|
||||||
|
@ -20,15 +20,15 @@ proc run-tests branches {
|
|||||||
exec -ignorestderr make 2> /dev/null
|
exec -ignorestderr make 2> /dev/null
|
||||||
|
|
||||||
if {$branch_id == 0} {
|
if {$branch_id == 0} {
|
||||||
puts " copy redis-benchmark from unstable to /tmp..."
|
puts " copy keydb-benchmark from unstable to /tmp..."
|
||||||
exec -ignorestderr cp ./redis-benchmark /tmp
|
exec -ignorestderr cp ./keydb-benchmark /tmp
|
||||||
incr branch_id
|
incr branch_id
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
# Start the Redis server
|
# Start the Redis server
|
||||||
puts " starting the server... [exec ./redis-server -v]"
|
puts " starting the server... [exec ./keydb-server -v]"
|
||||||
set pids [exec echo "port $::port\nloglevel warning\n" | ./redis-server - > /dev/null 2> /dev/null &]
|
set pids [exec echo "port $::port\nloglevel warning\n" | ./keydb-server - > /dev/null 2> /dev/null &]
|
||||||
puts " pids: $pids"
|
puts " pids: $pids"
|
||||||
after 1000
|
after 1000
|
||||||
puts " running the benchmark"
|
puts " running the benchmark"
|
||||||
@ -38,7 +38,7 @@ proc run-tests branches {
|
|||||||
puts " redis INFO shows version: [lindex [split $i] 0]"
|
puts " redis INFO shows version: [lindex [split $i] 0]"
|
||||||
$r close
|
$r close
|
||||||
|
|
||||||
set output [exec /tmp/redis-benchmark -n $::requests -t $::tests -d $::datasize --csv -p $::port]
|
set output [exec /tmp/keydb-benchmark -n $::requests -t $::tests -d $::datasize --csv -p $::port]
|
||||||
lappend runs $b $output
|
lappend runs $b $output
|
||||||
puts " killing server..."
|
puts " killing server..."
|
||||||
catch {exec kill -9 [lindex $pids 0]}
|
catch {exec kill -9 [lindex $pids 0]}
|
||||||
@ -83,7 +83,7 @@ proc combine-results {results} {
|
|||||||
}
|
}
|
||||||
|
|
||||||
proc main {} {
|
proc main {} {
|
||||||
# Note: the first branch is only used in order to get the redis-benchmark
|
# Note: the first branch is only used in order to get the keydb-benchmark
|
||||||
# executable. Tests are performed starting from the second branch.
|
# executable. Tests are performed starting from the second branch.
|
||||||
set branches {
|
set branches {
|
||||||
slowset 2.2.0 2.4.0 unstable slowset
|
slowset 2.2.0 2.4.0 unstable slowset
|
||||||
|
Loading…
x
Reference in New Issue
Block a user