Unverified Commit 3f14bfd8 authored by Loris Cro's avatar Loris Cro Committed by GitHub
Browse files

Merge pull request #1 from antirez/unstable

update to latest unstable
parents 8ea4bdd9 720d1fd3
...@@ -355,12 +355,12 @@ start_server {tags {"stream"} overrides {appendonly yes stream-node-max-entries ...@@ -355,12 +355,12 @@ start_server {tags {"stream"} overrides {appendonly yes stream-node-max-entries
r XADD mystream * xitem v r XADD mystream * xitem v
} }
r XTRIM mystream MAXLEN ~ 85 r XTRIM mystream MAXLEN ~ 85
assert {[r xlen mystream] == 89} assert {[r xlen mystream] == 90}
r config set stream-node-max-entries 1 r config set stream-node-max-entries 1
r debug loadaof r debug loadaof
r XADD mystream * xitem v r XADD mystream * xitem v
incr j incr j
assert {[r xlen mystream] == 90} assert {[r xlen mystream] == 91}
} }
} }
......
source tests/support/cli.tcl
start_server {tags {"wait"}} { start_server {tags {"wait"}} {
start_server {} { start_server {} {
set slave [srv 0 client] set slave [srv 0 client]
...@@ -31,7 +33,8 @@ start_server {} { ...@@ -31,7 +33,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 & set cmd [rediscli $slave_port "-h $slave_host debug sleep 5"]
exec {*}$cmd > /dev/null 2> /dev/null &
after 1000 ;# Give redis-cli the time to execute the command. after 1000 ;# Give redis-cli the time to execute the command.
$master set foo 0 $master set foo 0
$master incr foo $master incr foo
......
...@@ -16,7 +16,7 @@ To create a cluster, follow these steps: ...@@ -16,7 +16,7 @@ To create a cluster, follow these steps:
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 redis-cli --cluster create, so that
an actual Redis cluster will be created. an actual Redis cluster will be created. (If you're accessing your setup via a local container, ensure that the CLUSTER_HOST value is changed to your local IP)
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.
In order to stop a cluster: In order to stop a cluster:
......
#!/bin/bash #!/bin/bash
# Settings # Settings
CLUSTER_HOST=127.0.0.1
PORT=30000 PORT=30000
TIMEOUT=2000 TIMEOUT=2000
NODES=6 NODES=6
REPLICAS=1 REPLICAS=1
PROTECTED_MODE=yes
# You may want to put the above config parameters into config.sh in order to # You may want to put the above config parameters into config.sh in order to
# override the defaults without modifying this script. # override the defaults without modifying this script.
...@@ -22,7 +24,7 @@ then ...@@ -22,7 +24,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/redis-server --port $PORT --protected-mode $PROTECTED_MODE --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
...@@ -32,7 +34,7 @@ then ...@@ -32,7 +34,7 @@ then
HOSTS="" HOSTS=""
while [ $((PORT < ENDPORT)) != "0" ]; do while [ $((PORT < ENDPORT)) != "0" ]; do
PORT=$((PORT+1)) PORT=$((PORT+1))
HOSTS="$HOSTS 127.0.0.1:$PORT" HOSTS="$HOSTS $CLUSTER_HOST:$PORT"
done done
../../src/redis-cli --cluster create $HOSTS --cluster-replicas $REPLICAS ../../src/redis-cli --cluster create $HOSTS --cluster-replicas $REPLICAS
exit 0 exit 0
......
#!/bin/bash
mkdir -p tests/tls
openssl genrsa -out tests/tls/ca.key 4096
openssl req \
-x509 -new -nodes -sha256 \
-key tests/tls/ca.key \
-days 3650 \
-subj '/O=Redis Test/CN=Certificate Authority' \
-out tests/tls/ca.crt
openssl genrsa -out tests/tls/redis.key 2048
openssl req \
-new -sha256 \
-key tests/tls/redis.key \
-subj '/O=Redis Test/CN=Server' | \
openssl x509 \
-req -sha256 \
-CA tests/tls/ca.crt \
-CAkey tests/tls/ca.key \
-CAserial tests/tls/ca.txt \
-CAcreateserial \
-days 365 \
-out tests/tls/redis.crt
openssl dhparam -out tests/tls/redis.dh 2048
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment