You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: add || true to all RESULT=$() in retry loops to prevent set -e exit
GitHub Actions run: blocks use set -e implicitly. When mysql returns
non-zero inside a retry loop (e.g., database doesn't exist yet),
the entire step exits before the retry can continue.
Added || true to all 19 RESULT=$() assignments inside retry loops
so the non-zero exit code doesn't propagate.
RESULT=$($SBDIR/node2/use -e "SELECT val FROM proxy_ic_test.t1;" 2>/dev/null)
698
+
RESULT=$($SBDIR/node2/use -e "SELECT val FROM proxy_ic_test.t1;" 2>/dev/null) || true
699
699
echo "$RESULT" | grep -q "via_proxysql" && break
700
700
echo " Waiting for replication... ($i/10)"
701
701
sleep 2
@@ -843,7 +843,7 @@ jobs:
843
843
$SBDIR/node1/use -e "CREATE DATABASE gr_test; USE gr_test; CREATE TABLE t1 (id INT AUTO_INCREMENT PRIMARY KEY, val VARCHAR(100)); INSERT INTO t1 (val) VALUES ('single_primary_write');"
844
844
# Wait for replication to node2 with retries
845
845
for i in $(seq 1 10); do
846
-
RESULT=$($SBDIR/node2/use -BN -e "SELECT val FROM gr_test.t1;" 2>/dev/null)
846
+
RESULT=$($SBDIR/node2/use -BN -e "SELECT val FROM gr_test.t1;" 2>/dev/null) || true
$SBDIR/node1/use -e "CREATE DATABASE gr_mp_test; USE gr_mp_test; CREATE TABLE t1 (id INT AUTO_INCREMENT PRIMARY KEY, val VARCHAR(100)); INSERT INTO t1 (val) VALUES ('write_from_node1');"
889
889
# Wait for replication to node3 with retries
890
890
for i in $(seq 1 10); do
891
-
RESULT=$($SBDIR/node3/use -BN -e "SELECT val FROM gr_mp_test.t1 WHERE val='write_from_node1';" 2>/dev/null)
891
+
RESULT=$($SBDIR/node3/use -BN -e "SELECT val FROM gr_mp_test.t1 WHERE val='write_from_node1';" 2>/dev/null) || true
$SBDIR/node1/use -e "CREATE DATABASE fanin_test; USE fanin_test; CREATE TABLE t1 (id INT AUTO_INCREMENT PRIMARY KEY, val VARCHAR(100), src VARCHAR(20)); INSERT INTO t1 (val, src) VALUES ('from_master1', 'node1');"
984
984
# Fan-in uses multi-source replication; allow up to 30s per source
985
985
for i in $(seq 1 15); do
986
-
RESULT=$($SBDIR/node3/use -BN -e "SELECT val FROM fanin_test.t1 WHERE src='node1';" 2>/dev/null)
986
+
RESULT=$($SBDIR/node3/use -BN -e "SELECT val FROM fanin_test.t1 WHERE src='node1';" 2>/dev/null) || true
987
987
echo "$RESULT" | grep -q "from_master1" && break
988
988
echo " Waiting for replication from node1... ($i/15)"
989
989
sleep 2
@@ -995,7 +995,7 @@ jobs:
995
995
$SBDIR/node2/use -e "INSERT INTO fanin_test.t1 (val, src) VALUES ('from_master2', 'node2');"
996
996
# Fan-in uses multi-source replication; allow up to 30s per source
997
997
for i in $(seq 1 15); do
998
-
RESULT=$($SBDIR/node3/use -BN -e "SELECT val FROM fanin_test.t1 WHERE src='node2';" 2>/dev/null)
998
+
RESULT=$($SBDIR/node3/use -BN -e "SELECT val FROM fanin_test.t1 WHERE src='node2';" 2>/dev/null) || true
999
999
echo "$RESULT" | grep -q "from_master2" && break
1000
1000
echo " Waiting for replication from node2... ($i/15)"
1001
1001
sleep 2
@@ -1023,7 +1023,7 @@ jobs:
1023
1023
$SBDIR/node1/use -e "CREATE DATABASE allm_test; USE allm_test; CREATE TABLE t1 (id INT AUTO_INCREMENT PRIMARY KEY, val VARCHAR(100)); INSERT INTO t1 (val) VALUES ('write_from_node1');"
1024
1024
# Wait for replication to node3 with retries
1025
1025
for i in $(seq 1 10); do
1026
-
RESULT=$($SBDIR/node3/use -BN -e "SELECT val FROM allm_test.t1 WHERE val='write_from_node1';" 2>/dev/null)
1026
+
RESULT=$($SBDIR/node3/use -BN -e "SELECT val FROM allm_test.t1 WHERE val='write_from_node1';" 2>/dev/null) || true
0 commit comments