-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Fix materialize bug with RedisCluster #2311
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
35 commits
Select commit
Hold shift + click to select a range
4134113
Fix materialization bug
kevjumba 926260b
oops removed something when i was copy pasting
kevjumba b4e9ac0
Test github workflow
kevjumba 1281b2d
lint
kevjumba b404f4f
transfer to unit_tests
kevjumba f8dab19
Brute force implementation
kevjumba c05d2b2
Brute force implementation add gcc
kevjumba e53c75b
Brute force implementation add gcc
kevjumba eafc27d
Brute force implementation add gcc
kevjumba bbbb325
Brute force implementation add gcc
kevjumba ac08a7b
Continue fixing...
kevjumba fbb8b08
Remove gcc setup
kevjumba ef14ff4
Add integration test
kevjumba 9916649
fix error
kevjumba 6b82098
fix error
kevjumba 89c1da8
Add setup
kevjumba 0e9f1b3
temp fix to get integration tests to work
kevjumba ca3aa7b
temp fix to get integration tests to work
kevjumba 03f76f1
temp fix to get integration tests to work
kevjumba 6aeb5f4
temp fix to get integration tests to work
kevjumba c32ed21
Fix integration even more
kevjumba 68c9b61
Fix integration even more
kevjumba caeb757
Fix lint
kevjumba 8b9f2f1
only run one test
kevjumba 1f060e0
Do some more integration testing
kevjumba 931dc23
Do some more integration testing by adding bug to make sure no false …
kevjumba 41f7c75
Integration testing works
kevjumba 174af8e
Clean upu code
kevjumba d818c0a
Add redis cluster script for starting a redis cluster
kevjumba b2903f8
Reset integration yml file
kevjumba 0b5dabd
lint
kevjumba 1a4a155
Clean up
kevjumba 52f239d
Fix how to guide lint
kevjumba a21e13f
add fixtures and remove excess code
kevjumba 9c59fcc
lint
kevjumba 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,97 @@ | ||
| # Settings | ||
| # Make sure you run "brew install redis" | ||
|
|
||
| # BIN_PATH="/opt/homebrew/bin" | ||
| REDIS_CLI=`which redis-cli` | ||
| REDIS_SERVER=`which redis-server` | ||
| CLUSTER_HOST=127.0.0.1 | ||
| # Creates a cluster at ports 6001-6006 with 3 masters 6001-6003 and 3 slaves 6004-6006 | ||
| PORT=${2:-6000} | ||
| TIMEOUT=2000 | ||
| NODES=6 | ||
| REPLICAS=1 | ||
| PROTECTED_MODE=yes | ||
| ADDITIONAL_OPTIONS="" | ||
|
|
||
| if [ -a config.sh ] | ||
| then | ||
| source "config.sh" | ||
| fi | ||
|
|
||
| # Computed vars | ||
| ENDPORT=$((PORT+NODES)) | ||
|
|
||
| if [ "$1" == "start" ] | ||
| then | ||
| while [ $((PORT < ENDPORT)) != "0" ]; do | ||
| PORT=$((PORT+1)) | ||
| echo "Starting $PORT" | ||
| $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 ${ADDITIONAL_OPTIONS} | ||
| done | ||
| exit 0 | ||
| fi | ||
|
|
||
| if [ "$1" == "create" ] | ||
| then | ||
| HOSTS="" | ||
| while [ $((PORT < ENDPORT)) != "0" ]; do | ||
| PORT=$((PORT+1)) | ||
| HOSTS="$HOSTS $CLUSTER_HOST:$PORT" | ||
| done | ||
| OPT_ARG="" | ||
| if [ "$2" == "-f" ]; then | ||
| OPT_ARG="--cluster-yes" | ||
| fi | ||
| $REDIS_CLI --cluster create $HOSTS --cluster-replicas $REPLICAS $OPT_ARG | ||
| exit 0 | ||
| fi | ||
|
|
||
| if [ "$1" == "stop" ] | ||
| then | ||
| while [ $((PORT < ENDPORT)) != "0" ]; do | ||
| PORT=$((PORT+1)) | ||
| echo "Stopping $PORT" | ||
| $REDIS_CLI -p $PORT shutdown nosave | ||
| done | ||
| exit 0 | ||
| fi | ||
|
|
||
| if [ "$1" == "watch" ] | ||
| then | ||
| PORT=$((PORT+1)) | ||
| while [ 1 ]; do | ||
| clear | ||
| date | ||
| $REDIS_CLI -p $PORT cluster nodes | head -30 | ||
| sleep 1 | ||
| done | ||
| exit 0 | ||
| fi | ||
|
|
||
| if [ "$1" == "clean" ] | ||
| then | ||
| echo "Cleaning *.log" | ||
| rm -rf *.log | ||
| echo "Cleaning appendonly-*" | ||
| rm -rf appendonly-* | ||
| echo "Cleaning dump-*.rdb" | ||
| rm -rf dump-*.rdb | ||
| echo "Cleaning nodes-*.conf" | ||
| rm -rf nodes-*.conf | ||
| exit 0 | ||
| fi | ||
|
|
||
| if [ "$1" == "clean-logs" ] | ||
| then | ||
| echo "Cleaning *.log" | ||
| rm -rf *.log | ||
| exit 0 | ||
| fi | ||
|
|
||
| echo "Usage: $0 [start|create|stop|watch|clean|clean-logs|call]" | ||
| echo "start [PORT] -- Launch Redis Cluster instances." | ||
| echo "create [PORT] [-f] -- Create a cluster using redis-cli --cluster create." | ||
| echo "stop [PORT] -- Stop Redis Cluster instances." | ||
| echo "watch [PORT] -- Show CLUSTER NODES output (first 30 lines) of first node." | ||
| echo "clean -- Remove all instances data, logs, configs." | ||
| echo "clean-logs -- Remove just instances logs." |
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
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.