-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Adding RedisCluster client to support Redis Cluster Mode #1660
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
39 commits
Select commit
Hold shift + click to select a range
9c2e299
Added RedisCluster client to support Redis Cluster mode
barshaul 40a5893
Moved timesteries tests to a class
barshaul 45fb030
starting to clean the docs (#1657)
chayim f38deec
Adding vulture for static analysis (#1655)
chayim ac378a9
Added boolean parsing to PEXPIRE and PEXPIREAT (#1665)
WisdomPill 62a8956
Improved JSON accuracy (#1666)
chayim 00f683b
Merge from redis-py/master
barshaul e8688ef
Added two new marks: onlycluster to mark tests to be run only with cl…
barshaul 63a59b0
Merge branch 'master' into master
barshaul f4cc29f
Resolving PR comments
barshaul 10b8098
Merge branch 'master' of https://github.com/barshaul/redis-py
barshaul d7fbec1
Resolving PR comments
barshaul b37ac86
Merging from redis:master
barshaul cd056e3
Merging from redis:master
barshaul 04b944c
Merge from upstream
barshaul 6a71af8
Added/marked command tests for cluster mode
barshaul 3a437c3
Merge branch 'redis:master' into master
barshaul b6eebed
Merge branch 'master' of https://github.com/barshaul/redis-py
barshaul 37a67bf
Adjusted the cluster's pubsub tests to keep the pubsub node connectio…
barshaul 285e3f0
Added a default cluster node and changed the default behvior of all n…
barshaul 7241459
merging from upstream
barshaul d5fd43f
Merge branch 'redis-master'
barshaul 8124a2b
Added ClusterPipeline documentation and tests
barshaul 4be2235
Merge branch 'redis:master' into master
barshaul e521f22
Merge branch 'master' of https://github.com/barshaul/redis-py
barshaul 608949c
fixed install_and_test.sh pytest command to include markers and clust…
barshaul 85aff46
Added support for RedisCluster to pass redis URL without a port and s…
barshaul a632159
Added ignore test files to the codecov configurations
barshaul 854a065
Fixed codecov ignore tests configuration
barshaul be2bb6c
Merged from upstream
barshaul a82931a
Merge branch 'redis-master'
barshaul d6d2d29
Added coverage unique names to the Redis's and ClusterRedis's codecov…
barshaul c0226b0
Rolled back test_sentinel.py changes. Removed the tests folder from t…
barshaul 5e00f23
Merge branch 'redis:master' into master
barshaul c7d5d1c
Merging from upstream
barshaul a05e327
Merge branch 'redist push origin master-master'
barshaul 78b48ea
Merge branch 'master' of https://github.com/barshaul/redis-py
barshaul d5c14c8
Increased pubsub wait for response timeout to fix flaky tests
barshaul bf3d21d
Added client kill filter tests for cluster mode
barshaul File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
FROM redis:6.2.6-buster | ||
|
||
COPY create_cluster.sh /create_cluster.sh | ||
RUN chmod +x /create_cluster.sh | ||
|
||
EXPOSE 16379 16380 16381 16382 16383 16384 | ||
|
||
CMD [ "/create_cluster.sh"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#! /bin/bash | ||
mkdir -p /nodes | ||
touch /nodes/nodemap | ||
for PORT in $(seq 16379 16384); do | ||
mkdir -p /nodes/$PORT | ||
if [[ -e /redis.conf ]]; then | ||
cp /redis.conf /nodes/$PORT/redis.conf | ||
else | ||
touch /nodes/$PORT/redis.conf | ||
fi | ||
cat << EOF >> /nodes/$PORT/redis.conf | ||
port ${PORT} | ||
cluster-enabled yes | ||
daemonize yes | ||
logfile /redis.log | ||
dir /nodes/$PORT | ||
EOF | ||
redis-server /nodes/$PORT/redis.conf | ||
barshaul marked this conversation as resolved.
Show resolved
Hide resolved
|
||
if [ $? -ne 0 ]; then | ||
echo "Redis failed to start, exiting." | ||
exit 3 | ||
fi | ||
echo 127.0.0.1:$PORT >> /nodes/nodemap | ||
done | ||
echo yes | redis-cli --cluster create $(seq -f 127.0.0.1:%g 16379 16384) --cluster-replicas 1 | ||
barshaul marked this conversation as resolved.
Show resolved
Hide resolved
|
||
tail -f /redis.log |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Redis Cluster config file will be shared across all nodes. | ||
# Do not change the following configurations that are already set: | ||
# port, cluster-enabled, daemonize, logfile, dir |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.