-
Notifications
You must be signed in to change notification settings - Fork 1.2k
fix:CI #3199
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
fix:CI #3199
Changes from 3 commits
e5bab9f
07e43d6
fa09ec8
192207f
592eb8d
c245ae7
8d24ea0
fb85736
7a18d22
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,10 +1,20 @@ | ||||||||||||
| #!/bin/bash | ||||||||||||
|
|
||||||||||||
| #pkill -9 pika | ||||||||||||
| #pkill -9 codis | ||||||||||||
| #rm -rf /tmp/codis | ||||||||||||
| #rm -rf codis_data_1 | ||||||||||||
| #rm -rf codis_data_2 | ||||||||||||
| # Clean up processes and temporary files | ||||||||||||
| pkill -9 pika || true | ||||||||||||
| pkill -9 codis || true | ||||||||||||
| rm -rf /tmp/codis || true | ||||||||||||
| rm -rf codis_data_1 || true | ||||||||||||
| rm -rf codis_data_2 || true | ||||||||||||
|
|
||||||||||||
| # Clean up temporary directories in codis to free space | ||||||||||||
| rm -rf ../codis/bin || true | ||||||||||||
| rm -rf ../codis/log || true | ||||||||||||
| mkdir -p ../codis/bin | ||||||||||||
| mkdir -p ../codis/log | ||||||||||||
|
|
||||||||||||
| # Display available disk space | ||||||||||||
| df -h | ||||||||||||
|
|
||||||||||||
| CODIS_DASHBOARD_ADDR=127.0.0.1:18080 | ||||||||||||
|
|
||||||||||||
|
|
@@ -21,8 +31,8 @@ mkdir codis_data_1 | |||||||||||
| mkdir codis_data_2 | ||||||||||||
|
|
||||||||||||
| # Example Change the location for storing data on primary and secondary nodes in the configuration file | ||||||||||||
| sed -i '' -e 's|databases : 1|databases : 2|' -e 's|port : 9221|port : 8000|' -e 's|log-path : ./log/|log-path : ./codis_data_1/log/|' -e 's|db-path : ./db/|db-path : ./codis_data_1/db/|' -e 's|dump-path : ./dump/|dump-path : ./codis_data_1/dump/|' -e 's|pidfile : ./pika.pid|pidfile : ./codis_data_1/pika.pid|' -e 's|db-sync-path : ./dbsync/|db-sync-path : ./codis_data_1/dbsync/|' -e 's|#daemonize : yes|daemonize : yes|' ./pika_8000.conf | ||||||||||||
| sed -i '' -e 's|databases : 1|databases : 2|' -e 's|port : 9221|port : 8001|' -e 's|log-path : ./log/|log-path : ./codis_data_2/log/|' -e 's|db-path : ./db/|db-path : ./codis_data_2/db/|' -e 's|dump-path : ./dump/|dump-path : ./codis_data_2/dump/|' -e 's|pidfile : ./pika.pid|pidfile : ./codis_data_2/pika.pid|' -e 's|db-sync-path : ./dbsync/|db-sync-path : ./codis_data_2/dbsync/|' -e 's|#daemonize : yes|daemonize : yes|' ./pika_8001.conf | ||||||||||||
| sed -i.bak -e 's|databases : 1|databases : 2|' -e 's|port : 9221|port : 8000|' -e 's|log-path : ./log/|log-path : ./codis_data_1/log/|' -e 's|db-path : ./db/|db-path : ./codis_data_1/db/|' -e 's|dump-path : ./dump/|dump-path : ./codis_data_1/dump/|' -e 's|pidfile : ./pika.pid|pidfile : ./codis_data_1/pika.pid|' -e 's|db-sync-path : ./dbsync/|db-sync-path : ./codis_data_1/dbsync/|' -e 's|#daemonize : yes|daemonize : yes|' ./pika_8000.conf | ||||||||||||
| sed -i.bak -e 's|databases : 1|databases : 2|' -e 's|port : 9221|port : 8001|' -e 's|log-path : ./log/|log-path : ./codis_data_2/log/|' -e 's|db-path : ./db/|db-path : ./codis_data_2/db/|' -e 's|dump-path : ./dump/|dump-path : ./codis_data_2/dump/|' -e 's|pidfile : ./pika.pid|pidfile : ./codis_data_2/pika.pid|' -e 's|db-sync-path : ./dbsync/|db-sync-path : ./codis_data_2/dbsync/|' -e 's|#daemonize : yes|daemonize : yes|' ./pika_8001.conf | ||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Clean up sed backup files to prevent disk space waste. The sed commands use Add cleanup after the sed commands to remove backup files: sed -i.bak -e 's|databases : 1|databases : 2|' -e 's|port : 9221|port : 8000|' -e 's|log-path : ./log/|log-path : ./codis_data_1/log/|' -e 's|db-path : ./db/|db-path : ./codis_data_1/db/|' -e 's|dump-path : ./dump/|dump-path : ./codis_data_1/dump/|' -e 's|pidfile : ./pika.pid|pidfile : ./codis_data_1/pika.pid|' -e 's|db-sync-path : ./dbsync/|db-sync-path : ./codis_data_1/dbsync/|' -e 's|#daemonize : yes|daemonize : yes|' ./pika_8000.conf
sed -i.bak -e 's|databases : 1|databases : 2|' -e 's|port : 9221|port : 8001|' -e 's|log-path : ./log/|log-path : ./codis_data_2/log/|' -e 's|db-path : ./db/|db-path : ./codis_data_2/db/|' -e 's|dump-path : ./dump/|dump-path : ./codis_data_2/dump/|' -e 's|pidfile : ./pika.pid|pidfile : ./codis_data_2/pika.pid|' -e 's|db-sync-path : ./dbsync/|db-sync-path : ./codis_data_2/dbsync/|' -e 's|#daemonize : yes|daemonize : yes|' ./pika_8001.conf
+rm -f ./*.bakAlternatively, use -sed -i.bak -e 's|databases : 1|databases : 2|' ... ./pika_8000.conf
+sed -i -e 's|databases : 1|databases : 2|' ... ./pika_8000.conf📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||
| # Start three nodes | ||||||||||||
| ./pika -c ./pika_8000.conf | ||||||||||||
| ./pika -c ./pika_8001.conf | ||||||||||||
|
|
@@ -55,6 +65,3 @@ echo 'resync all groups' | |||||||||||
|
|
||||||||||||
| #ensure codis are ready | ||||||||||||
| sleep 10 | ||||||||||||
|
|
||||||||||||
|
|
||||||||||||
|
|
||||||||||||
Uh oh!
There was an error while loading. Please reload this page.