Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Rename redis-server to thredis-server and change redis to thredis in a

few places to make it less confusing when running both alongside.
  • Loading branch information...
commit de075e89ed9c32d9dc68591779b1dd0a8deabae1 1 parent 94810be
@grisha authored
View
22 README
@@ -1,4 +1,12 @@
+What is Thredis?
+----------------
+
+Thredis is Threaded Redis. Thredis is for the most part identical to
+Redis. There are a few differences in how it works inherent from it
+processing requests in parallel. Those differences and more
+information specific to Thredis is outlined in README-THREDIS.
+
Where to find complete Redis documentation?
-------------------------------------------
@@ -62,27 +70,27 @@ Running Redis
To run Redis with the default configuration just type:
% cd src
- % ./redis-server
+ % ./thredis-server
-If you want to provide your redis.conf, you have to run it using an additional
+If you want to provide your thredis.conf, you have to run it using an additional
parameter (the path of the configuration file):
% cd src
- % ./redis-server /path/to/redis.conf
+ % ./thredis-server /path/to/thredis.conf
It is possible to alter the Redis configuration passing parameters directly
as options using the command line. Examples:
- % ./redis-server --port 9999 --slaveof 127.0.0.1 6379
- % ./redis-server /etc/redis/6379.conf --loglevel debug
+ % ./thredis-server --port 9999 --slaveof 127.0.0.1 6379
+ % ./thredis-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 thredis.conf are also supported as options using the command
line, with exactly the same name.
Playing with Redis
------------------
-You can use redis-cli to play with Redis. Start a redis-server instance,
+You can use redis-cli to play with Redis. Start a thredis-server instance,
then in another terminal try the following:
% cd src
View
5 README-THREDIS
@@ -8,6 +8,11 @@ contains many bugs and in need of much improvement, but should be
sufficient as proof-of-concept to toy around with. Use at your own
risk.
+Thredis is for the most part identical to Redis. We did rename the
+executable to thredis-server so that it looks different from
+redis-server when running ps, etc.
+
+
Problem
If you're using Redis for complex operations (such as big ZUNION
View
2  deps/hiredis/Makefile
@@ -89,7 +89,7 @@ check: hiredis-test
"port 56379\n" \
"bind 127.0.0.1\n" \
"unixsocket /tmp/hiredis-test-redis.sock" \
- | redis-server -
+ | thredis-server -
./hiredis-test -h 127.0.0.1 -p 56379 -s /tmp/hiredis-test-redis.sock || \
( kill `cat /tmp/hiredis-test-redis.pid` && false )
kill `cat /tmp/hiredis-test-redis.pid`
View
4 src/Makefile
@@ -97,7 +97,7 @@ QUIET_LINK = @printf ' %b %b\n' $(LINKCOLOR)LINK$(ENDCOLOR) $(BINCOLOR)$@$(EN
QUIET_INSTALL = @printf ' %b %b\n' $(LINKCOLOR)INSTALL$(ENDCOLOR) $(BINCOLOR)$@$(ENDCOLOR) 1>&2;
endif
-REDIS_SERVER_NAME= redis-server
+REDIS_SERVER_NAME= thredis-server
REDIS_SENTINEL_NAME= redis-sentinel
REDIS_SERVER_OBJ= adlist.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 migrate.o endianconv.o slowlog.o scripting.o bio.o rio.o rand.o memtest.o crc64.o bitops.o sentinel.o threadpool.o
REDIS_CLI_NAME= redis-cli
@@ -152,7 +152,7 @@ ifneq ($(strip $(PREV_FINAL_LDFLAGS)), $(strip $(FINAL_LDFLAGS)))
.make-prerequisites: persist-settings
endif
-# redis-server
+# thredis-server
$(REDIS_SERVER_NAME): $(REDIS_SERVER_OBJ)
$(REDIS_LD) -o $@ $^ ../deps/hiredis/libhiredis.a ../deps/lua/src/liblua.a $(FINAL_LIBS)
View
2  src/asciilogo.h
@@ -30,7 +30,7 @@
char *ascii_logo =
" _._ \n"
" _.-``__ ''-._ \n"
-" _.-`` `. `_. ''-._ Redis %s (%s/%d) %s bit\n"
+" _.-`` `. `_. ''-._ Thredis %s (%s/%d) %s bit\n"
" .-`` .-```. ```\\/ _.,_ ''-._ \n"
" ( ' , .-` | `, ) Running in %s mode\n"
" |`-._`-...-` __...-.``-._|'` _.-'| Port: %d\n"
View
2  src/debug.c
@@ -704,7 +704,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"
" Please report the crash opening an issue on github:\n\n"
" http://github.com/antirez/redis/issues\n\n"
-" Suspect RAM error? Use redis-server --test-memory to veryfy it.\n\n"
+" Suspect RAM error? Use thredis-server --test-memory to veryfy it.\n\n"
);
/* free(messages); Don't call free() with possibly corrupted memory. */
if (server.daemonize) unlink(server.pidfile);
View
26 src/redis.c
@@ -1193,7 +1193,7 @@ void initServerConfig() {
/* Command table -- we intiialize it here as it is part of the
* initial configuration, since command names may be changed via
- * redis.conf using the rename-command directive. */
+ * thredis.conf using the rename-command directive. */
server.commands = dictCreate(&commandTableDictType,NULL);
populateCommandTable();
server.delCommand = lookupCommandByCString("del");
@@ -2589,19 +2589,19 @@ void version() {
}
void usage() {
- fprintf(stderr,"Usage: ./redis-server [/path/to/redis.conf] [options]\n");
- fprintf(stderr," ./redis-server - (read config from stdin)\n");
- fprintf(stderr," ./redis-server -v or --version\n");
- fprintf(stderr," ./redis-server -h or --help\n");
- fprintf(stderr," ./redis-server --test-memory <megabytes>\n\n");
+ fprintf(stderr,"Usage: ./thredis-server [/path/to/thredis.conf] [options]\n");
+ fprintf(stderr," ./thredis-server - (read config from stdin)\n");
+ fprintf(stderr," ./thredis-server -v or --version\n");
+ fprintf(stderr," ./thredis-server -h or --help\n");
+ fprintf(stderr," ./thredis-server --test-memory <megabytes>\n\n");
fprintf(stderr,"Examples:\n");
- fprintf(stderr," ./redis-server (run the server with default conf)\n");
- fprintf(stderr," ./redis-server /etc/redis/6379.conf\n");
- fprintf(stderr," ./redis-server --port 7777\n");
- fprintf(stderr," ./redis-server --port 7777 --slaveof 127.0.0.1 8888\n");
- fprintf(stderr," ./redis-server /etc/myredis.conf --loglevel verbose\n\n");
+ fprintf(stderr," ./thredis-server (run the server with default conf)\n");
+ fprintf(stderr," ./thredis-server /etc/redis/6379.conf\n");
+ fprintf(stderr," ./thredis-server --port 7777\n");
+ fprintf(stderr," ./thredis-server --port 7777 --slaveof 127.0.0.1 8888\n");
+ fprintf(stderr," ./thredis-server /etc/mythredis.conf --loglevel verbose\n\n");
fprintf(stderr,"Sentinel mode:\n");
- fprintf(stderr," ./redis-server /etc/sentinel.conf --sentinel\n");
+ fprintf(stderr," ./thredis-server /etc/sentinel.conf --sentinel\n");
exit(1);
}
@@ -2725,7 +2725,7 @@ int main(int argc, char **argv) {
exit(0);
} else {
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: ./thredis-server --test-memory 4096\n\n");
exit(1);
}
}
View
2  tests/assets/default.conf
@@ -137,7 +137,7 @@ slave-serve-stale-data yes
# Require clients to issue AUTH <PASSWORD> before processing any other
# commands. This might be useful in environments in which you do not trust
-# others with access to the host running redis-server.
+# others with access to the host running thredis-server.
#
# This should stay commented out for backward compatibility and because most
# people do not need auth (e.g. they run their own servers).
View
2  tests/integration/replication-2.tcl
@@ -8,7 +8,7 @@ start_server {tags {"repl"}} {
test {MASTER and SLAVE dataset should be identical after complex ops} {
createComplexDataset r 10000
- after 500
+ after 10000
if {[r debug digest] ne [r -1 debug digest]} {
set csv1 [csvdump r]
set csv2 [csvdump {r -1}]
View
6 tests/support/server.tcl
@@ -169,7 +169,7 @@ proc start_server {options {code undefined}} {
}
# write new configuration to temporary file
- set config_file [tmpfile redis.conf]
+ set config_file [tmpfile thredis.conf]
set fp [open $config_file w+]
foreach directive [dict keys $config] {
puts -nonewline $fp "$directive "
@@ -181,9 +181,9 @@ proc start_server {options {code undefined}} {
set stderr [format "%s/%s" [dict get $config "dir"] "stderr"]
if {$::valgrind} {
- exec valgrind --suppressions=src/valgrind.sup --show-reachable=no --show-possibly-lost=no --leak-check=full src/redis-server $config_file > $stdout 2> $stderr &
+ exec valgrind --suppressions=src/valgrind.sup --show-reachable=no --show-possibly-lost=no --leak-check=full src/thredis-server $config_file > $stdout 2> $stderr &
} else {
- exec src/redis-server $config_file > $stdout 2> $stderr &
+ exec src/thredis-server $config_file > $stdout 2> $stderr &
}
# check that the server actually started
View
2  tests/support/test.tcl
@@ -146,7 +146,7 @@ proc test {name code {okpattern undefined}} {
}
if {$::traceleaks} {
- set output [exec leaks redis-server]
+ set output [exec leaks thredis-server]
if {![string match {*0 leaks*} $output]} {
send_data_packet $::test_server_fd err "Detected a memory leak in test '$name': $output"
}
View
2  tests/test_helper.tcl
@@ -155,7 +155,7 @@ proc s {args} {
proc cleanup {} {
if {!$::quiet} {puts -nonewline "Cleanup: may take some time... "}
flush stdout
- catch {exec rm -rf {*}[glob tests/tmp/redis.conf.*]}
+ catch {exec rm -rf {*}[glob tests/tmp/thredis.conf.*]}
catch {exec rm -rf {*}[glob tests/tmp/server.*]}
if {!$::quiet} {puts "OK"}
}
View
2  redis.conf → thredis.conf
@@ -220,7 +220,7 @@ slave-priority 100
# Require clients to issue AUTH <PASSWORD> before processing any other
# commands. This might be useful in environments in which you do not trust
-# others with access to the host running redis-server.
+# others with access to the host running thredis-server.
#
# This should stay commented out for backward compatibility and because most
# people do not need auth (e.g. they run their own servers).
View
12 utils/install_server.sh
@@ -57,7 +57,7 @@ if [ ! `echo $REDIS_PORT | egrep "^[0-9]+\$"` ] ; then
fi
#read the redis config file
-_REDIS_CONFIG_FILE="/etc/redis/$REDIS_PORT.conf"
+_REDIS_CONFIG_FILE="/etc/thredis/$REDIS_PORT.conf"
read -p "Please select the redis config file name [$_REDIS_CONFIG_FILE] " REDIS_CONFIG_FILE
if [ !"$REDIS_CONFIG_FILE" ] ; then
REDIS_CONFIG_FILE=$_REDIS_CONFIG_FILE
@@ -85,8 +85,8 @@ fi
mkdir -p $REDIS_DATA_DIR || die "Could not create redis data directory"
#get the redis executable path
-_REDIS_EXECUTABLE=`which redis-server`
-read -p "Please select the redis executable path [$_REDIS_EXECUTABLE] " REDIS_EXECUTABLE
+_REDIS_EXECUTABLE=`which thredis-server`
+read -p "Please select the thredis executable path [$_REDIS_EXECUTABLE] " REDIS_EXECUTABLE
if [ ! -f "$REDIS_EXECUTABLE" ] ; then
REDIS_EXECUTABLE=$_REDIS_EXECUTABLE
@@ -100,10 +100,10 @@ fi
#render the tmplates
TMP_FILE="/tmp/$REDIS_PORT.conf"
-DEFAULT_CONFIG="../redis.conf"
+DEFAULT_CONFIG="../thredis.conf"
INIT_TPL_FILE="./redis_init_script.tpl"
-INIT_SCRIPT_DEST="/etc/init.d/redis_$REDIS_PORT"
-PIDFILE="/var/run/redis_$REDIS_PORT.pid"
+INIT_SCRIPT_DEST="/etc/init.d/thredis_$REDIS_PORT"
+PIDFILE="/var/run/thredis_$REDIS_PORT.pid"
View
6 utils/redis_init_script
@@ -4,7 +4,7 @@
# as it does use of the /proc filesystem.
REDISPORT=6379
-EXEC=/usr/local/bin/redis-server
+EXEC=/usr/local/bin/thredis-server
CLIEXEC=/usr/local/bin/redis-cli
PIDFILE=/var/run/redis_${REDISPORT}.pid
@@ -16,7 +16,7 @@ case "$1" in
then
echo "$PIDFILE exists, process is already running or crashed"
else
- echo "Starting Redis server..."
+ echo "Starting Thredis server..."
$EXEC $CONF
fi
;;
@@ -30,7 +30,7 @@ case "$1" in
$CLIEXEC -p $REDISPORT shutdown
while [ -x /proc/${PID} ]
do
- echo "Waiting for Redis to shutdown ..."
+ echo "Waiting for Thredis to shutdown ..."
sleep 1
done
echo "Redis stopped"
View
4 utils/speed-regression.tcl
@@ -27,8 +27,8 @@ proc run-tests branches {
}
# Start the Redis server
- puts " starting the server... [exec ./redis-server -v]"
- set pids [exec echo "port $::port\nloglevel warning\n" | ./redis-server - > /dev/null 2> /dev/null &]
+ puts " starting the server... [exec ./thredis-server -v]"
+ set pids [exec echo "port $::port\nloglevel warning\n" | ./thredis-server - > /dev/null 2> /dev/null &]
puts " pids: $pids"
after 1000
puts " running the benchmark"
View
2  utils/whatisdoing.sh
@@ -3,7 +3,7 @@
#!/bin/bash
nsamples=1
sleeptime=0
-pid=$(pidof redis-server)
+pid=$(pidof thredis-server)
for x in $(seq 1 $nsamples)
do
Please sign in to comment.
Something went wrong with that request. Please try again.