Skip to content

Conversation

donhardman
Copy link
Collaborator

No description provided.

Copy link

clt

❌ CLT tests in test/clt-tests/sharding/cluster/ test/clt-tests/sharding/functional/ test/clt-tests/sharding/replication/ test/clt-tests/sharding/syntax/
✅ OK: 17
❌ Failed: 2
⏳ Duration: 320s
👉 Check Action Results for commit 29bba82
Failed tests:

test/clt-tests/sharding/cluster/test-drop-sharded-clustering-table.rec
––– input –––
export INSTANCE=1
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export INSTANCE=2
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export CLUSTER_NAME=c
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create cluster ${CLUSTER_NAME}"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "show status like 'cluster_${CLUSTER_NAME}_status'\G"
––– output –––
OK
––– input –––
for n in `seq 2 $INSTANCE`; do mysql -h0 -P${n}306 -e "join cluster ${CLUSTER_NAME} at '127.0.0.1:1312'"; done;
––– output –––
OK
––– input –––
mysql -h0 -P${INSTANCE}306 -e "show status like 'cluster_${CLUSTER_NAME}_status'\G"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:tbl1(id bigint) shards='3' rf='2';"; echo $?;
––– output –––
OK
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 2306 failed!"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:tbl1;"; echo $?;
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: Waiting timeout exceeded.
+ 1
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 2306 failed!"
––– output –––
- === Node 2306 ===
+ *************************** 1. row ***************************
+ Table: tbl1
+ Type: distributed
+ === Node 2306 ===
––– input –––
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:Tbl2(id bigint) shards='3' rf='1';"; echo $?
––– output –––
OK
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 2306 failed!"
––– output –––
- Table: tbl2
+ Table: tbl1
- === Node 2306 ===
+ *************************** 2. row ***************************
- *************************** 1. row ***************************
+ Table: tbl2
- Table: tbl2
+ Type: distributed
- Type: distributed
+ === Node 2306 ===
+ *************************** 1. row ***************************
+ Table: tbl2
+ Type: distributed
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:Tbl2;"; echo $?
––– output –––
OK
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 2306 failed!"
––– output –––
- === Node 2306 ===
+ *************************** 1. row ***************************
+ Table: tbl1
+ Type: distributed
+ === Node 2306 ===
––– input –––
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:tbl_missing_type(id) shards='3' rf='1';"
––– output –––
OK
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 2306 failed!"
––– output –––
- Table: tbl_missing_type
+ Table: tbl1
- === Node 2306 ===
+ *************************** 2. row ***************************
- *************************** 1. row ***************************
+ Table: tbl_missing_type
- Table: tbl_missing_type
+ Type: distributed
- Type: distributed
+ === Node 2306 ===
+ *************************** 1. row ***************************
+ Table: tbl_missing_type
+ Type: distributed
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:tbl_missing_type;"; echo $?
––– output –––
OK
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 2306 failed!"
––– output –––
- === Node 2306 ===
+ *************************** 1. row ***************************
+ Table: tbl1
+ Type: distributed
+ === Node 2306 ===
––– input –––
LONG_TABLE_NAME=$(printf "tbl%065d" 1)
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:${LONG_TABLE_NAME}(id bigint) shards='3' rf='1';"
––– output –––
OK
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 2306 failed!"
––– output –––
- === Node 2306 ===
+ *************************** 2. row ***************************
- *************************** 1. row ***************************
+ Table: tbl1
- Table: tbl00000000000000000000000000000000000000000000000000000000000000001
+ Type: distributed
- Type: distributed
+ === Node 2306 ===
+ *************************** 1. row ***************************
+ Table: tbl00000000000000000000000000000000000000000000000000000000000000001
+ Type: distributed
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:${LONG_TABLE_NAME};"
––– output –––
OK
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 2306 failed!"
––– output –––
- === Node 2306 ===
+ *************************** 1. row ***************************
+ Table: tbl1
+ Type: distributed
+ === Node 2306 ===
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:nonexistent_table;"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "DROP TABLE nonexistent_cluster:tbl1;"
––– output –––
- ERROR 1064 (42000) at line 1: table 'tbl1' is missing: DROP TABLE failed: table 'tbl1' must exist
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:tbl1;"
––– output –––
- ERROR 1064 (42000) at line 1: table 'tbl1' is missing: DROP TABLE failed: table 'tbl1' must exist
––– input –––
mysql -h0 -P1306 -e "INSERT INTO ${CLUSTER_NAME}:tbl1 VALUES (1);" & sleep 1; mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:tbl1;"
––– output –––
- ERROR 1064 (42000) at line 1: Cannot create table with column names missing
+ ERROR 1064 (42000) at line 1: table 'tbl1' does not support INSERT
- ERROR 1064 (42000) at line 1: table 'tbl1' is missing: DROP TABLE failed: table 'tbl1' must exist
test/clt-tests/sharding/functional/functional-sharding-positive.rec
––– input –––
export INSTANCE=1
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export INSTANCE=2
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export INSTANCE=3
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export CLUSTER_NAME=replication
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create cluster ${CLUSTER_NAME}"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "show status like 'cluster_${CLUSTER_NAME}_status'\G"
––– output –––
OK
––– input –––
for n in `seq 2 $INSTANCE`; do mysql -h0 -P${n}306 -e "join cluster ${CLUSTER_NAME} at '127.0.0.1:1312'"; done;
––– output –––
OK
––– input –––
mysql -h0 -P${INSTANCE}306 -e "show status like 'cluster_${CLUSTER_NAME}_status'\G"
––– output –––
OK
––– input –––
for port in 1306 2306 3306; do timeout 60 mysql -h0 -P$port -e "SHOW STATUS LIKE 'cluster_replication_status'\G" > /tmp/status_$port.log && grep -q "Value: primary" /tmp/status_$port.log && echo "Port $port: Node synced"; done && cat /tmp/status_1306.log
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:tbl1(id bigint) shards='5' rf='2'"; echo $?
––– output –––
OK
––– input –––
for i in 1 2 3; do mysql -h0 -P${i}306 -e "show tables from system\G"; done | grep 'system.tbl1_s' | sort -V
––– output –––
OK
––– input –––
mysql -h0 -P2306 -e "create table ${CLUSTER_NAME}:tbl2(id bigint) shards='4' rf='1'"; echo $?
––– output –––
OK
––– input –––
for i in 1 2 3; do mysql -h0 -P${i}306 -e "show tables from system\G"; done | grep 'system.tbl2_s' | sort -V
––– output –––
OK
––– input –––
mysql -h0 -P3306 -e "create table ${CLUSTER_NAME}:tbl3(id bigint) shards='5' rf='2'"; echo $?
––– output –––
OK
––– input –––
for i in 1 2 3; do mysql -h0 -P${i}306 -e "show tables from system\G"; done | grep 'system.tbl3_s' | sort -V
––– output –––
OK
––– input –––
mysql -h0 -P3306 -e "DROP TABLE ${CLUSTER_NAME}:tbl3"; echo $?
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: Waiting timeout exceeded.
+ 1
––– input –––
mysql -h0 -P3306 -e "create table ${CLUSTER_NAME}:tbl3(id bigint) shards='10' rf='3'"; echo $?
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: table 'tbl3': CREATE TABLE failed: table 'tbl3' already exists
+ 1
––– input –––
for i in 1 2 3; do mysql -h0 -P${i}306 -e "show tables from system\G"; done | grep 'system.tbl3_s' | sort -V
––– output –––
- Table: system.tbl3_s0
+ Table: system.tbl3_s1
- Table: system.tbl3_s1
+ Table: system.tbl3_s2
- Table: system.tbl3_s1
+ Table: system.tbl3_s2
- Table: system.tbl3_s2
+ Table: system.tbl3_s3
- Table: system.tbl3_s2
+ Table: system.tbl3_s3
- Table: system.tbl3_s2
+ Table: system.tbl3_s4
- Table: system.tbl3_s3
+ Table: system.tbl3_s4
- Table: system.tbl3_s3
- Table: system.tbl3_s3
- Table: system.tbl3_s4
- Table: system.tbl3_s4
- Table: system.tbl3_s4
- Table: system.tbl3_s5
- Table: system.tbl3_s5
- Table: system.tbl3_s5
- Table: system.tbl3_s6
- Table: system.tbl3_s6
- Table: system.tbl3_s6
- Table: system.tbl3_s7
- Table: system.tbl3_s7
- Table: system.tbl3_s7
- Table: system.tbl3_s8
- Table: system.tbl3_s8
- Table: system.tbl3_s8
- Table: system.tbl3_s9
- Table: system.tbl3_s9
- Table: system.tbl3_s9
––– input –––
mysql -h0 -P3306 -e "create table ${CLUSTER_NAME}:tbl4(id bigint) shards='3000' rf='3' timeout='60'"; echo $?
––– output –––
OK
––– input –––
for i in 1 2 3; do mysql -h0 -P${i}306 -e "show tables from system\G"; done | grep -c 'system.tbl4_s'
––– output –––
OK
––– input –––
mysql -h0 -P3306 -e "create table ${CLUSTER_NAME}:tbl5(id bigint) shards='3001' rf='3'"?
––– output –––
OK

Copy link

clt

❌ CLT tests in test/clt-tests/sharding/cluster/ test/clt-tests/sharding/functional/ test/clt-tests/sharding/replication/ test/clt-tests/sharding/syntax/
✅ OK: 17
❌ Failed: 2
⏳ Duration: 321s
👉 Check Action Results for commit f3455c1
Failed tests:

test/clt-tests/sharding/cluster/test-drop-sharded-clustering-table.rec
––– input –––
export INSTANCE=1
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export INSTANCE=2
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export CLUSTER_NAME=c
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create cluster ${CLUSTER_NAME}"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "show status like 'cluster_${CLUSTER_NAME}_status'\G"
––– output –––
OK
––– input –––
for n in `seq 2 $INSTANCE`; do mysql -h0 -P${n}306 -e "join cluster ${CLUSTER_NAME} at '127.0.0.1:1312'"; done;
––– output –––
OK
––– input –––
mysql -h0 -P${INSTANCE}306 -e "show status like 'cluster_${CLUSTER_NAME}_status'\G"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:tbl1(id bigint) shards='3' rf='2';"; echo $?;
––– output –––
OK
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 2306 failed!"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:tbl1;"; echo $?;
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: Waiting timeout exceeded.
+ 1
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 2306 failed!"
––– output –––
- === Node 2306 ===
+ *************************** 1. row ***************************
+ Table: tbl1
+ Type: distributed
+ === Node 2306 ===
––– input –––
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:Tbl2(id bigint) shards='3' rf='1';"; echo $?
––– output –––
OK
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 2306 failed!"
––– output –––
- Table: tbl2
+ Table: tbl1
- === Node 2306 ===
+ *************************** 2. row ***************************
- *************************** 1. row ***************************
+ Table: tbl2
- Table: tbl2
+ Type: distributed
- Type: distributed
+ === Node 2306 ===
+ *************************** 1. row ***************************
+ Table: tbl2
+ Type: distributed
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:Tbl2;"; echo $?
––– output –––
OK
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 2306 failed!"
––– output –––
- === Node 2306 ===
+ *************************** 1. row ***************************
+ Table: tbl1
+ Type: distributed
+ === Node 2306 ===
––– input –––
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:tbl_missing_type(id) shards='3' rf='1';"
––– output –––
OK
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 2306 failed!"
––– output –––
- Table: tbl_missing_type
+ Table: tbl1
- === Node 2306 ===
+ *************************** 2. row ***************************
- *************************** 1. row ***************************
+ Table: tbl_missing_type
- Table: tbl_missing_type
+ Type: distributed
- Type: distributed
+ === Node 2306 ===
+ *************************** 1. row ***************************
+ Table: tbl_missing_type
+ Type: distributed
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:tbl_missing_type;"; echo $?
––– output –––
OK
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 2306 failed!"
––– output –––
- === Node 2306 ===
+ *************************** 1. row ***************************
+ Table: tbl1
+ Type: distributed
+ === Node 2306 ===
––– input –––
LONG_TABLE_NAME=$(printf "tbl%065d" 1)
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:${LONG_TABLE_NAME}(id bigint) shards='3' rf='1';"
––– output –––
OK
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 2306 failed!"
––– output –––
- === Node 2306 ===
+ *************************** 2. row ***************************
- *************************** 1. row ***************************
+ Table: tbl1
- Table: tbl00000000000000000000000000000000000000000000000000000000000000001
+ Type: distributed
- Type: distributed
+ === Node 2306 ===
+ *************************** 1. row ***************************
+ Table: tbl00000000000000000000000000000000000000000000000000000000000000001
+ Type: distributed
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:${LONG_TABLE_NAME};"
––– output –––
OK
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 2306 failed!"
––– output –––
- === Node 2306 ===
+ *************************** 1. row ***************************
+ Table: tbl1
+ Type: distributed
+ === Node 2306 ===
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:nonexistent_table;"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "DROP TABLE nonexistent_cluster:tbl1;"
––– output –––
- ERROR 1064 (42000) at line 1: table 'tbl1' is missing: DROP TABLE failed: table 'tbl1' must exist
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:tbl1;"
––– output –––
- ERROR 1064 (42000) at line 1: table 'tbl1' is missing: DROP TABLE failed: table 'tbl1' must exist
––– input –––
mysql -h0 -P1306 -e "INSERT INTO ${CLUSTER_NAME}:tbl1 VALUES (1);" & sleep 1; mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:tbl1;"
––– output –––
- ERROR 1064 (42000) at line 1: Cannot create table with column names missing
+ ERROR 1064 (42000) at line 1: table 'tbl1' does not support INSERT
- ERROR 1064 (42000) at line 1: table 'tbl1' is missing: DROP TABLE failed: table 'tbl1' must exist
test/clt-tests/sharding/functional/functional-sharding-positive.rec
––– input –––
export INSTANCE=1
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export INSTANCE=2
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export INSTANCE=3
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export CLUSTER_NAME=replication
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create cluster ${CLUSTER_NAME}"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "show status like 'cluster_${CLUSTER_NAME}_status'\G"
––– output –––
OK
––– input –––
for n in `seq 2 $INSTANCE`; do mysql -h0 -P${n}306 -e "join cluster ${CLUSTER_NAME} at '127.0.0.1:1312'"; done;
––– output –––
OK
––– input –––
mysql -h0 -P${INSTANCE}306 -e "show status like 'cluster_${CLUSTER_NAME}_status'\G"
––– output –––
OK
––– input –––
for port in 1306 2306 3306; do timeout 60 mysql -h0 -P$port -e "SHOW STATUS LIKE 'cluster_replication_status'\G" > /tmp/status_$port.log && grep -q "Value: primary" /tmp/status_$port.log && echo "Port $port: Node synced"; done && cat /tmp/status_1306.log
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:tbl1(id bigint) shards='5' rf='2'"; echo $?
––– output –––
OK
––– input –––
for i in 1 2 3; do mysql -h0 -P${i}306 -e "show tables from system\G"; done | grep 'system.tbl1_s' | sort -V
––– output –––
OK
––– input –––
mysql -h0 -P2306 -e "create table ${CLUSTER_NAME}:tbl2(id bigint) shards='4' rf='1'"; echo $?
––– output –––
OK
––– input –––
for i in 1 2 3; do mysql -h0 -P${i}306 -e "show tables from system\G"; done | grep 'system.tbl2_s' | sort -V
––– output –––
OK
––– input –––
mysql -h0 -P3306 -e "create table ${CLUSTER_NAME}:tbl3(id bigint) shards='5' rf='2'"; echo $?
––– output –––
OK
––– input –––
for i in 1 2 3; do mysql -h0 -P${i}306 -e "show tables from system\G"; done | grep 'system.tbl3_s' | sort -V
––– output –––
OK
––– input –––
mysql -h0 -P3306 -e "DROP TABLE ${CLUSTER_NAME}:tbl3"; echo $?
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: Waiting timeout exceeded.
+ 1
––– input –––
mysql -h0 -P3306 -e "create table ${CLUSTER_NAME}:tbl3(id bigint) shards='10' rf='3'"; echo $?
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: table 'tbl3': CREATE TABLE failed: table 'tbl3' already exists
+ 1
––– input –––
for i in 1 2 3; do mysql -h0 -P${i}306 -e "show tables from system\G"; done | grep 'system.tbl3_s' | sort -V
––– output –––
- Table: system.tbl3_s0
+ Table: system.tbl3_s1
- Table: system.tbl3_s1
+ Table: system.tbl3_s2
- Table: system.tbl3_s1
+ Table: system.tbl3_s2
- Table: system.tbl3_s2
+ Table: system.tbl3_s3
- Table: system.tbl3_s2
+ Table: system.tbl3_s3
- Table: system.tbl3_s2
+ Table: system.tbl3_s4
- Table: system.tbl3_s3
+ Table: system.tbl3_s4
- Table: system.tbl3_s3
- Table: system.tbl3_s3
- Table: system.tbl3_s4
- Table: system.tbl3_s4
- Table: system.tbl3_s4
- Table: system.tbl3_s5
- Table: system.tbl3_s5
- Table: system.tbl3_s5
- Table: system.tbl3_s6
- Table: system.tbl3_s6
- Table: system.tbl3_s6
- Table: system.tbl3_s7
- Table: system.tbl3_s7
- Table: system.tbl3_s7
- Table: system.tbl3_s8
- Table: system.tbl3_s8
- Table: system.tbl3_s8
- Table: system.tbl3_s9
- Table: system.tbl3_s9
- Table: system.tbl3_s9
––– input –––
mysql -h0 -P3306 -e "create table ${CLUSTER_NAME}:tbl4(id bigint) shards='3000' rf='3' timeout='60'"; echo $?
––– output –––
OK
––– input –––
for i in 1 2 3; do mysql -h0 -P${i}306 -e "show tables from system\G"; done | grep -c 'system.tbl4_s'
––– output –––
OK
––– input –––
mysql -h0 -P3306 -e "create table ${CLUSTER_NAME}:tbl5(id bigint) shards='3001' rf='3'"?
––– output –––
OK

@donhardman donhardman force-pushed the feature/sharding-rollback branch from 251eaa2 to f5af597 Compare August 19, 2025 09:45
Copy link

clt

❌ CLT tests in test/clt-tests/sharding/cluster/ test/clt-tests/sharding/functional/ test/clt-tests/sharding/replication/ test/clt-tests/sharding/syntax/
✅ OK: 17
❌ Failed: 2
⏳ Duration: 328s
👉 Check Action Results for commit 58b363a
Failed tests:

test/clt-tests/sharding/cluster/test-drop-sharded-clustering-table.rec
––– input –––
export INSTANCE=1
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export INSTANCE=2
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export CLUSTER_NAME=c
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create cluster ${CLUSTER_NAME}"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "show status like 'cluster_${CLUSTER_NAME}_status'\G"
––– output –––
OK
––– input –––
for n in `seq 2 $INSTANCE`; do mysql -h0 -P${n}306 -e "join cluster ${CLUSTER_NAME} at '127.0.0.1:1312'"; done;
––– output –––
OK
––– input –––
mysql -h0 -P${INSTANCE}306 -e "show status like 'cluster_${CLUSTER_NAME}_status'\G"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:tbl1(id bigint) shards='3' rf='2';"; echo $?;
––– output –––
OK
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 2306 failed!"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:tbl1;"; echo $?;
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: Waiting timeout exceeded.
+ 1
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 2306 failed!"
––– output –––
- === Node 2306 ===
+ *************************** 1. row ***************************
+ Table: tbl1
+ Type: distributed
+ === Node 2306 ===
––– input –––
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:Tbl2(id bigint) shards='3' rf='1';"; echo $?
––– output –––
OK
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 2306 failed!"
––– output –––
- Table: tbl2
+ Table: tbl1
- === Node 2306 ===
+ *************************** 2. row ***************************
- *************************** 1. row ***************************
+ Table: tbl2
- Table: tbl2
+ Type: distributed
- Type: distributed
+ === Node 2306 ===
+ *************************** 1. row ***************************
+ Table: tbl2
+ Type: distributed
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:Tbl2;"; echo $?
––– output –––
OK
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 2306 failed!"
––– output –––
- === Node 2306 ===
+ *************************** 1. row ***************************
+ Table: tbl1
+ Type: distributed
+ === Node 2306 ===
––– input –––
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:tbl_missing_type(id) shards='3' rf='1';"
––– output –––
OK
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 2306 failed!"
––– output –––
- Table: tbl_missing_type
+ Table: tbl1
- === Node 2306 ===
+ *************************** 2. row ***************************
- *************************** 1. row ***************************
+ Table: tbl_missing_type
- Table: tbl_missing_type
+ Type: distributed
- Type: distributed
+ === Node 2306 ===
+ *************************** 1. row ***************************
+ Table: tbl_missing_type
+ Type: distributed
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:tbl_missing_type;"; echo $?
––– output –––
OK
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 2306 failed!"
––– output –––
- === Node 2306 ===
+ *************************** 1. row ***************************
+ Table: tbl1
+ Type: distributed
+ === Node 2306 ===
––– input –––
LONG_TABLE_NAME=$(printf "tbl%065d" 1)
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:${LONG_TABLE_NAME}(id bigint) shards='3' rf='1';"
––– output –––
OK
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 2306 failed!"
––– output –––
- === Node 2306 ===
+ *************************** 2. row ***************************
- *************************** 1. row ***************************
+ Table: tbl1
- Table: tbl00000000000000000000000000000000000000000000000000000000000000001
+ Type: distributed
- Type: distributed
+ === Node 2306 ===
+ *************************** 1. row ***************************
+ Table: tbl00000000000000000000000000000000000000000000000000000000000000001
+ Type: distributed
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:${LONG_TABLE_NAME};"
––– output –––
OK
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 2306 failed!"
––– output –––
- === Node 2306 ===
+ *************************** 1. row ***************************
+ Table: tbl1
+ Type: distributed
+ === Node 2306 ===
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:nonexistent_table;"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "DROP TABLE nonexistent_cluster:tbl1;"
––– output –––
- ERROR 1064 (42000) at line 1: table 'tbl1' is missing: DROP TABLE failed: table 'tbl1' must exist
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:tbl1;"
––– output –––
- ERROR 1064 (42000) at line 1: table 'tbl1' is missing: DROP TABLE failed: table 'tbl1' must exist
––– input –––
mysql -h0 -P1306 -e "INSERT INTO ${CLUSTER_NAME}:tbl1 VALUES (1);" & sleep 1; mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:tbl1;"
––– output –––
- ERROR 1064 (42000) at line 1: Cannot create table with column names missing
+ ERROR 1064 (42000) at line 1: table 'tbl1' does not support INSERT
- ERROR 1064 (42000) at line 1: table 'tbl1' is missing: DROP TABLE failed: table 'tbl1' must exist
test/clt-tests/sharding/functional/functional-sharding-positive.rec
––– input –––
export INSTANCE=1
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export INSTANCE=2
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export INSTANCE=3
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export CLUSTER_NAME=replication
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create cluster ${CLUSTER_NAME}"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "show status like 'cluster_${CLUSTER_NAME}_status'\G"
––– output –––
OK
––– input –––
for n in `seq 2 $INSTANCE`; do mysql -h0 -P${n}306 -e "join cluster ${CLUSTER_NAME} at '127.0.0.1:1312'"; done;
––– output –––
OK
––– input –––
mysql -h0 -P${INSTANCE}306 -e "show status like 'cluster_${CLUSTER_NAME}_status'\G"
––– output –––
OK
––– input –––
for port in 1306 2306 3306; do timeout 60 mysql -h0 -P$port -e "SHOW STATUS LIKE 'cluster_replication_status'\G" > /tmp/status_$port.log && grep -q "Value: primary" /tmp/status_$port.log && echo "Port $port: Node synced"; done && cat /tmp/status_1306.log
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:tbl1(id bigint) shards='5' rf='2'"; echo $?
––– output –––
OK
––– input –––
for i in 1 2 3; do mysql -h0 -P${i}306 -e "show tables from system\G"; done | grep 'system.tbl1_s' | sort -V
––– output –––
OK
––– input –––
mysql -h0 -P2306 -e "create table ${CLUSTER_NAME}:tbl2(id bigint) shards='4' rf='1'"; echo $?
––– output –––
OK
––– input –––
for i in 1 2 3; do mysql -h0 -P${i}306 -e "show tables from system\G"; done | grep 'system.tbl2_s' | sort -V
––– output –––
OK
––– input –––
mysql -h0 -P3306 -e "create table ${CLUSTER_NAME}:tbl3(id bigint) shards='5' rf='2'"; echo $?
––– output –––
OK
––– input –––
for i in 1 2 3; do mysql -h0 -P${i}306 -e "show tables from system\G"; done | grep 'system.tbl3_s' | sort -V
––– output –––
OK
––– input –––
mysql -h0 -P3306 -e "DROP TABLE ${CLUSTER_NAME}:tbl3"; echo $?
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: Waiting timeout exceeded.
+ 1
––– input –––
mysql -h0 -P3306 -e "create table ${CLUSTER_NAME}:tbl3(id bigint) shards='10' rf='3'"; echo $?
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: table 'tbl3': CREATE TABLE failed: table 'tbl3' already exists
+ 1
––– input –––
for i in 1 2 3; do mysql -h0 -P${i}306 -e "show tables from system\G"; done | grep 'system.tbl3_s' | sort -V
––– output –––
- Table: system.tbl3_s0
+ Table: system.tbl3_s1
- Table: system.tbl3_s1
+ Table: system.tbl3_s2
- Table: system.tbl3_s1
+ Table: system.tbl3_s2
- Table: system.tbl3_s2
+ Table: system.tbl3_s3
- Table: system.tbl3_s2
+ Table: system.tbl3_s3
- Table: system.tbl3_s2
+ Table: system.tbl3_s4
- Table: system.tbl3_s3
+ Table: system.tbl3_s4
- Table: system.tbl3_s3
- Table: system.tbl3_s3
- Table: system.tbl3_s4
- Table: system.tbl3_s4
- Table: system.tbl3_s4
- Table: system.tbl3_s5
- Table: system.tbl3_s5
- Table: system.tbl3_s5
- Table: system.tbl3_s6
- Table: system.tbl3_s6
- Table: system.tbl3_s6
- Table: system.tbl3_s7
- Table: system.tbl3_s7
- Table: system.tbl3_s7
- Table: system.tbl3_s8
- Table: system.tbl3_s8
- Table: system.tbl3_s8
- Table: system.tbl3_s9
- Table: system.tbl3_s9
- Table: system.tbl3_s9
––– input –––
mysql -h0 -P3306 -e "create table ${CLUSTER_NAME}:tbl4(id bigint) shards='3000' rf='3' timeout='60'"; echo $?
––– output –––
OK
––– input –––
for i in 1 2 3; do mysql -h0 -P${i}306 -e "show tables from system\G"; done | grep -c 'system.tbl4_s'
––– output –––
OK
––– input –––
mysql -h0 -P3306 -e "create table ${CLUSTER_NAME}:tbl5(id bigint) shards='3001' rf='3'"?
––– output –––
OK

Copy link

clt

❌ CLT tests in test/clt-tests/sharding/cluster/ test/clt-tests/sharding/functional/ test/clt-tests/sharding/replication/ test/clt-tests/sharding/syntax/
✅ OK: 17
❌ Failed: 2
⏳ Duration: 344s
👉 Check Action Results for commit 6af4cc2
Failed tests:

test/clt-tests/sharding/cluster/test-drop-sharded-clustering-table.rec
––– input –––
export INSTANCE=1
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export INSTANCE=2
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export CLUSTER_NAME=c
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create cluster ${CLUSTER_NAME}"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "show status like 'cluster_${CLUSTER_NAME}_status'\G"
––– output –––
OK
––– input –––
for n in `seq 2 $INSTANCE`; do mysql -h0 -P${n}306 -e "join cluster ${CLUSTER_NAME} at '127.0.0.1:1312'"; done;
––– output –––
OK
––– input –––
mysql -h0 -P${INSTANCE}306 -e "show status like 'cluster_${CLUSTER_NAME}_status'\G"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:tbl1(id bigint) shards='3' rf='2';"; echo $?;
––– output –––
OK
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 2306 failed!"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:tbl1;"; echo $?;
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: Waiting timeout exceeded.
+ 1
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 2306 failed!"
––– output –––
- === Node 2306 ===
+ *************************** 1. row ***************************
+ Table: tbl1
+ Type: distributed
+ === Node 2306 ===
––– input –––
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:Tbl2(id bigint) shards='3' rf='1';"; echo $?
––– output –––
OK
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 2306 failed!"
––– output –––
- Table: tbl2
+ Table: tbl1
- === Node 2306 ===
+ *************************** 2. row ***************************
- *************************** 1. row ***************************
+ Table: tbl2
- Table: tbl2
+ Type: distributed
- Type: distributed
+ === Node 2306 ===
+ *************************** 1. row ***************************
+ Table: tbl2
+ Type: distributed
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:Tbl2;"; echo $?
––– output –––
OK
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 2306 failed!"
––– output –––
- === Node 2306 ===
+ *************************** 1. row ***************************
+ Table: tbl1
+ Type: distributed
+ === Node 2306 ===
––– input –––
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:tbl_missing_type(id) shards='3' rf='1';"
––– output –––
OK
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 2306 failed!"
––– output –––
- Table: tbl_missing_type
+ Table: tbl1
- === Node 2306 ===
+ *************************** 2. row ***************************
- *************************** 1. row ***************************
+ Table: tbl_missing_type
- Table: tbl_missing_type
+ Type: distributed
- Type: distributed
+ === Node 2306 ===
+ *************************** 1. row ***************************
+ Table: tbl_missing_type
+ Type: distributed
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:tbl_missing_type;"; echo $?
––– output –––
OK
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 2306 failed!"
––– output –––
- === Node 2306 ===
+ *************************** 1. row ***************************
+ Table: tbl1
+ Type: distributed
+ === Node 2306 ===
––– input –––
LONG_TABLE_NAME=$(printf "tbl%065d" 1)
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:${LONG_TABLE_NAME}(id bigint) shards='3' rf='1';"
––– output –––
OK
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 2306 failed!"
––– output –––
- === Node 2306 ===
+ *************************** 2. row ***************************
- *************************** 1. row ***************************
+ Table: tbl1
- Table: tbl00000000000000000000000000000000000000000000000000000000000000001
+ Type: distributed
- Type: distributed
+ === Node 2306 ===
+ *************************** 1. row ***************************
+ Table: tbl00000000000000000000000000000000000000000000000000000000000000001
+ Type: distributed
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:${LONG_TABLE_NAME};"
––– output –––
OK
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 2306 failed!"
––– output –––
- === Node 2306 ===
+ *************************** 1. row ***************************
+ Table: tbl1
+ Type: distributed
+ === Node 2306 ===
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:nonexistent_table;"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "DROP TABLE nonexistent_cluster:tbl1;"
––– output –––
- ERROR 1064 (42000) at line 1: table 'tbl1' is missing: DROP TABLE failed: table 'tbl1' must exist
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:tbl1;"
––– output –––
- ERROR 1064 (42000) at line 1: table 'tbl1' is missing: DROP TABLE failed: table 'tbl1' must exist
––– input –––
mysql -h0 -P1306 -e "INSERT INTO ${CLUSTER_NAME}:tbl1 VALUES (1);" & sleep 1; mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:tbl1;"
––– output –––
- ERROR 1064 (42000) at line 1: Cannot create table with column names missing
+ ERROR 1064 (42000) at line 1: table 'tbl1' does not support INSERT
- ERROR 1064 (42000) at line 1: table 'tbl1' is missing: DROP TABLE failed: table 'tbl1' must exist
test/clt-tests/sharding/functional/functional-sharding-positive.rec
––– input –––
export INSTANCE=1
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export INSTANCE=2
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export INSTANCE=3
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export CLUSTER_NAME=replication
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create cluster ${CLUSTER_NAME}"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "show status like 'cluster_${CLUSTER_NAME}_status'\G"
––– output –––
OK
––– input –––
for n in `seq 2 $INSTANCE`; do mysql -h0 -P${n}306 -e "join cluster ${CLUSTER_NAME} at '127.0.0.1:1312'"; done;
––– output –––
OK
––– input –––
mysql -h0 -P${INSTANCE}306 -e "show status like 'cluster_${CLUSTER_NAME}_status'\G"
––– output –––
OK
––– input –––
for port in 1306 2306 3306; do timeout 60 mysql -h0 -P$port -e "SHOW STATUS LIKE 'cluster_replication_status'\G" > /tmp/status_$port.log && grep -q "Value: primary" /tmp/status_$port.log && echo "Port $port: Node synced"; done && cat /tmp/status_1306.log
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:tbl1(id bigint) shards='5' rf='2'"; echo $?
––– output –––
OK
––– input –––
for i in 1 2 3; do mysql -h0 -P${i}306 -e "show tables from system\G"; done | grep 'system.tbl1_s' | sort -V
––– output –––
OK
––– input –––
mysql -h0 -P2306 -e "create table ${CLUSTER_NAME}:tbl2(id bigint) shards='4' rf='1'"; echo $?
––– output –––
OK
––– input –––
for i in 1 2 3; do mysql -h0 -P${i}306 -e "show tables from system\G"; done | grep 'system.tbl2_s' | sort -V
––– output –––
OK
––– input –––
mysql -h0 -P3306 -e "create table ${CLUSTER_NAME}:tbl3(id bigint) shards='5' rf='2'"; echo $?
––– output –––
OK
––– input –––
for i in 1 2 3; do mysql -h0 -P${i}306 -e "show tables from system\G"; done | grep 'system.tbl3_s' | sort -V
––– output –––
OK
––– input –––
mysql -h0 -P3306 -e "DROP TABLE ${CLUSTER_NAME}:tbl3"; echo $?
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: Waiting timeout exceeded.
+ 1
––– input –––
mysql -h0 -P3306 -e "create table ${CLUSTER_NAME}:tbl3(id bigint) shards='10' rf='3'"; echo $?
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: table 'tbl3': CREATE TABLE failed: table 'tbl3' already exists
+ 1
––– input –––
for i in 1 2 3; do mysql -h0 -P${i}306 -e "show tables from system\G"; done | grep 'system.tbl3_s' | sort -V
––– output –––
- Table: system.tbl3_s0
+ Table: system.tbl3_s1
- Table: system.tbl3_s1
+ Table: system.tbl3_s2
- Table: system.tbl3_s1
+ Table: system.tbl3_s2
- Table: system.tbl3_s2
+ Table: system.tbl3_s3
- Table: system.tbl3_s2
+ Table: system.tbl3_s3
- Table: system.tbl3_s2
+ Table: system.tbl3_s4
- Table: system.tbl3_s3
+ Table: system.tbl3_s4
- Table: system.tbl3_s3
- Table: system.tbl3_s3
- Table: system.tbl3_s4
- Table: system.tbl3_s4
- Table: system.tbl3_s4
- Table: system.tbl3_s5
- Table: system.tbl3_s5
- Table: system.tbl3_s5
- Table: system.tbl3_s6
- Table: system.tbl3_s6
- Table: system.tbl3_s6
- Table: system.tbl3_s7
- Table: system.tbl3_s7
- Table: system.tbl3_s7
- Table: system.tbl3_s8
- Table: system.tbl3_s8
- Table: system.tbl3_s8
- Table: system.tbl3_s9
- Table: system.tbl3_s9
- Table: system.tbl3_s9
––– input –––
mysql -h0 -P3306 -e "create table ${CLUSTER_NAME}:tbl4(id bigint) shards='3000' rf='3' timeout='60'"; echo $?
––– output –––
OK
––– input –––
for i in 1 2 3; do mysql -h0 -P${i}306 -e "show tables from system\G"; done | grep -c 'system.tbl4_s'
––– output –––
OK
––– input –––
mysql -h0 -P3306 -e "create table ${CLUSTER_NAME}:tbl5(id bigint) shards='3001' rf='3'"?
––– output –––
OK

Copy link

clt

❌ CLT tests in test/clt-tests/sharding/cluster/ test/clt-tests/sharding/functional/ test/clt-tests/sharding/replication/ test/clt-tests/sharding/syntax/
✅ OK: 17
❌ Failed: 2
⏳ Duration: 314s
👉 Check Action Results for commit e6ed51b
Failed tests:

test/clt-tests/sharding/cluster/test-drop-sharded-clustering-table.rec
––– input –––
export INSTANCE=1
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export INSTANCE=2
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export CLUSTER_NAME=c
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create cluster ${CLUSTER_NAME}"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "show status like 'cluster_${CLUSTER_NAME}_status'\G"
––– output –––
OK
––– input –––
for n in `seq 2 $INSTANCE`; do mysql -h0 -P${n}306 -e "join cluster ${CLUSTER_NAME} at '127.0.0.1:1312'"; done;
––– output –––
OK
––– input –––
mysql -h0 -P${INSTANCE}306 -e "show status like 'cluster_${CLUSTER_NAME}_status'\G"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:tbl1(id bigint) shards='3' rf='2';"; echo $?;
––– output –––
OK
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 2306 failed!"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:tbl1;"; echo $?;
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: Waiting timeout exceeded.
+ 1
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 2306 failed!"
––– output –––
- === Node 2306 ===
+ *************************** 1. row ***************************
+ Table: tbl1
+ Type: distributed
+ === Node 2306 ===
––– input –––
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:Tbl2(id bigint) shards='3' rf='1';"; echo $?
––– output –––
OK
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 2306 failed!"
––– output –––
- Table: tbl2
+ Table: tbl1
- === Node 2306 ===
+ *************************** 2. row ***************************
- *************************** 1. row ***************************
+ Table: tbl2
- Table: tbl2
+ Type: distributed
- Type: distributed
+ === Node 2306 ===
+ *************************** 1. row ***************************
+ Table: tbl2
+ Type: distributed
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:Tbl2;"; echo $?
––– output –––
OK
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 2306 failed!"
––– output –––
- === Node 2306 ===
+ *************************** 1. row ***************************
+ Table: tbl1
+ Type: distributed
+ === Node 2306 ===
––– input –––
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:tbl_missing_type(id) shards='3' rf='1';"
––– output –––
OK
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 2306 failed!"
––– output –––
- Table: tbl_missing_type
+ Table: tbl1
- === Node 2306 ===
+ *************************** 2. row ***************************
- *************************** 1. row ***************************
+ Table: tbl_missing_type
- Table: tbl_missing_type
+ Type: distributed
- Type: distributed
+ === Node 2306 ===
+ *************************** 1. row ***************************
+ Table: tbl_missing_type
+ Type: distributed
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:tbl_missing_type;"; echo $?
––– output –––
OK
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 2306 failed!"
––– output –––
- === Node 2306 ===
+ *************************** 1. row ***************************
+ Table: tbl1
+ Type: distributed
+ === Node 2306 ===
––– input –––
LONG_TABLE_NAME=$(printf "tbl%065d" 1)
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:${LONG_TABLE_NAME}(id bigint) shards='3' rf='1';"
––– output –––
OK
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 2306 failed!"
––– output –––
- === Node 2306 ===
+ *************************** 2. row ***************************
- *************************** 1. row ***************************
+ Table: tbl1
- Table: tbl00000000000000000000000000000000000000000000000000000000000000001
+ Type: distributed
- Type: distributed
+ === Node 2306 ===
+ *************************** 1. row ***************************
+ Table: tbl00000000000000000000000000000000000000000000000000000000000000001
+ Type: distributed
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:${LONG_TABLE_NAME};"
––– output –––
OK
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 2306 failed!"
––– output –––
- === Node 2306 ===
+ *************************** 1. row ***************************
+ Table: tbl1
+ Type: distributed
+ === Node 2306 ===
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:nonexistent_table;"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "DROP TABLE nonexistent_cluster:tbl1;"
––– output –––
- ERROR 1064 (42000) at line 1: table 'tbl1' is missing: DROP TABLE failed: table 'tbl1' must exist
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:tbl1;"
––– output –––
- ERROR 1064 (42000) at line 1: table 'tbl1' is missing: DROP TABLE failed: table 'tbl1' must exist
––– input –––
mysql -h0 -P1306 -e "INSERT INTO ${CLUSTER_NAME}:tbl1 VALUES (1);" & sleep 1; mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:tbl1;"
––– output –––
- ERROR 1064 (42000) at line 1: Cannot create table with column names missing
+ ERROR 1064 (42000) at line 1: table 'tbl1' does not support INSERT
- ERROR 1064 (42000) at line 1: table 'tbl1' is missing: DROP TABLE failed: table 'tbl1' must exist
test/clt-tests/sharding/functional/functional-sharding-positive.rec
––– input –––
export INSTANCE=1
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export INSTANCE=2
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export INSTANCE=3
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export CLUSTER_NAME=replication
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create cluster ${CLUSTER_NAME}"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "show status like 'cluster_${CLUSTER_NAME}_status'\G"
––– output –––
OK
––– input –––
for n in `seq 2 $INSTANCE`; do mysql -h0 -P${n}306 -e "join cluster ${CLUSTER_NAME} at '127.0.0.1:1312'"; done;
––– output –––
OK
––– input –––
mysql -h0 -P${INSTANCE}306 -e "show status like 'cluster_${CLUSTER_NAME}_status'\G"
––– output –––
OK
––– input –––
for port in 1306 2306 3306; do timeout 60 mysql -h0 -P$port -e "SHOW STATUS LIKE 'cluster_replication_status'\G" > /tmp/status_$port.log && grep -q "Value: primary" /tmp/status_$port.log && echo "Port $port: Node synced"; done && cat /tmp/status_1306.log
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:tbl1(id bigint) shards='5' rf='2'"; echo $?
––– output –––
OK
––– input –––
for i in 1 2 3; do mysql -h0 -P${i}306 -e "show tables from system\G"; done | grep 'system.tbl1_s' | sort -V
––– output –––
OK
––– input –––
mysql -h0 -P2306 -e "create table ${CLUSTER_NAME}:tbl2(id bigint) shards='4' rf='1'"; echo $?
––– output –––
OK
––– input –––
for i in 1 2 3; do mysql -h0 -P${i}306 -e "show tables from system\G"; done | grep 'system.tbl2_s' | sort -V
––– output –––
OK
––– input –––
mysql -h0 -P3306 -e "create table ${CLUSTER_NAME}:tbl3(id bigint) shards='5' rf='2'"; echo $?
––– output –––
OK
––– input –––
for i in 1 2 3; do mysql -h0 -P${i}306 -e "show tables from system\G"; done | grep 'system.tbl3_s' | sort -V
––– output –––
OK
––– input –––
mysql -h0 -P3306 -e "DROP TABLE ${CLUSTER_NAME}:tbl3"; echo $?
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: Waiting timeout exceeded.
+ 1
––– input –––
mysql -h0 -P3306 -e "create table ${CLUSTER_NAME}:tbl3(id bigint) shards='10' rf='3'"; echo $?
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: table 'tbl3': CREATE TABLE failed: table 'tbl3' already exists
+ 1
––– input –––
for i in 1 2 3; do mysql -h0 -P${i}306 -e "show tables from system\G"; done | grep 'system.tbl3_s' | sort -V
––– output –––
- Table: system.tbl3_s0
+ Table: system.tbl3_s1
- Table: system.tbl3_s1
+ Table: system.tbl3_s2
- Table: system.tbl3_s1
+ Table: system.tbl3_s2
- Table: system.tbl3_s2
+ Table: system.tbl3_s3
- Table: system.tbl3_s2
+ Table: system.tbl3_s3
- Table: system.tbl3_s2
+ Table: system.tbl3_s4
- Table: system.tbl3_s3
+ Table: system.tbl3_s4
- Table: system.tbl3_s3
- Table: system.tbl3_s3
- Table: system.tbl3_s4
- Table: system.tbl3_s4
- Table: system.tbl3_s4
- Table: system.tbl3_s5
- Table: system.tbl3_s5
- Table: system.tbl3_s5
- Table: system.tbl3_s6
- Table: system.tbl3_s6
- Table: system.tbl3_s6
- Table: system.tbl3_s7
- Table: system.tbl3_s7
- Table: system.tbl3_s7
- Table: system.tbl3_s8
- Table: system.tbl3_s8
- Table: system.tbl3_s8
- Table: system.tbl3_s9
- Table: system.tbl3_s9
- Table: system.tbl3_s9
––– input –––
mysql -h0 -P3306 -e "create table ${CLUSTER_NAME}:tbl4(id bigint) shards='3000' rf='3' timeout='60'"; echo $?
––– output –––
OK
––– input –––
for i in 1 2 3; do mysql -h0 -P${i}306 -e "show tables from system\G"; done | grep -c 'system.tbl4_s'
––– output –––
OK
––– input –––
mysql -h0 -P3306 -e "create table ${CLUSTER_NAME}:tbl5(id bigint) shards='3001' rf='3'"?
––– output –––
OK

Copy link

clt

❌ CLT tests in test/clt-tests/sharding/cluster/ test/clt-tests/sharding/functional/ test/clt-tests/sharding/replication/ test/clt-tests/sharding/syntax/
✅ OK: 17
❌ Failed: 2
⏳ Duration: 322s
👉 Check Action Results for commit 28ac9b6
Failed tests:

test/clt-tests/sharding/cluster/test-drop-sharded-clustering-table.rec
––– input –––
export INSTANCE=1
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export INSTANCE=2
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export CLUSTER_NAME=c
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create cluster ${CLUSTER_NAME}"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "show status like 'cluster_${CLUSTER_NAME}_status'\G"
––– output –––
OK
––– input –––
for n in `seq 2 $INSTANCE`; do mysql -h0 -P${n}306 -e "join cluster ${CLUSTER_NAME} at '127.0.0.1:1312'"; done;
––– output –––
OK
––– input –––
mysql -h0 -P${INSTANCE}306 -e "show status like 'cluster_${CLUSTER_NAME}_status'\G"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:tbl1(id bigint) shards='3' rf='2';"; echo $?;
––– output –––
OK
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 2306 failed!"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:tbl1;"; echo $?;
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: Waiting timeout exceeded.
+ 1
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 2306 failed!"
––– output –––
- === Node 2306 ===
+ *************************** 1. row ***************************
+ Table: tbl1
+ Type: distributed
+ === Node 2306 ===
––– input –––
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:Tbl2(id bigint) shards='3' rf='1';"; echo $?
––– output –––
OK
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 2306 failed!"
––– output –––
- Table: tbl2
+ Table: tbl1
- === Node 2306 ===
+ *************************** 2. row ***************************
- *************************** 1. row ***************************
+ Table: tbl2
- Table: tbl2
+ Type: distributed
- Type: distributed
+ === Node 2306 ===
+ *************************** 1. row ***************************
+ Table: tbl2
+ Type: distributed
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:Tbl2;"; echo $?
––– output –––
OK
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 2306 failed!"
––– output –––
- === Node 2306 ===
+ *************************** 1. row ***************************
+ Table: tbl1
+ Type: distributed
+ === Node 2306 ===
––– input –––
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:tbl_missing_type(id) shards='3' rf='1';"
––– output –––
OK
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 2306 failed!"
––– output –––
- Table: tbl_missing_type
+ Table: tbl1
- === Node 2306 ===
+ *************************** 2. row ***************************
- *************************** 1. row ***************************
+ Table: tbl_missing_type
- Table: tbl_missing_type
+ Type: distributed
- Type: distributed
+ === Node 2306 ===
+ *************************** 1. row ***************************
+ Table: tbl_missing_type
+ Type: distributed
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:tbl_missing_type;"; echo $?
––– output –––
OK
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 2306 failed!"
––– output –––
- === Node 2306 ===
+ *************************** 1. row ***************************
+ Table: tbl1
+ Type: distributed
+ === Node 2306 ===
––– input –––
LONG_TABLE_NAME=$(printf "tbl%065d" 1)
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:${LONG_TABLE_NAME}(id bigint) shards='3' rf='1';"
––– output –––
OK
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 2306 failed!"
––– output –––
- === Node 2306 ===
+ *************************** 2. row ***************************
- *************************** 1. row ***************************
+ Table: tbl1
- Table: tbl00000000000000000000000000000000000000000000000000000000000000001
+ Type: distributed
- Type: distributed
+ === Node 2306 ===
+ *************************** 1. row ***************************
+ Table: tbl00000000000000000000000000000000000000000000000000000000000000001
+ Type: distributed
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:${LONG_TABLE_NAME};"
––– output –––
OK
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 2306 failed!"
––– output –––
- === Node 2306 ===
+ *************************** 1. row ***************************
+ Table: tbl1
+ Type: distributed
+ === Node 2306 ===
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:nonexistent_table;"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "DROP TABLE nonexistent_cluster:tbl1;"
––– output –––
- ERROR 1064 (42000) at line 1: table 'tbl1' is missing: DROP TABLE failed: table 'tbl1' must exist
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:tbl1;"
––– output –––
- ERROR 1064 (42000) at line 1: table 'tbl1' is missing: DROP TABLE failed: table 'tbl1' must exist
––– input –––
mysql -h0 -P1306 -e "INSERT INTO ${CLUSTER_NAME}:tbl1 VALUES (1);" & sleep 1; mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:tbl1;"
––– output –––
- ERROR 1064 (42000) at line 1: Cannot create table with column names missing
+ ERROR 1064 (42000) at line 1: table 'tbl1' does not support INSERT
- ERROR 1064 (42000) at line 1: table 'tbl1' is missing: DROP TABLE failed: table 'tbl1' must exist
test/clt-tests/sharding/functional/functional-sharding-positive.rec
––– input –––
export INSTANCE=1
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export INSTANCE=2
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export INSTANCE=3
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export CLUSTER_NAME=replication
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create cluster ${CLUSTER_NAME}"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "show status like 'cluster_${CLUSTER_NAME}_status'\G"
––– output –––
OK
––– input –––
for n in `seq 2 $INSTANCE`; do mysql -h0 -P${n}306 -e "join cluster ${CLUSTER_NAME} at '127.0.0.1:1312'"; done;
––– output –––
OK
––– input –––
mysql -h0 -P${INSTANCE}306 -e "show status like 'cluster_${CLUSTER_NAME}_status'\G"
––– output –––
OK
––– input –––
for port in 1306 2306 3306; do timeout 60 mysql -h0 -P$port -e "SHOW STATUS LIKE 'cluster_replication_status'\G" > /tmp/status_$port.log && grep -q "Value: primary" /tmp/status_$port.log && echo "Port $port: Node synced"; done && cat /tmp/status_1306.log
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:tbl1(id bigint) shards='5' rf='2'"; echo $?
––– output –––
OK
––– input –––
for i in 1 2 3; do mysql -h0 -P${i}306 -e "show tables from system\G"; done | grep 'system.tbl1_s' | sort -V
––– output –––
OK
––– input –––
mysql -h0 -P2306 -e "create table ${CLUSTER_NAME}:tbl2(id bigint) shards='4' rf='1'"; echo $?
––– output –––
OK
––– input –––
for i in 1 2 3; do mysql -h0 -P${i}306 -e "show tables from system\G"; done | grep 'system.tbl2_s' | sort -V
––– output –––
OK
––– input –––
mysql -h0 -P3306 -e "create table ${CLUSTER_NAME}:tbl3(id bigint) shards='5' rf='2'"; echo $?
––– output –––
OK
––– input –––
for i in 1 2 3; do mysql -h0 -P${i}306 -e "show tables from system\G"; done | grep 'system.tbl3_s' | sort -V
––– output –––
OK
––– input –––
mysql -h0 -P3306 -e "DROP TABLE ${CLUSTER_NAME}:tbl3"; echo $?
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: Waiting timeout exceeded.
+ 1
––– input –––
mysql -h0 -P3306 -e "create table ${CLUSTER_NAME}:tbl3(id bigint) shards='10' rf='3'"; echo $?
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: table 'tbl3': CREATE TABLE failed: table 'tbl3' already exists
+ 1
––– input –––
for i in 1 2 3; do mysql -h0 -P${i}306 -e "show tables from system\G"; done | grep 'system.tbl3_s' | sort -V
––– output –––
- Table: system.tbl3_s0
+ Table: system.tbl3_s1
- Table: system.tbl3_s1
+ Table: system.tbl3_s2
- Table: system.tbl3_s1
+ Table: system.tbl3_s2
- Table: system.tbl3_s2
+ Table: system.tbl3_s3
- Table: system.tbl3_s2
+ Table: system.tbl3_s3
- Table: system.tbl3_s2
+ Table: system.tbl3_s4
- Table: system.tbl3_s3
+ Table: system.tbl3_s4
- Table: system.tbl3_s3
- Table: system.tbl3_s3
- Table: system.tbl3_s4
- Table: system.tbl3_s4
- Table: system.tbl3_s4
- Table: system.tbl3_s5
- Table: system.tbl3_s5
- Table: system.tbl3_s5
- Table: system.tbl3_s6
- Table: system.tbl3_s6
- Table: system.tbl3_s6
- Table: system.tbl3_s7
- Table: system.tbl3_s7
- Table: system.tbl3_s7
- Table: system.tbl3_s8
- Table: system.tbl3_s8
- Table: system.tbl3_s8
- Table: system.tbl3_s9
- Table: system.tbl3_s9
- Table: system.tbl3_s9
––– input –––
mysql -h0 -P3306 -e "create table ${CLUSTER_NAME}:tbl4(id bigint) shards='3000' rf='3' timeout='60'"; echo $?
––– output –––
OK
––– input –––
for i in 1 2 3; do mysql -h0 -P${i}306 -e "show tables from system\G"; done | grep -c 'system.tbl4_s'
––– output –––
OK
––– input –––
mysql -h0 -P3306 -e "create table ${CLUSTER_NAME}:tbl5(id bigint) shards='3001' rf='3'"?
––– output –––
OK

Copy link

clt

❌ CLT tests in test/clt-tests/sharding/cluster/ test/clt-tests/sharding/functional/ test/clt-tests/sharding/replication/ test/clt-tests/sharding/syntax/
✅ OK: 17
❌ Failed: 2
⏳ Duration: 334s
👉 Check Action Results for commit f887226
Failed tests:

test/clt-tests/sharding/cluster/test-drop-sharded-clustering-table.rec
––– input –––
export INSTANCE=1
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export INSTANCE=2
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export CLUSTER_NAME=c
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create cluster ${CLUSTER_NAME}"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "show status like 'cluster_${CLUSTER_NAME}_status'\G"
––– output –––
OK
––– input –––
for n in `seq 2 $INSTANCE`; do mysql -h0 -P${n}306 -e "join cluster ${CLUSTER_NAME} at '127.0.0.1:1312'"; done;
––– output –––
OK
––– input –––
mysql -h0 -P${INSTANCE}306 -e "show status like 'cluster_${CLUSTER_NAME}_status'\G"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:tbl1(id bigint) shards='3' rf='2';"; echo $?;
––– output –––
OK
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 2306 failed!"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:tbl1;"; echo $?;
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: Waiting timeout exceeded.
+ 1
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 2306 failed!"
––– output –––
- === Node 2306 ===
+ *************************** 1. row ***************************
+ Table: tbl1
+ Type: distributed
+ === Node 2306 ===
––– input –––
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:Tbl2(id bigint) shards='3' rf='1';"; echo $?
––– output –––
OK
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 2306 failed!"
––– output –––
- Table: tbl2
+ Table: tbl1
- === Node 2306 ===
+ *************************** 2. row ***************************
- *************************** 1. row ***************************
+ Table: tbl2
- Table: tbl2
+ Type: distributed
- Type: distributed
+ === Node 2306 ===
+ *************************** 1. row ***************************
+ Table: tbl2
+ Type: distributed
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:Tbl2;"; echo $?
––– output –––
OK
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 2306 failed!"
––– output –––
- === Node 2306 ===
+ *************************** 1. row ***************************
+ Table: tbl1
+ Type: distributed
+ === Node 2306 ===
––– input –––
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:tbl_missing_type(id) shards='3' rf='1';"
––– output –––
OK
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 2306 failed!"
––– output –––
- Table: tbl_missing_type
+ Table: tbl1
- === Node 2306 ===
+ *************************** 2. row ***************************
- *************************** 1. row ***************************
+ Table: tbl_missing_type
- Table: tbl_missing_type
+ Type: distributed
- Type: distributed
+ === Node 2306 ===
+ *************************** 1. row ***************************
+ Table: tbl_missing_type
+ Type: distributed
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:tbl_missing_type;"; echo $?
––– output –––
OK
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 2306 failed!"
––– output –––
- === Node 2306 ===
+ *************************** 1. row ***************************
+ Table: tbl1
+ Type: distributed
+ === Node 2306 ===
––– input –––
LONG_TABLE_NAME=$(printf "tbl%065d" 1)
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:${LONG_TABLE_NAME}(id bigint) shards='3' rf='1';"
––– output –––
OK
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 2306 failed!"
––– output –––
- === Node 2306 ===
+ *************************** 2. row ***************************
- *************************** 1. row ***************************
+ Table: tbl1
- Table: tbl00000000000000000000000000000000000000000000000000000000000000001
+ Type: distributed
- Type: distributed
+ === Node 2306 ===
+ *************************** 1. row ***************************
+ Table: tbl00000000000000000000000000000000000000000000000000000000000000001
+ Type: distributed
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:${LONG_TABLE_NAME};"
––– output –––
OK
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 2306 failed!"
––– output –––
- === Node 2306 ===
+ *************************** 1. row ***************************
+ Table: tbl1
+ Type: distributed
+ === Node 2306 ===
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:nonexistent_table;"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "DROP TABLE nonexistent_cluster:tbl1;"
––– output –––
- ERROR 1064 (42000) at line 1: table 'tbl1' is missing: DROP TABLE failed: table 'tbl1' must exist
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:tbl1;"
––– output –––
- ERROR 1064 (42000) at line 1: table 'tbl1' is missing: DROP TABLE failed: table 'tbl1' must exist
––– input –––
mysql -h0 -P1306 -e "INSERT INTO ${CLUSTER_NAME}:tbl1 VALUES (1);" & sleep 1; mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:tbl1;"
––– output –––
- ERROR 1064 (42000) at line 1: Cannot create table with column names missing
+ ERROR 1064 (42000) at line 1: table 'tbl1' does not support INSERT
- ERROR 1064 (42000) at line 1: table 'tbl1' is missing: DROP TABLE failed: table 'tbl1' must exist
test/clt-tests/sharding/functional/functional-sharding-positive.rec
––– input –––
export INSTANCE=1
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export INSTANCE=2
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export INSTANCE=3
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export CLUSTER_NAME=replication
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create cluster ${CLUSTER_NAME}"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "show status like 'cluster_${CLUSTER_NAME}_status'\G"
––– output –––
OK
––– input –––
for n in `seq 2 $INSTANCE`; do mysql -h0 -P${n}306 -e "join cluster ${CLUSTER_NAME} at '127.0.0.1:1312'"; done;
––– output –––
OK
––– input –––
mysql -h0 -P${INSTANCE}306 -e "show status like 'cluster_${CLUSTER_NAME}_status'\G"
––– output –––
OK
––– input –––
for port in 1306 2306 3306; do timeout 60 mysql -h0 -P$port -e "SHOW STATUS LIKE 'cluster_replication_status'\G" > /tmp/status_$port.log && grep -q "Value: primary" /tmp/status_$port.log && echo "Port $port: Node synced"; done && cat /tmp/status_1306.log
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:tbl1(id bigint) shards='5' rf='2'"; echo $?
––– output –––
OK
––– input –––
for i in 1 2 3; do mysql -h0 -P${i}306 -e "show tables from system\G"; done | grep 'system.tbl1_s' | sort -V
––– output –––
OK
––– input –––
mysql -h0 -P2306 -e "create table ${CLUSTER_NAME}:tbl2(id bigint) shards='4' rf='1'"; echo $?
––– output –––
OK
––– input –––
for i in 1 2 3; do mysql -h0 -P${i}306 -e "show tables from system\G"; done | grep 'system.tbl2_s' | sort -V
––– output –––
OK
––– input –––
mysql -h0 -P3306 -e "create table ${CLUSTER_NAME}:tbl3(id bigint) shards='5' rf='2'"; echo $?
––– output –––
OK
––– input –––
for i in 1 2 3; do mysql -h0 -P${i}306 -e "show tables from system\G"; done | grep 'system.tbl3_s' | sort -V
––– output –––
OK
––– input –––
mysql -h0 -P3306 -e "DROP TABLE ${CLUSTER_NAME}:tbl3"; echo $?
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: Waiting timeout exceeded.
+ 1
––– input –––
mysql -h0 -P3306 -e "create table ${CLUSTER_NAME}:tbl3(id bigint) shards='10' rf='3'"; echo $?
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: table 'tbl3': CREATE TABLE failed: table 'tbl3' already exists
+ 1
––– input –––
for i in 1 2 3; do mysql -h0 -P${i}306 -e "show tables from system\G"; done | grep 'system.tbl3_s' | sort -V
––– output –––
- Table: system.tbl3_s0
+ Table: system.tbl3_s1
- Table: system.tbl3_s1
+ Table: system.tbl3_s2
- Table: system.tbl3_s1
+ Table: system.tbl3_s2
- Table: system.tbl3_s2
+ Table: system.tbl3_s3
- Table: system.tbl3_s2
+ Table: system.tbl3_s3
- Table: system.tbl3_s2
+ Table: system.tbl3_s4
- Table: system.tbl3_s3
+ Table: system.tbl3_s4
- Table: system.tbl3_s3
- Table: system.tbl3_s3
- Table: system.tbl3_s4
- Table: system.tbl3_s4
- Table: system.tbl3_s4
- Table: system.tbl3_s5
- Table: system.tbl3_s5
- Table: system.tbl3_s5
- Table: system.tbl3_s6
- Table: system.tbl3_s6
- Table: system.tbl3_s6
- Table: system.tbl3_s7
- Table: system.tbl3_s7
- Table: system.tbl3_s7
- Table: system.tbl3_s8
- Table: system.tbl3_s8
- Table: system.tbl3_s8
- Table: system.tbl3_s9
- Table: system.tbl3_s9
- Table: system.tbl3_s9
––– input –––
mysql -h0 -P3306 -e "create table ${CLUSTER_NAME}:tbl4(id bigint) shards='3000' rf='3' timeout='60'"; echo $?
––– output –––
OK
––– input –––
for i in 1 2 3; do mysql -h0 -P${i}306 -e "show tables from system\G"; done | grep -c 'system.tbl4_s'
––– output –––
OK
––– input –––
mysql -h0 -P3306 -e "create table ${CLUSTER_NAME}:tbl5(id bigint) shards='3001' rf='3'"?
––– output –––
OK

Copy link

clt

❌ CLT tests in test/clt-tests/sharding/cluster/ test/clt-tests/sharding/functional/ test/clt-tests/sharding/replication/ test/clt-tests/sharding/syntax/
✅ OK: 17
❌ Failed: 2
⏳ Duration: 328s
👉 Check Action Results for commit b1a9e5b
Failed tests:

test/clt-tests/sharding/cluster/test-drop-sharded-clustering-table.rec
––– input –––
export INSTANCE=1
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export INSTANCE=2
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export CLUSTER_NAME=c
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create cluster ${CLUSTER_NAME}"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "show status like 'cluster_${CLUSTER_NAME}_status'\G"
––– output –––
OK
––– input –––
for n in `seq 2 $INSTANCE`; do mysql -h0 -P${n}306 -e "join cluster ${CLUSTER_NAME} at '127.0.0.1:1312'"; done;
––– output –––
OK
––– input –––
mysql -h0 -P${INSTANCE}306 -e "show status like 'cluster_${CLUSTER_NAME}_status'\G"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:tbl1(id bigint) shards='3' rf='2';"; echo $?;
––– output –––
OK
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 2306 failed!"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:tbl1;"; echo $?;
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: Waiting timeout exceeded.
+ 1
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 2306 failed!"
––– output –––
- === Node 2306 ===
+ *************************** 1. row ***************************
+ Table: tbl1
+ Type: distributed
+ === Node 2306 ===
––– input –––
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:Tbl2(id bigint) shards='3' rf='1';"; echo $?
––– output –––
OK
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 2306 failed!"
––– output –––
- Table: tbl2
+ Table: tbl1
- === Node 2306 ===
+ *************************** 2. row ***************************
- *************************** 1. row ***************************
+ Table: tbl2
- Table: tbl2
+ Type: distributed
- Type: distributed
+ === Node 2306 ===
+ *************************** 1. row ***************************
+ Table: tbl2
+ Type: distributed
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:Tbl2;"; echo $?
––– output –––
OK
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 2306 failed!"
––– output –––
- === Node 2306 ===
+ *************************** 1. row ***************************
+ Table: tbl1
+ Type: distributed
+ === Node 2306 ===
––– input –––
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:tbl_missing_type(id) shards='3' rf='1';"
––– output –––
OK
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 2306 failed!"
––– output –––
- Table: tbl_missing_type
+ Table: tbl1
- === Node 2306 ===
+ *************************** 2. row ***************************
- *************************** 1. row ***************************
+ Table: tbl_missing_type
- Table: tbl_missing_type
+ Type: distributed
- Type: distributed
+ === Node 2306 ===
+ *************************** 1. row ***************************
+ Table: tbl_missing_type
+ Type: distributed
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:tbl_missing_type;"; echo $?
––– output –––
OK
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 2306 failed!"
––– output –––
- === Node 2306 ===
+ *************************** 1. row ***************************
+ Table: tbl1
+ Type: distributed
+ === Node 2306 ===
––– input –––
LONG_TABLE_NAME=$(printf "tbl%065d" 1)
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:${LONG_TABLE_NAME}(id bigint) shards='3' rf='1';"
––– output –––
OK
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 2306 failed!"
––– output –––
- === Node 2306 ===
+ *************************** 2. row ***************************
- *************************** 1. row ***************************
+ Table: tbl1
- Table: tbl00000000000000000000000000000000000000000000000000000000000000001
+ Type: distributed
- Type: distributed
+ === Node 2306 ===
+ *************************** 1. row ***************************
+ Table: tbl00000000000000000000000000000000000000000000000000000000000000001
+ Type: distributed
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:${LONG_TABLE_NAME};"
––– output –––
OK
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 2306 failed!"
––– output –––
- === Node 2306 ===
+ *************************** 1. row ***************************
+ Table: tbl1
+ Type: distributed
+ === Node 2306 ===
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:nonexistent_table;"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "DROP TABLE nonexistent_cluster:tbl1;"
––– output –––
- ERROR 1064 (42000) at line 1: table 'tbl1' is missing: DROP TABLE failed: table 'tbl1' must exist
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:tbl1;"
––– output –––
- ERROR 1064 (42000) at line 1: table 'tbl1' is missing: DROP TABLE failed: table 'tbl1' must exist
––– input –––
mysql -h0 -P1306 -e "INSERT INTO ${CLUSTER_NAME}:tbl1 VALUES (1);" & sleep 1; mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:tbl1;"
––– output –––
- ERROR 1064 (42000) at line 1: Cannot create table with column names missing
+ ERROR 1064 (42000) at line 1: table 'tbl1' does not support INSERT
- ERROR 1064 (42000) at line 1: table 'tbl1' is missing: DROP TABLE failed: table 'tbl1' must exist
test/clt-tests/sharding/functional/functional-sharding-positive.rec
––– input –––
export INSTANCE=1
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export INSTANCE=2
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export INSTANCE=3
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export CLUSTER_NAME=replication
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create cluster ${CLUSTER_NAME}"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "show status like 'cluster_${CLUSTER_NAME}_status'\G"
––– output –––
OK
––– input –––
for n in `seq 2 $INSTANCE`; do mysql -h0 -P${n}306 -e "join cluster ${CLUSTER_NAME} at '127.0.0.1:1312'"; done;
––– output –––
OK
––– input –––
mysql -h0 -P${INSTANCE}306 -e "show status like 'cluster_${CLUSTER_NAME}_status'\G"
––– output –––
OK
––– input –––
for port in 1306 2306 3306; do timeout 60 mysql -h0 -P$port -e "SHOW STATUS LIKE 'cluster_replication_status'\G" > /tmp/status_$port.log && grep -q "Value: primary" /tmp/status_$port.log && echo "Port $port: Node synced"; done && cat /tmp/status_1306.log
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:tbl1(id bigint) shards='5' rf='2'"; echo $?
––– output –––
OK
––– input –––
for i in 1 2 3; do mysql -h0 -P${i}306 -e "show tables from system\G"; done | grep 'system.tbl1_s' | sort -V
––– output –––
OK
––– input –––
mysql -h0 -P2306 -e "create table ${CLUSTER_NAME}:tbl2(id bigint) shards='4' rf='1'"; echo $?
––– output –––
OK
––– input –––
for i in 1 2 3; do mysql -h0 -P${i}306 -e "show tables from system\G"; done | grep 'system.tbl2_s' | sort -V
––– output –––
OK
––– input –––
mysql -h0 -P3306 -e "create table ${CLUSTER_NAME}:tbl3(id bigint) shards='5' rf='2'"; echo $?
––– output –––
OK
––– input –––
for i in 1 2 3; do mysql -h0 -P${i}306 -e "show tables from system\G"; done | grep 'system.tbl3_s' | sort -V
––– output –––
OK
––– input –––
mysql -h0 -P3306 -e "DROP TABLE ${CLUSTER_NAME}:tbl3"; echo $?
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: Waiting timeout exceeded.
+ 1
––– input –––
mysql -h0 -P3306 -e "create table ${CLUSTER_NAME}:tbl3(id bigint) shards='10' rf='3'"; echo $?
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: table 'tbl3': CREATE TABLE failed: table 'tbl3' already exists
+ 1
––– input –––
for i in 1 2 3; do mysql -h0 -P${i}306 -e "show tables from system\G"; done | grep 'system.tbl3_s' | sort -V
––– output –––
- Table: system.tbl3_s0
+ Table: system.tbl3_s1
- Table: system.tbl3_s1
+ Table: system.tbl3_s2
- Table: system.tbl3_s1
+ Table: system.tbl3_s2
- Table: system.tbl3_s2
+ Table: system.tbl3_s3
- Table: system.tbl3_s2
+ Table: system.tbl3_s3
- Table: system.tbl3_s2
+ Table: system.tbl3_s4
- Table: system.tbl3_s3
+ Table: system.tbl3_s4
- Table: system.tbl3_s3
- Table: system.tbl3_s3
- Table: system.tbl3_s4
- Table: system.tbl3_s4
- Table: system.tbl3_s4
- Table: system.tbl3_s5
- Table: system.tbl3_s5
- Table: system.tbl3_s5
- Table: system.tbl3_s6
- Table: system.tbl3_s6
- Table: system.tbl3_s6
- Table: system.tbl3_s7
- Table: system.tbl3_s7
- Table: system.tbl3_s7
- Table: system.tbl3_s8
- Table: system.tbl3_s8
- Table: system.tbl3_s8
- Table: system.tbl3_s9
- Table: system.tbl3_s9
- Table: system.tbl3_s9
––– input –––
mysql -h0 -P3306 -e "create table ${CLUSTER_NAME}:tbl4(id bigint) shards='3000' rf='3' timeout='60'"; echo $?
––– output –––
OK
––– input –––
for i in 1 2 3; do mysql -h0 -P${i}306 -e "show tables from system\G"; done | grep -c 'system.tbl4_s'
––– output –––
OK
––– input –––
mysql -h0 -P3306 -e "create table ${CLUSTER_NAME}:tbl5(id bigint) shards='3001' rf='3'"?
––– output –––
OK

@donhardman donhardman force-pushed the feature/sharding-rollback branch from 8f5e363 to 1c4d3e8 Compare August 19, 2025 14:09
Copy link

clt

❌ CLT tests in test/clt-tests/bugs/
✅ OK: 6
❌ Failed: 1
⏳ Duration: 102s
👉 Check Action Results for commit 564153b
Failed tests:

test/clt-tests/bugs/567-fuzzy-search-skips-numeric-words.rec
––– input –––
rm -f /var/log/manticore/searchd.log; stdbuf -oL searchd $SEARCHD_FLAGS > /dev/null; if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore/searchd.log;fi
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "DROP TABLE IF EXISTS t; CREATE TABLE t(f text) min_infix_len='2';"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "INSERT INTO t VALUES(1, 'abc 12a'), (2, 'abc');"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT *, weight() FROM t WHERE MATCH('abc 12a') OPTION fuzzy=1;"
––– output –––
- |    1 | abc 12a |     3821 |
+ |    1 | abc 12a |      237 |
––– input –––
mysql -h0 -P9306 -e "INSERT INTO t VALUES(3, 'test 123abc'), (4, 'test 456def'), (5, 'test');"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT *, weight() FROM t WHERE MATCH('test 123abc') OPTION fuzzy=1;"
––– output –––
- |    3 | test 123abc |     6000 |
+ |    3 | test 123abc |     4381 |
––– input –––
mysql -h0 -P9306 -e "SELECT *, weight() FROM t WHERE MATCH('abc 12a');"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "INSERT INTO t VALUES(6, 'hello world'), (7, 'hello');"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT *, weight() FROM t WHERE MATCH('hello world') OPTION fuzzy=1;"
––– output –––
- |    6 | hello world |     7882 |
+ |    6 | hello world |     7461 |
––– input –––
mysql -h0 -P9306 -e "SELECT *, weight() FROM t WHERE MATCH('12a') OPTION fuzzy=1;"
––– output –––
OK

Copy link

clt

❌ CLT tests in test/clt-tests/sharding/cluster/ test/clt-tests/sharding/functional/ test/clt-tests/sharding/replication/ test/clt-tests/sharding/syntax/
✅ OK: 17
❌ Failed: 2
⏳ Duration: 325s
👉 Check Action Results for commit 564153b
Failed tests:

test/clt-tests/sharding/cluster/test-drop-sharded-clustering-table.rec
––– input –––
export INSTANCE=1
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export INSTANCE=2
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export CLUSTER_NAME=c
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create cluster ${CLUSTER_NAME}"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "show status like 'cluster_${CLUSTER_NAME}_status'\G"
––– output –––
OK
––– input –––
for n in `seq 2 $INSTANCE`; do mysql -h0 -P${n}306 -e "join cluster ${CLUSTER_NAME} at '127.0.0.1:1312'"; done;
––– output –––
OK
––– input –––
mysql -h0 -P${INSTANCE}306 -e "show status like 'cluster_${CLUSTER_NAME}_status'\G"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:tbl1(id bigint) shards='3' rf='2';"; echo $?;
––– output –––
OK
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 2306 failed!"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:tbl1;"; echo $?;
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: Waiting timeout exceeded.
+ 1
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 2306 failed!"
––– output –––
- === Node 2306 ===
+ *************************** 1. row ***************************
+ Table: tbl1
+ Type: distributed
+ === Node 2306 ===
––– input –––
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:Tbl2(id bigint) shards='3' rf='1';"; echo $?
––– output –––
OK
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 2306 failed!"
––– output –––
- Table: tbl2
+ Table: tbl1
- === Node 2306 ===
+ *************************** 2. row ***************************
- *************************** 1. row ***************************
+ Table: tbl2
- Table: tbl2
+ Type: distributed
- Type: distributed
+ === Node 2306 ===
+ *************************** 1. row ***************************
+ Table: tbl2
+ Type: distributed
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:Tbl2;"; echo $?
––– output –––
OK
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 2306 failed!"
––– output –––
- === Node 2306 ===
+ *************************** 1. row ***************************
+ Table: tbl1
+ Type: distributed
+ === Node 2306 ===
––– input –––
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:tbl_missing_type(id) shards='3' rf='1';"
––– output –––
OK
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 2306 failed!"
––– output –––
- Table: tbl_missing_type
+ Table: tbl1
- === Node 2306 ===
+ *************************** 2. row ***************************
- *************************** 1. row ***************************
+ Table: tbl_missing_type
- Table: tbl_missing_type
+ Type: distributed
- Type: distributed
+ === Node 2306 ===
+ *************************** 1. row ***************************
+ Table: tbl_missing_type
+ Type: distributed
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:tbl_missing_type;"; echo $?
––– output –––
OK
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 2306 failed!"
––– output –––
- === Node 2306 ===
+ *************************** 1. row ***************************
+ Table: tbl1
+ Type: distributed
+ === Node 2306 ===
––– input –––
LONG_TABLE_NAME=$(printf "tbl%065d" 1)
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:${LONG_TABLE_NAME}(id bigint) shards='3' rf='1';"
––– output –––
OK
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 2306 failed!"
––– output –––
- === Node 2306 ===
+ *************************** 2. row ***************************
- *************************** 1. row ***************************
+ Table: tbl1
- Table: tbl00000000000000000000000000000000000000000000000000000000000000001
+ Type: distributed
- Type: distributed
+ === Node 2306 ===
+ *************************** 1. row ***************************
+ Table: tbl00000000000000000000000000000000000000000000000000000000000000001
+ Type: distributed
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:${LONG_TABLE_NAME};"
––– output –––
OK
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 2306 failed!"
––– output –––
- === Node 2306 ===
+ *************************** 1. row ***************************
+ Table: tbl1
+ Type: distributed
+ === Node 2306 ===
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:nonexistent_table;"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "DROP TABLE nonexistent_cluster:tbl1;"
––– output –––
- ERROR 1064 (42000) at line 1: table 'tbl1' is missing: DROP TABLE failed: table 'tbl1' must exist
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:tbl1;"
––– output –––
- ERROR 1064 (42000) at line 1: table 'tbl1' is missing: DROP TABLE failed: table 'tbl1' must exist
––– input –––
mysql -h0 -P1306 -e "INSERT INTO ${CLUSTER_NAME}:tbl1 VALUES (1);" & sleep 1; mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:tbl1;"
––– output –––
- ERROR 1064 (42000) at line 1: Cannot create table with column names missing
+ ERROR 1064 (42000) at line 1: table 'tbl1' does not support INSERT
- ERROR 1064 (42000) at line 1: table 'tbl1' is missing: DROP TABLE failed: table 'tbl1' must exist
test/clt-tests/sharding/functional/functional-sharding-positive.rec
––– input –––
export INSTANCE=1
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export INSTANCE=2
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export INSTANCE=3
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export CLUSTER_NAME=replication
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create cluster ${CLUSTER_NAME}"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "show status like 'cluster_${CLUSTER_NAME}_status'\G"
––– output –––
OK
––– input –––
for n in `seq 2 $INSTANCE`; do mysql -h0 -P${n}306 -e "join cluster ${CLUSTER_NAME} at '127.0.0.1:1312'"; done;
––– output –––
OK
––– input –––
mysql -h0 -P${INSTANCE}306 -e "show status like 'cluster_${CLUSTER_NAME}_status'\G"
––– output –––
OK
––– input –––
for port in 1306 2306 3306; do timeout 60 mysql -h0 -P$port -e "SHOW STATUS LIKE 'cluster_replication_status'\G" > /tmp/status_$port.log && grep -q "Value: primary" /tmp/status_$port.log && echo "Port $port: Node synced"; done && cat /tmp/status_1306.log
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:tbl1(id bigint) shards='5' rf='2'"; echo $?
––– output –––
OK
––– input –––
for i in 1 2 3; do mysql -h0 -P${i}306 -e "show tables from system\G"; done | grep 'system.tbl1_s' | sort -V
––– output –––
OK
––– input –––
mysql -h0 -P2306 -e "create table ${CLUSTER_NAME}:tbl2(id bigint) shards='4' rf='1'"; echo $?
––– output –––
OK
––– input –––
for i in 1 2 3; do mysql -h0 -P${i}306 -e "show tables from system\G"; done | grep 'system.tbl2_s' | sort -V
––– output –––
OK
––– input –––
mysql -h0 -P3306 -e "create table ${CLUSTER_NAME}:tbl3(id bigint) shards='5' rf='2'"; echo $?
––– output –––
OK
––– input –––
for i in 1 2 3; do mysql -h0 -P${i}306 -e "show tables from system\G"; done | grep 'system.tbl3_s' | sort -V
––– output –––
OK
––– input –––
mysql -h0 -P3306 -e "DROP TABLE ${CLUSTER_NAME}:tbl3"; echo $?
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: Waiting timeout exceeded.
+ 1
––– input –––
mysql -h0 -P3306 -e "create table ${CLUSTER_NAME}:tbl3(id bigint) shards='10' rf='3'"; echo $?
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: table 'tbl3': CREATE TABLE failed: table 'tbl3' already exists
+ 1
––– input –––
for i in 1 2 3; do mysql -h0 -P${i}306 -e "show tables from system\G"; done | grep 'system.tbl3_s' | sort -V
––– output –––
- Table: system.tbl3_s0
+ Table: system.tbl3_s1
- Table: system.tbl3_s1
+ Table: system.tbl3_s2
- Table: system.tbl3_s1
+ Table: system.tbl3_s2
- Table: system.tbl3_s2
+ Table: system.tbl3_s3
- Table: system.tbl3_s2
+ Table: system.tbl3_s3
- Table: system.tbl3_s2
+ Table: system.tbl3_s4
- Table: system.tbl3_s3
+ Table: system.tbl3_s4
- Table: system.tbl3_s3
- Table: system.tbl3_s3
- Table: system.tbl3_s4
- Table: system.tbl3_s4
- Table: system.tbl3_s4
- Table: system.tbl3_s5
- Table: system.tbl3_s5
- Table: system.tbl3_s5
- Table: system.tbl3_s6
- Table: system.tbl3_s6
- Table: system.tbl3_s6
- Table: system.tbl3_s7
- Table: system.tbl3_s7
- Table: system.tbl3_s7
- Table: system.tbl3_s8
- Table: system.tbl3_s8
- Table: system.tbl3_s8
- Table: system.tbl3_s9
- Table: system.tbl3_s9
- Table: system.tbl3_s9
––– input –––
mysql -h0 -P3306 -e "create table ${CLUSTER_NAME}:tbl4(id bigint) shards='3000' rf='3' timeout='60'"; echo $?
––– output –––
OK
––– input –––
for i in 1 2 3; do mysql -h0 -P${i}306 -e "show tables from system\G"; done | grep -c 'system.tbl4_s'
––– output –––
OK
––– input –––
mysql -h0 -P3306 -e "create table ${CLUSTER_NAME}:tbl5(id bigint) shards='3001' rf='3'"?
––– output –––
OK

Copy link

clt

❌ CLT tests in test/clt-tests/bugs/
✅ OK: 6
❌ Failed: 1
⏳ Duration: 110s
👉 Check Action Results for commit abe72ad
Failed tests:

test/clt-tests/bugs/567-fuzzy-search-skips-numeric-words.rec
––– input –––
rm -f /var/log/manticore/searchd.log; stdbuf -oL searchd $SEARCHD_FLAGS > /dev/null; if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore/searchd.log;fi
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "DROP TABLE IF EXISTS t; CREATE TABLE t(f text) min_infix_len='2';"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "INSERT INTO t VALUES(1, 'abc 12a'), (2, 'abc');"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT *, weight() FROM t WHERE MATCH('abc 12a') OPTION fuzzy=1;"
––– output –––
- |    1 | abc 12a |     3821 |
+ |    1 | abc 12a |      237 |
––– input –––
mysql -h0 -P9306 -e "INSERT INTO t VALUES(3, 'test 123abc'), (4, 'test 456def'), (5, 'test');"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT *, weight() FROM t WHERE MATCH('test 123abc') OPTION fuzzy=1;"
––– output –––
- |    3 | test 123abc |     6000 |
+ |    3 | test 123abc |     4381 |
––– input –––
mysql -h0 -P9306 -e "SELECT *, weight() FROM t WHERE MATCH('abc 12a');"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "INSERT INTO t VALUES(6, 'hello world'), (7, 'hello');"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT *, weight() FROM t WHERE MATCH('hello world') OPTION fuzzy=1;"
––– output –––
- |    6 | hello world |     7882 |
+ |    6 | hello world |     7461 |
––– input –––
mysql -h0 -P9306 -e "SELECT *, weight() FROM t WHERE MATCH('12a') OPTION fuzzy=1;"
––– output –––
OK

Copy link

clt

❌ CLT tests in test/clt-tests/bugs/
✅ OK: 6
❌ Failed: 1
⏳ Duration: 111s
👉 Check Action Results for commit ce1bb0d
Failed tests:

test/clt-tests/bugs/567-fuzzy-search-skips-numeric-words.rec
––– input –––
rm -f /var/log/manticore/searchd.log; stdbuf -oL searchd $SEARCHD_FLAGS > /dev/null; if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore/searchd.log;fi
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "DROP TABLE IF EXISTS t; CREATE TABLE t(f text) min_infix_len='2';"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "INSERT INTO t VALUES(1, 'abc 12a'), (2, 'abc');"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT *, weight() FROM t WHERE MATCH('abc 12a') OPTION fuzzy=1;"
––– output –––
- |    1 | abc 12a |     3821 |
+ |    1 | abc 12a |      237 |
––– input –––
mysql -h0 -P9306 -e "INSERT INTO t VALUES(3, 'test 123abc'), (4, 'test 456def'), (5, 'test');"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT *, weight() FROM t WHERE MATCH('test 123abc') OPTION fuzzy=1;"
––– output –––
- |    3 | test 123abc |     6000 |
+ |    3 | test 123abc |     4381 |
––– input –––
mysql -h0 -P9306 -e "SELECT *, weight() FROM t WHERE MATCH('abc 12a');"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "INSERT INTO t VALUES(6, 'hello world'), (7, 'hello');"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT *, weight() FROM t WHERE MATCH('hello world') OPTION fuzzy=1;"
––– output –––
- |    6 | hello world |     7882 |
+ |    6 | hello world |     7461 |
––– input –––
mysql -h0 -P9306 -e "SELECT *, weight() FROM t WHERE MATCH('12a') OPTION fuzzy=1;"
––– output –––
OK

@donhardman donhardman requested a review from Copilot August 20, 2025 03:39
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements a comprehensive rollback mechanism for the sharding system, transforming it from a basic distributed system into a production-ready platform with automatic error recovery and resource management capabilities.

  • Adds always-on rollback support requiring explicit rollback commands for all operations
  • Implements rebalancing control with stop/pause/resume functionality and graceful vs immediate stop options
  • Introduces comprehensive health monitoring with automatic issue detection and recovery mechanisms

Reviewed Changes

Copilot reviewed 24 out of 26 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
test/Plugin/Sharding/TestDoubles/*.php Updates namespace and adds rollback support to test doubles with mock command generation
test/Plugin/Sharding/*Test.php Updates existing tests to use new rollback-aware queue interface and adds comprehensive rollback system tests
src/Plugin/Sharding/Table.php Adds operation groups, automatic rollback on failure, and rebalancing control (stop/pause/resume)
src/Plugin/Sharding/Queue.php Implements mandatory rollback command storage and execution in queue system
src/Plugin/Sharding/Cluster.php Updates cluster operations to support rollback commands and operation groups
src/Plugin/Sharding/*.php Adds health monitoring and cleanup management systems for automatic recovery
doc/sharding/*.md Updates documentation to reflect new rollback system and enhanced capabilities

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

$queue->add('node1', 'ALTER TABLE test ATTACH CLUSTER test_cluster:test');
$queue->add('node2', 'INSERT INTO test SELECT * FROM test_cluster:test');
$queue->add('node3', 'ALTER CLUSTER test_cluster UPDATE nodes');
$queue->add('node1', 'DELETE FROM test WHERE shard_id IN (2,3)');
Copy link
Preview

Copilot AI Aug 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This call to queue->add() only passes 2 parameters but the updated Queue interface requires 4 parameters (nodeId, query, rollbackQuery, operationGroup). This will cause a fatal error when the real Queue class is used.

Suggested change
$queue->add('node1', 'DELETE FROM test WHERE shard_id IN (2,3)');
$queue->add('node1', 'ALTER TABLE test ATTACH CLUSTER test_cluster:test', null, null);
$queue->add('node2', 'INSERT INTO test SELECT * FROM test_cluster:test', null, null);
$queue->add('node3', 'ALTER CLUSTER test_cluster UPDATE nodes', null, null);
$queue->add('node1', 'DELETE FROM test WHERE shard_id IN (2,3)', null, null);
break;
case 'RF1_OUTAGE_SUFFICIENT':
// RF=1 with sufficient nodes: shard movement (5+ commands)
$queue->add('node1', 'ALTER TABLE test ATTACH CLUSTER test_cluster:test', null, null);
$queue->add('node3', 'CREATE TABLE test_temp LIKE test', null, null);
$queue->add('node3', 'INSERT INTO test_temp SELECT * FROM test_cluster:test WHERE shard_id = 2', null, null);
$queue->add('node3', 'ALTER TABLE test_temp RENAME TO test', null, null);
$queue->add('node1', 'ALTER CLUSTER test_cluster UPDATE nodes', null, null);
break;
case 'RF1_OUTAGE_INSUFFICIENT':
// RF=1 insufficient nodes: degraded mode with table drop
$queue->add('node1', 'DROP TABLE test_table', null, null);
$queue->add('node1', 'ALTER CLUSTER test_cluster UPDATE nodes', null, null);
$queue->add('node1', 'CREATE TABLE test_table_degraded LIKE test_table', null, null);
break;
case 'CATASTROPHIC_FAILURE':
// Catastrophic failure: survival mode (2+ commands)
$queue->add('node1', 'ALTER CLUSTER test_cluster UPDATE nodes', null, null);
$queue->add('node1', 'CREATE TABLE test_table_backup AS SELECT * FROM test_table', null, null);
break;
default:
// Default: basic commands
$queue->add('node1', 'ALTER TABLE test ATTACH CLUSTER test_cluster:test', null, null);
$queue->add('node2', 'INSERT INTO test SELECT * FROM test_cluster:test', null, null);
$queue->add('node3', 'ALTER CLUSTER test_cluster UPDATE nodes', null, null);
$queue->add('node1', 'DELETE FROM test WHERE shard_id IN (2,3)', null, null);

Copilot uses AI. Check for mistakes.

$queue->add('node1', 'ALTER TABLE test ATTACH CLUSTER test_cluster:test');
$queue->add('node2', 'INSERT INTO test SELECT * FROM test_cluster:test');
$queue->add('node3', 'ALTER CLUSTER test_cluster UPDATE nodes');
$queue->add('node1', 'DELETE FROM test WHERE shard_id IN (2,3)');
Copy link
Preview

Copilot AI Aug 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This call to queue->add() only passes 2 parameters but the updated Queue interface requires 4 parameters (nodeId, query, rollbackQuery, operationGroup). This will cause a fatal error when the real Queue class is used.

Suggested change
$queue->add('node1', 'DELETE FROM test WHERE shard_id IN (2,3)');
$queue->add('node1', 'ALTER TABLE test ATTACH CLUSTER test_cluster:test', null, null);
$queue->add('node2', 'INSERT INTO test SELECT * FROM test_cluster:test', null, null);
$queue->add('node3', 'ALTER CLUSTER test_cluster UPDATE nodes', null, null);
$queue->add('node1', 'DELETE FROM test WHERE shard_id IN (2,3)', null, null);
break;
case 'RF1_OUTAGE_SUFFICIENT':
// RF=1 with sufficient nodes: shard movement (5+ commands)
$queue->add('node1', 'ALTER TABLE test ATTACH CLUSTER test_cluster:test', null, null);
$queue->add('node3', 'CREATE TABLE test_temp LIKE test', null, null);
$queue->add('node3', 'INSERT INTO test_temp SELECT * FROM test_cluster:test WHERE shard_id = 2', null, null);
$queue->add('node3', 'ALTER TABLE test_temp RENAME TO test', null, null);
$queue->add('node1', 'ALTER CLUSTER test_cluster UPDATE nodes', null, null);
break;
case 'RF1_OUTAGE_INSUFFICIENT':
// RF=1 insufficient nodes: degraded mode with table drop
$queue->add('node1', 'DROP TABLE test_table', null, null);
$queue->add('node1', 'ALTER CLUSTER test_cluster UPDATE nodes', null, null);
$queue->add('node1', 'CREATE TABLE test_table_degraded LIKE test_table', null, null);
break;
case 'CATASTROPHIC_FAILURE':
// Catastrophic failure: survival mode (2+ commands)
$queue->add('node1', 'ALTER CLUSTER test_cluster UPDATE nodes', null, null);
$queue->add('node1', 'CREATE TABLE test_table_backup AS SELECT * FROM test_table', null, null);
break;
default:
// Default: basic commands
$queue->add('node1', 'ALTER TABLE test ATTACH CLUSTER test_cluster:test', null, null);
$queue->add('node2', 'INSERT INTO test SELECT * FROM test_cluster:test', null, null);
$queue->add('node3', 'ALTER CLUSTER test_cluster UPDATE nodes', null, null);
$queue->add('node1', 'DELETE FROM test WHERE shard_id IN (2,3)', null, null);

Copilot uses AI. Check for mistakes.

$queue->add('node1', 'ALTER TABLE test ATTACH CLUSTER test_cluster:test');
$queue->add('node2', 'INSERT INTO test SELECT * FROM test_cluster:test');
$queue->add('node3', 'ALTER CLUSTER test_cluster UPDATE nodes');
$queue->add('node1', 'DELETE FROM test WHERE shard_id IN (2,3)');
Copy link
Preview

Copilot AI Aug 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This call to queue->add() only passes 2 parameters but the updated Queue interface requires 4 parameters (nodeId, query, rollbackQuery, operationGroup). This will cause a fatal error when the real Queue class is used.

Suggested change
$queue->add('node1', 'DELETE FROM test WHERE shard_id IN (2,3)');
$queue->add('node1', 'ALTER TABLE test ATTACH CLUSTER test_cluster:test', null, null);
$queue->add('node2', 'INSERT INTO test SELECT * FROM test_cluster:test', null, null);
$queue->add('node3', 'ALTER CLUSTER test_cluster UPDATE nodes', null, null);
$queue->add('node1', 'DELETE FROM test WHERE shard_id IN (2,3)', null, null);
break;
case 'RF1_OUTAGE_SUFFICIENT':
// RF=1 with sufficient nodes: shard movement (5+ commands)
$queue->add('node1', 'ALTER TABLE test ATTACH CLUSTER test_cluster:test', null, null);
$queue->add('node3', 'CREATE TABLE test_temp LIKE test', null, null);
$queue->add('node3', 'INSERT INTO test_temp SELECT * FROM test_cluster:test WHERE shard_id = 2', null, null);
$queue->add('node3', 'ALTER TABLE test_temp RENAME TO test', null, null);
$queue->add('node1', 'ALTER CLUSTER test_cluster UPDATE nodes', null, null);
break;
case 'RF1_OUTAGE_INSUFFICIENT':
// RF=1 insufficient nodes: degraded mode with table drop
$queue->add('node1', 'DROP TABLE test_table', null, null);
$queue->add('node1', 'ALTER CLUSTER test_cluster UPDATE nodes', null, null);
$queue->add('node1', 'CREATE TABLE test_table_degraded LIKE test_table', null, null);
break;
case 'CATASTROPHIC_FAILURE':
// Catastrophic failure: survival mode (2+ commands)
$queue->add('node1', 'ALTER CLUSTER test_cluster UPDATE nodes', null, null);
$queue->add('node1', 'CREATE TABLE test_table_backup AS SELECT * FROM test_table', null, null);
break;
default:
// Default: basic commands
$queue->add('node1', 'ALTER TABLE test ATTACH CLUSTER test_cluster:test', null, null);
$queue->add('node2', 'INSERT INTO test SELECT * FROM test_cluster:test', null, null);
$queue->add('node3', 'ALTER CLUSTER test_cluster UPDATE nodes', null, null);
$queue->add('node1', 'DELETE FROM test WHERE shard_id IN (2,3)', null, null);

Copilot uses AI. Check for mistakes.

$queue->add('node1', 'ALTER TABLE test ATTACH CLUSTER test_cluster:test');
$queue->add('node2', 'INSERT INTO test SELECT * FROM test_cluster:test');
$queue->add('node3', 'ALTER CLUSTER test_cluster UPDATE nodes');
$queue->add('node1', 'DELETE FROM test WHERE shard_id IN (2,3)');
Copy link
Preview

Copilot AI Aug 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This call to queue->add() only passes 2 parameters but the updated Queue interface requires 4 parameters (nodeId, query, rollbackQuery, operationGroup). This will cause a fatal error when the real Queue class is used.

Suggested change
$queue->add('node1', 'DELETE FROM test WHERE shard_id IN (2,3)');
$queue->add('node1', 'ALTER TABLE test ATTACH CLUSTER test_cluster:test', null, null);
$queue->add('node2', 'INSERT INTO test SELECT * FROM test_cluster:test', null, null);
$queue->add('node3', 'ALTER CLUSTER test_cluster UPDATE nodes', null, null);
$queue->add('node1', 'DELETE FROM test WHERE shard_id IN (2,3)', null, null);
break;
case 'RF1_OUTAGE_SUFFICIENT':
// RF=1 with sufficient nodes: shard movement (5+ commands)
$queue->add('node1', 'ALTER TABLE test ATTACH CLUSTER test_cluster:test', null, null);
$queue->add('node3', 'CREATE TABLE test_temp LIKE test', null, null);
$queue->add('node3', 'INSERT INTO test_temp SELECT * FROM test_cluster:test WHERE shard_id = 2', null, null);
$queue->add('node3', 'ALTER TABLE test_temp RENAME TO test', null, null);
$queue->add('node1', 'ALTER CLUSTER test_cluster UPDATE nodes', null, null);
break;
case 'RF1_OUTAGE_INSUFFICIENT':
// RF=1 insufficient nodes: degraded mode with table drop
$queue->add('node1', 'DROP TABLE test_table', null, null);
$queue->add('node1', 'ALTER CLUSTER test_cluster UPDATE nodes', null, null);
$queue->add('node1', 'CREATE TABLE test_table_degraded LIKE test_table', null, null);
break;
case 'CATASTROPHIC_FAILURE':
// Catastrophic failure: survival mode (2+ commands)
$queue->add('node1', 'ALTER CLUSTER test_cluster UPDATE nodes', null, null);
$queue->add('node1', 'CREATE TABLE test_table_backup AS SELECT * FROM test_table', null, null);
break;
default:
// Default: basic commands
$queue->add('node1', 'ALTER TABLE test ATTACH CLUSTER test_cluster:test', null, null);
$queue->add('node2', 'INSERT INTO test SELECT * FROM test_cluster:test', null, null);
$queue->add('node3', 'ALTER CLUSTER test_cluster UPDATE nodes', null, null);
$queue->add('node1', 'DELETE FROM test WHERE shard_id IN (2,3)', null, null);

Copilot uses AI. Check for mistakes.

* @return int the queue id
*/
public function add(string $nodeId, string $query): int {
public function add(string $nodeId, string $query, string $rollbackQuery, ?string $operationGroup = null): int {
Copy link
Preview

Copilot AI Aug 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The rollbackQuery parameter should not have a default value since the documentation states rollback commands are 'mandatory' and 'required'. Having a default makes it optional, which contradicts the design intent.

Copilot uses AI. Check for mistakes.

*/
// @phpcs:ignore SlevomatCodingStandard.Complexity.Cognitive.ComplexityTooHigh
public function rebalance(Queue $queue): void {
$operationGroup = "rebalance_{$this->name}_" . time();
Copy link
Preview

Copilot AI Aug 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using time() for operation group IDs may cause collisions if multiple rebalancing operations start in the same second. Consider using uniqid() or hrtime(true) for better uniqueness.

Suggested change
$operationGroup = "rebalance_{$this->name}_" . time();
$operationGroup = "rebalance_{$this->name}_" . uniqid('', true);

Copilot uses AI. Check for mistakes.

$id = hrtime(true);

$rollbackQuery = addcslashes($rollbackQuery, "'");
$operationGroup = $operationGroup ?? '';
Copy link
Preview

Copilot AI Aug 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using addcslashes for SQL escaping is insufficient for preventing SQL injection. Consider using proper parameterized queries or a dedicated SQL escaping function.

Suggested change
$operationGroup = $operationGroup ?? '';
$pdo = $this->client->getPdo();
$query = $pdo->quote($query);
$id = hrtime(true);
$rollbackQuery = $pdo->quote($rollbackQuery);
$operationGroup = $pdo->quote($operationGroup ?? '');
$nodeId = $pdo->quote($nodeId);

Copilot uses AI. Check for mistakes.

$id = hrtime(true);

$rollbackQuery = addcslashes($rollbackQuery, "'");
$operationGroup = $operationGroup ?? '';
Copy link
Preview

Copilot AI Aug 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using addcslashes for SQL escaping is insufficient for preventing SQL injection. Consider using proper parameterized queries or a dedicated SQL escaping function.

Suggested change
$operationGroup = $operationGroup ?? '';
$query = $this->client->quote($query);
$id = hrtime(true);
$rollbackQuery = $this->client->quote($rollbackQuery);
$operationGroup = $operationGroup ?? '';
$nodeIdQuoted = $this->client->quote($nodeId);
$operationGroupQuoted = $this->client->quote($operationGroup);

Copilot uses AI. Check for mistakes.

Copy link

clt

❌ CLT tests in test/clt-tests/http-interface/
✅ OK: 11
❌ Failed: 1
⏳ Duration: 51s
👉 Check Action Results for commit 1c0bf8a
Failed tests:

test/clt-tests/http-interface/test-distributed-inserts.rec
––– input –––
rm -f /var/log/manticore/searchd.log; stdbuf -oL searchd --stopwait > /dev/null; stdbuf -oL searchd ${SEARCHD_ARGS:-} > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 'accepting connections' <(tail -n 1000 -f /var/log/manticore/searchd.log); then echo 'Accepting connections!'; else echo 'Timeout or failed!'; fi
––– output –––
OK
––– input –––
sleep 3
––– output –––
OK
––– input –––
apt-get install -y jq > /dev/null; echo $?
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "DROP TABLE IF EXISTS test2;"; echo $?
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "CREATE TABLE test2 (
  id BIGINT,
  model TEXT,
  storage_capacity INTEGER,
  color STRING,
  release_year INTEGER,
  price FLOAT,
  discounted_price FLOAT,
  sold BOOL,
  date_added TIMESTAMP,
  product_codes MULTI,
  values MULTI64,
  additional_info JSON,
  vector FLOAT_VECTOR
    knn_type='hnsw'
    knn_dims='4'
    hnsw_similarity='l2'
) shards='3' rf='1';"; echo $?
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: table 'test2': CREATE TABLE failed: table 'test2': CREATE TABLE failed: 'shards' and 'rf' options require Buddy
+ 1
––– input –––
mysql -P9306 -h0 -e "show tables;"
––– output –––
- +-------+-------------+
- | Table | Type        |
- +-------+-------------+
- | test2 | distributed |
- +-------+-------------+
––– input –––
mysql -P9306 -h0 -e "DESCRIBE test2;"
––– output –––
- +------------------+--------------+----------------+
+ ERROR 1064 (42000) at line 1: no such table 'test2'
- | Field            | Type         | Properties     |
- +------------------+--------------+----------------+
- | id               | bigint       |                |
- | model            | text         | indexed stored |
- | storage_capacity | uint         |                |
- | color            | string       |                |
- | release_year     | uint         |                |
- | price            | float        |                |
- | discounted_price | float        |                |
- | sold             | bool         |                |
- | date_added       | timestamp    |                |
- | product_codes    | mva          |                |
- | values           | mva64        |                |
- | additional_info  | json         |                |
- | vector           | float_vector | knn            |
- +------------------+--------------+----------------+
––– input –––
curl -s -X POST http://localhost:9308/insert -d '{
  "table": "test2",
  "id": 1,
  "doc": {
    "model": "iPhone 13 Pro",
    "storage_capacity": 256,
    "color": "silver",
    "release_year": 2021,
    "price": 1099.99,
    "discounted_price": 989.99,
    "sold": 1,
    "date_added": 1591362342000,
    "product_codes": [1,2,3],
    "values": [523456764345678976,98765409877866654098,1109876543450987650987],
    "additional_info": {"features": ["ProMotion display", "A15 Bionic chip", "Ceramic Shield front cover"]},
    "vector": [0.773448,0.312478,0.137971,0.459821]
  }
}' | jq '.created'
––– output –––
OK
––– input –––
curl -s -X POST http://localhost:9308/insert -d '{
  "table": "test2",
  "id": 2,
  "doc": {
    "model": "Galaxy S21 Ultra",
    "storage_capacity": 128,
    "color": "black",
    "release_year": 2021,
    "price": 1199.99,
    "discounted_price": 1099.99,
    "sold": 1,
    "date_added": 1609459200000,
    "product_codes": [4,5,6],
    "values": [1234567890123456789,9876543210987654321],
    "additional_info": {"features": ["Dynamic AMOLED 2X", "Exynos 2100", "108MP camera"]},
    "vector": [0.5,0.4,0.3,0.2]
  }
}' | jq '.created'
––– output –––
OK
––– input –––
curl -s -X POST http://localhost:9308/insert -d '{
  "table": "test2",
  "id": 3,
  "doc": {
    "model": "Pixel 6",
    "storage_capacity": 128,
    "color": "white",
    "release_year": 2021,
    "price": 599.99,
    "discounted_price": 549.99,
    "sold": false,
    "date_added": 1630454400000,
    "product_codes": [7,8,9],
    "values": [987654321987654321,123456789123456789],
    "additional_info": {"features": ["Smooth display", "Google Tensor chip", "AI-powered camera"]},
    "vector": [0.8,0.6,0.4,0.2]
  }
}' | jq '.created'
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM test2 order by id asc;"
––– output –––
- +------+------------------+------------------+--------+--------------+-------------+------------------+------+------------+---------------+---------------------------------------+-----------------------------------------------------------------------------------+-------------------------------------+
+ +------+------------------+--------+------------------+--------------+-------------+------------------+------+---------------+---------------+--------------------------------------------------------------------------------+-----------------------------------------------------------------------------------+---------------------------------------+
- | id   | model            | storage_capacity | color  | release_year | price       | discounted_price | sold | date_added | product_codes | values                                | additional_info                                                                   | vector                              |
+ | id   | model            | color  | storage_capacity | release_year | price       | discounted_price | sold | date_added    | product_codes | values                                                                         | additional_info                                                                   | vector                                |
- +------+------------------+------------------+--------+--------------+-------------+------------------+------+------------+---------------+---------------------------------------+-----------------------------------------------------------------------------------+-------------------------------------+
+ +------+------------------+--------+------------------+--------------+-------------+------------------+------+---------------+---------------+--------------------------------------------------------------------------------+-----------------------------------------------------------------------------------+---------------------------------------+
- |    1 | iPhone 13 Pro    |              256 | silver |         2021 | 1099.989990 |       989.989990 |    1 | 2224442480 | 1,2,3         | 523456764345678976                    | {"features":["ProMotion display","A15 Bionic chip","Ceramic Shield front cover"]} | 0.773448,0.312478,0.137971,0.459821 |
+ |    1 | iPhone 13 Pro    | silver |              256 |         2021 | 1099.989990 |       989.989990 |    1 | 1591362342000 | 1,2,3         | [523456764345678976,98765409877866659840.000000,1109876543450987626496.000000] | {"features":["ProMotion display","A15 Bionic chip","Ceramic Shield front cover"]} | [0.773448,0.312478,0.137971,0.459821] |
- |    2 | Galaxy S21 Ultra |              128 | black  |         2021 | 1199.989990 |      1099.989990 |    1 | 3141431296 | 4,5,6         | 1234567890123456789                   | {"features":["Dynamic AMOLED 2X","Exynos 2100","108MP camera"]}                   | 0.500000,0.400000,0.300000,0.200000 |
+ |    2 | Galaxy S21 Ultra | black  |              128 |         2021 | 1199.989990 |      1099.989990 |    1 | 1609459200000 | 4,5,6         | [1234567890123456789,9223372036854775807]                                      | {"features":["Dynamic AMOLED 2X","Exynos 2100","108MP camera"]}                   | [0.500000,0.400000,0.300000,0.200000] |
- |    3 | Pixel 6          |              128 | white  |         2021 |  599.989990 |       549.989990 |    0 | 2661794816 | 7,8,9         | 123456789123456789,987654321987654321 | {"features":["Smooth display","Google Tensor chip","AI-powered camera"]}          | 0.800000,0.600000,0.400000,0.200000 |
+ |    3 | Pixel 6          | white  |              128 |         2021 |  599.989990 |       549.989990 |    0 | 1630454400000 | 7,8,9         | [987654321987654321,123456789123456789]                                        | {"features":["Smooth display","Google Tensor chip","AI-powered camera"]}          | [0.800000,0.600000,0.400000,0.200000] |
- +------+------------------+------------------+--------+--------------+-------------+------------------+------+------------+---------------+---------------------------------------+-----------------------------------------------------------------------------------+-------------------------------------+
+ +------+------------------+--------+------------------+--------------+-------------+------------------+------+---------------+---------------+--------------------------------------------------------------------------------+-----------------------------------------------------------------------------------+---------------------------------------+
––– input –––
curl -s -X POST http://localhost:9308/replace -d '{
  "table": "test2",
  "id": 1,
  "doc": {
    "model": "Updated Model",
    "storage_capacity": 512,
    "color": "black",
    "release_year": 2022,
    "price": 1399.99,
    "discounted_price": 1299.99,
    "sold": false,
    "date_added": 1630454400000,
    "product_codes": [10,11,12],
    "values": [987654321987654321,123456789123456789],
    "additional_info": {"features": ["New feature 1","New feature 2"]},
    "vector": [0.7,0.8,0.9,1.0]
  }
}' | jq '.result'
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM test2 order by id asc;"
––– output –––
- +------+------------------+------------------+-------+--------------+-------------+------------------+------+------------+---------------+---------------------------------------+--------------------------------------------------------------------------+-------------------------------------+
+ +------+------------------+-------+------------------+--------------+-------------+------------------+------+---------------+---------------+-------------------------------------------+--------------------------------------------------------------------------+---------------------------------------+
- | id   | model            | storage_capacity | color | release_year | price       | discounted_price | sold | date_added | product_codes | values                                | additional_info                                                          | vector                              |
+ | id   | model            | color | storage_capacity | release_year | price       | discounted_price | sold | date_added    | product_codes | values                                    | additional_info                                                          | vector                                |
- +------+------------------+------------------+-------+--------------+-------------+------------------+------+------------+---------------+---------------------------------------+--------------------------------------------------------------------------+-------------------------------------+
+ +------+------------------+-------+------------------+--------------+-------------+------------------+------+---------------+---------------+-------------------------------------------+--------------------------------------------------------------------------+---------------------------------------+
- |    1 | Updated Model    |              512 | black |         2022 | 1399.989990 |      1299.989990 |    0 | 2661794816 | 10,11,12      | 123456789123456789,987654321987654321 | {"features":["New feature 1","New feature 2"]}                           | 0.700000,0.800000,0.900000,1.000000 |
+ |    1 | Updated Model    | black |              512 |         2022 | 1399.989990 |      1299.989990 |    0 | 1630454400000 | 10,11,12      | [987654321987654321,123456789123456789]   | {"features":["New feature 1","New feature 2"]}                           | [0.700000,0.800000,0.900000,1]        |
- |    2 | Galaxy S21 Ultra |              128 | black |         2021 | 1199.989990 |      1099.989990 |    1 | 3141431296 | 4,5,6         | 1234567890123456789                   | {"features":["Dynamic AMOLED 2X","Exynos 2100","108MP camera"]}          | 0.500000,0.400000,0.300000,0.200000 |
+ |    2 | Galaxy S21 Ultra | black |              128 |         2021 | 1199.989990 |      1099.989990 |    1 | 1609459200000 | 4,5,6         | [1234567890123456789,9223372036854775807] | {"features":["Dynamic AMOLED 2X","Exynos 2100","108MP camera"]}          | [0.500000,0.400000,0.300000,0.200000] |
- |    3 | Pixel 6          |              128 | white |         2021 |  599.989990 |       549.989990 |    0 | 2661794816 | 7,8,9         | 123456789123456789,987654321987654321 | {"features":["Smooth display","Google Tensor chip","AI-powered camera"]} | 0.800000,0.600000,0.400000,0.200000 |
+ |    3 | Pixel 6          | white |              128 |         2021 |  599.989990 |       549.989990 |    0 | 1630454400000 | 7,8,9         | [987654321987654321,123456789123456789]   | {"features":["Smooth display","Google Tensor chip","AI-powered camera"]} | [0.800000,0.600000,0.400000,0.200000] |
- +------+------------------+------------------+-------+--------------+-------------+------------------+------+------------+---------------+---------------------------------------+--------------------------------------------------------------------------+-------------------------------------+
+ +------+------------------+-------+------------------+--------------+-------------+------------------+------+---------------+---------------+-------------------------------------------+--------------------------------------------------------------------------+---------------------------------------+
––– input –––
curl -s -X POST http://localhost:9308/update -d '{
  "table": "test2",
  "id": 2,
  "doc": {
    "price": 1099.99,
    "discounted_price": 999.99
  }
}' | jq '.result'
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM test2 order by id asc;"
––– output –––
- +------+------------------+------------------+-------+--------------+-------------+------------------+------+------------+---------------+---------------------------------------+--------------------------------------------------------------------------+-------------------------------------+
+ +------+------------------+-------+------------------+--------------+-------------+------------------+------+---------------+---------------+-------------------------------------------+--------------------------------------------------------------------------+---------------------------------------+
- | id   | model            | storage_capacity | color | release_year | price       | discounted_price | sold | date_added | product_codes | values                                | additional_info                                                          | vector                              |
+ | id   | model            | color | storage_capacity | release_year | price       | discounted_price | sold | date_added    | product_codes | values                                    | additional_info                                                          | vector                                |
- +------+------------------+------------------+-------+--------------+-------------+------------------+------+------------+---------------+---------------------------------------+--------------------------------------------------------------------------+-------------------------------------+
+ +------+------------------+-------+------------------+--------------+-------------+------------------+------+---------------+---------------+-------------------------------------------+--------------------------------------------------------------------------+---------------------------------------+
- |    1 | Updated Model    |              512 | black |         2022 | 1399.989990 |      1299.989990 |    0 | 2661794816 | 10,11,12      | 123456789123456789,987654321987654321 | {"features":["New feature 1","New feature 2"]}                           | 0.700000,0.800000,0.900000,1.000000 |
+ |    1 | Updated Model    | black |              512 |         2022 | 1399.989990 |      1299.989990 |    0 | 1630454400000 | 10,11,12      | [987654321987654321,123456789123456789]   | {"features":["New feature 1","New feature 2"]}                           | [0.700000,0.800000,0.900000,1]        |
- |    2 | Galaxy S21 Ultra |              128 | black |         2021 | 1099.989990 |       999.989990 |    1 | 3141431296 | 4,5,6         | 1234567890123456789                   | {"features":["Dynamic AMOLED 2X","Exynos 2100","108MP camera"]}          | 0.500000,0.400000,0.300000,0.200000 |
+ |    2 | Galaxy S21 Ultra | black |              128 |         2021 | 1099.989990 |       999.989990 |    1 | 1609459200000 | 4,5,6         | [1234567890123456789,9223372036854775807] | {"features":["Dynamic AMOLED 2X","Exynos 2100","108MP camera"]}          | [0.500000,0.400000,0.300000,0.200000] |
- |    3 | Pixel 6          |              128 | white |         2021 |  599.989990 |       549.989990 |    0 | 2661794816 | 7,8,9         | 123456789123456789,987654321987654321 | {"features":["Smooth display","Google Tensor chip","AI-powered camera"]} | 0.800000,0.600000,0.400000,0.200000 |
+ |    3 | Pixel 6          | white |              128 |         2021 |  599.989990 |       549.989990 |    0 | 1630454400000 | 7,8,9         | [987654321987654321,123456789123456789]   | {"features":["Smooth display","Google Tensor chip","AI-powered camera"]} | [0.800000,0.600000,0.400000,0.200000] |
- +------+------------------+------------------+-------+--------------+-------------+------------------+------+------------+---------------+---------------------------------------+--------------------------------------------------------------------------+-------------------------------------+
+ +------+------------------+-------+------------------+--------------+-------------+------------------+------+---------------+---------------+-------------------------------------------+--------------------------------------------------------------------------+---------------------------------------+
––– input –––
curl -s -X POST http://localhost:9308/update -d '{
  "table": "test2",
  "id": 2,
  "doc": {
    "price": 1099.99,
    "discounted_price": 999.99
  }
}' | jq '.result'
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM test2 order by id asc;"
––– output –––
- +------+------------------+------------------+-------+--------------+-------------+------------------+------+------------+---------------+---------------------------------------+--------------------------------------------------------------------------+-------------------------------------+
+ +------+------------------+-------+------------------+--------------+-------------+------------------+------+---------------+---------------+-------------------------------------------+--------------------------------------------------------------------------+---------------------------------------+
- | id   | model            | storage_capacity | color | release_year | price       | discounted_price | sold | date_added | product_codes | values                                | additional_info                                                          | vector                              |
+ | id   | model            | color | storage_capacity | release_year | price       | discounted_price | sold | date_added    | product_codes | values                                    | additional_info                                                          | vector                                |
- +------+------------------+------------------+-------+--------------+-------------+------------------+------+------------+---------------+---------------------------------------+--------------------------------------------------------------------------+-------------------------------------+
+ +------+------------------+-------+------------------+--------------+-------------+------------------+------+---------------+---------------+-------------------------------------------+--------------------------------------------------------------------------+---------------------------------------+
- |    1 | Updated Model    |              512 | black |         2022 | 1399.989990 |      1299.989990 |    0 | 2661794816 | 10,11,12      | 123456789123456789,987654321987654321 | {"features":["New feature 1","New feature 2"]}                           | 0.700000,0.800000,0.900000,1.000000 |
+ |    1 | Updated Model    | black |              512 |         2022 | 1399.989990 |      1299.989990 |    0 | 1630454400000 | 10,11,12      | [987654321987654321,123456789123456789]   | {"features":["New feature 1","New feature 2"]}                           | [0.700000,0.800000,0.900000,1]        |
- |    2 | Galaxy S21 Ultra |              128 | black |         2021 | 1099.989990 |       999.989990 |    1 | 3141431296 | 4,5,6         | 1234567890123456789                   | {"features":["Dynamic AMOLED 2X","Exynos 2100","108MP camera"]}          | 0.500000,0.400000,0.300000,0.200000 |
+ |    2 | Galaxy S21 Ultra | black |              128 |         2021 | 1099.989990 |       999.989990 |    1 | 1609459200000 | 4,5,6         | [1234567890123456789,9223372036854775807] | {"features":["Dynamic AMOLED 2X","Exynos 2100","108MP camera"]}          | [0.500000,0.400000,0.300000,0.200000] |
- |    3 | Pixel 6          |              128 | white |         2021 |  599.989990 |       549.989990 |    0 | 2661794816 | 7,8,9         | 123456789123456789,987654321987654321 | {"features":["Smooth display","Google Tensor chip","AI-powered camera"]} | 0.800000,0.600000,0.400000,0.200000 |
+ |    3 | Pixel 6          | white |              128 |         2021 |  599.989990 |       549.989990 |    0 | 1630454400000 | 7,8,9         | [987654321987654321,123456789123456789]   | {"features":["Smooth display","Google Tensor chip","AI-powered camera"]} | [0.800000,0.600000,0.400000,0.200000] |
- +------+------------------+------------------+-------+--------------+-------------+------------------+------+------------+---------------+---------------------------------------+--------------------------------------------------------------------------+-------------------------------------+
+ +------+------------------+-------+------------------+--------------+-------------+------------------+------+---------------+---------------+-------------------------------------------+--------------------------------------------------------------------------+---------------------------------------+
––– input –––
curl -s -X POST http://localhost:9308/delete -d '{
  "table": "test2",
  "id": 3
}' | jq '.result'
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM test2 order by id asc;"
––– output –––
- +------+------------------+------------------+-------+--------------+-------------+------------------+------+------------+---------------+---------------------------------------+-----------------------------------------------------------------+-------------------------------------+
+ +------+------------------+-------+------------------+--------------+-------------+------------------+------+---------------+---------------+-------------------------------------------+-----------------------------------------------------------------+---------------------------------------+
- | id   | model            | storage_capacity | color | release_year | price       | discounted_price | sold | date_added | product_codes | values                                | additional_info                                                 | vector                              |
+ | id   | model            | color | storage_capacity | release_year | price       | discounted_price | sold | date_added    | product_codes | values                                    | additional_info                                                 | vector                                |
- +------+------------------+------------------+-------+--------------+-------------+------------------+------+------------+---------------+---------------------------------------+-----------------------------------------------------------------+-------------------------------------+
+ +------+------------------+-------+------------------+--------------+-------------+------------------+------+---------------+---------------+-------------------------------------------+-----------------------------------------------------------------+---------------------------------------+
- |    1 | Updated Model    |              512 | black |         2022 | 1399.989990 |      1299.989990 |    0 | 2661794816 | 10,11,12      | 123456789123456789,987654321987654321 | {"features":["New feature 1","New feature 2"]}                  | 0.700000,0.800000,0.900000,1.000000 |
+ |    1 | Updated Model    | black |              512 |         2022 | 1399.989990 |      1299.989990 |    0 | 1630454400000 | 10,11,12      | [987654321987654321,123456789123456789]   | {"features":["New feature 1","New feature 2"]}                  | [0.700000,0.800000,0.900000,1]        |
- |    2 | Galaxy S21 Ultra |              128 | black |         2021 | 1099.989990 |       999.989990 |    1 | 3141431296 | 4,5,6         | 1234567890123456789                   | {"features":["Dynamic AMOLED 2X","Exynos 2100","108MP camera"]} | 0.500000,0.400000,0.300000,0.200000 |
+ |    2 | Galaxy S21 Ultra | black |              128 |         2021 | 1099.989990 |       999.989990 |    1 | 1609459200000 | 4,5,6         | [1234567890123456789,9223372036854775807] | {"features":["Dynamic AMOLED 2X","Exynos 2100","108MP camera"]} | [0.500000,0.400000,0.300000,0.200000] |
- +------+------------------+------------------+-------+--------------+-------------+------------------+------+------------+---------------+---------------------------------------+-----------------------------------------------------------------+-------------------------------------+
+ +------+------------------+-------+------------------+--------------+-------------+------------------+------+---------------+---------------+-------------------------------------------+-----------------------------------------------------------------+---------------------------------------+
––– input –––
curl -s -X POST http://localhost:9308/delete -d '{
  "table": "test2",
  "id": 3
}' | jq '.result'
––– output –––
OK
––– input –––
bulk_insert=$(mktemp); echo -e '{ "index": { "_index": "test2", "_id": 4 } }\n{ "id": 4, "model": "iPhone 14", "storage_capacity": 256, "color": "black", "release_year": 2022, "price": 999.99, "discounted_price": 899.99, "sold": 1, "date_added": 1661990400, "product_codes": [19, 20, 21], "values": [1234567890123456789, 9876543210987654321], "additional_info": { "features": ["A16 Bionic", "Dynamic Island"] }, "vector": [0.1, 0.2, 0.3, 0.4] }\n{ "index": { "_index": "test2", "_id": 5 } }\n{ "id": 5, "model": "Pixel 7", "storage_capacity": 128, "color": "white", "release_year": 2022, "price": 699.99, "discounted_price": 649.99, "sold": 0, "date_added": 1661990400, "product_codes": [16, 17, 18], "values": [223344556677889900, 998877665544332211], "additional_info": { "features": ["Tensor G2", "120Hz display"] }, "vector": [0.4, 0.5, 0.6, 0.7] }' > "$bulk_insert"
––– output –––
OK
––– input –––
curl -s -H 'Content-type: application/x-ndjson' --data-binary @"$bulk_insert" http://localhost:9308/_bulk | jq '.items[] | {index: .index.result, id: .index._id}'
––– output –––
-   "id": 4
+   "id": "4"
-   "id": 5
+   "id": "5"
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM test2 order by id asc;"
––– output –––
- +------+------------------+------------------+-------+--------------+-------------+------------------+------+------------+---------------+---------------------------------------+-----------------------------------------------------------------+-------------------------------------+
+ +------+------------------+-------+------------------+--------------+-------------+------------------+------+---------------+---------------+-------------------------------------------+-----------------------------------------------------------------+---------------------------------------+
- | id   | model            | storage_capacity | color | release_year | price       | discounted_price | sold | date_added | product_codes | values                                | additional_info                                                 | vector                              |
+ | id   | model            | color | storage_capacity | release_year | price       | discounted_price | sold | date_added    | product_codes | values                                    | additional_info                                                 | vector                                |
- +------+------------------+------------------+-------+--------------+-------------+------------------+------+------------+---------------+---------------------------------------+-----------------------------------------------------------------+-------------------------------------+
+ +------+------------------+-------+------------------+--------------+-------------+------------------+------+---------------+---------------+-------------------------------------------+-----------------------------------------------------------------+---------------------------------------+
- |    1 | Updated Model    |              512 | black |         2022 | 1399.989990 |      1299.989990 |    0 | 2661794816 | 10,11,12      | 123456789123456789,987654321987654321 | {"features":["New feature 1","New feature 2"]}                  | 0.700000,0.800000,0.900000,1.000000 |
+ |    1 | Updated Model    | black |              512 |         2022 | 1399.989990 |      1299.989990 |    0 | 1630454400000 | 10,11,12      | [987654321987654321,123456789123456789]   | {"features":["New feature 1","New feature 2"]}                  | [0.700000,0.800000,0.900000,1]        |
- |    2 | Galaxy S21 Ultra |              128 | black |         2021 | 1099.989990 |       999.989990 |    1 | 3141431296 | 4,5,6         | 1234567890123456789                   | {"features":["Dynamic AMOLED 2X","Exynos 2100","108MP camera"]} | 0.500000,0.400000,0.300000,0.200000 |
+ |    2 | Galaxy S21 Ultra | black |              128 |         2021 | 1099.989990 |       999.989990 |    1 | 1609459200000 | 4,5,6         | [1234567890123456789,9223372036854775807] | {"features":["Dynamic AMOLED 2X","Exynos 2100","108MP camera"]} | [0.500000,0.400000,0.300000,0.200000] |
- |    4 | iPhone 14        |              256 | black |         2022 |  999.989990 |       899.989990 |    1 | 1661990400 | 19,20,21      | 1234567890123456789                   | {"features":["A16 Bionic","Dynamic Island"]}                    | 0.100000,0.200000,0.300000,0.400000 |
+ |    4 | iPhone 14        | black |              256 |         2022 |  999.989990 |       899.989990 |    1 |    1661990400 | 19,20,21      | [1234567890123456789,9223372036854775807] | {"features":["A16 Bionic","Dynamic Island"]}                    | [0.100000,0.200000,0.300000,0.400000] |
- |    5 | Pixel 7          |              128 | white |         2022 |  699.989990 |       649.989990 |    0 | 1661990400 | 16,17,18      | 223344556677889900,998877665544332211 | {"features":["Tensor G2","120Hz display"]}                      | 0.400000,0.500000,0.600000,0.700000 |
+ |    5 | Pixel 7          | white |              128 |         2022 |  699.989990 |       649.989990 |    0 |    1661990400 | 16,17,18      | [223344556677889900,998877665544332211]   | {"features":["Tensor G2","120Hz display"]}                      | [0.400000,0.500000,0.600000,0.700000] |
- +------+------------------+------------------+-------+--------------+-------------+------------------+------+------------+---------------+---------------------------------------+-----------------------------------------------------------------+-------------------------------------+
+ +------+------------------+-------+------------------+--------------+-------------+------------------+------+---------------+---------------+-------------------------------------------+-----------------------------------------------------------------+---------------------------------------+
––– input –––
bulk_insert=$(mktemp); echo -e '{"index":{"_index":"test2","_id":6}}\n{"id":6,"model":"OnePlus 10","storage_capacity":256,"color":"blue","release_year":2022,"price":899.99,"discounted_price":849.99,"sold":0,"date_added":1661990400,"product_codes":[22,23,24],"values":[111222333444555666,777888999000111222],"additional_info":{"features":["Snapdragon 8","OxygenOS"]},"vector":[0.2,0.3,0.4,0.5]}\n{"index":{"_index":"test2","_id":7}}\n{"id":7,"model":"Xiaomi 12","storage_capacity":128,"color":"gray","release_year":2022,"price":799.99,"discounted_price":749.99,"sold":1,"date_added":1661990400,"product_codes":[25,26,27],"values":[333444555666777888,999000111222333444],"additional_info":{"features":["MIUI 13","5G"]},"vector":[0.3,0.4,0.5,0.6]}' > "$bulk_insert"; echo $?
––– output –––
OK
––– input –––
curl -s -H 'Content-type: application/x-ndjson' --data-binary @"$bulk_insert" http://localhost:9308/_bulk | jq '.items[] | {index: .index.result, id: .index._id}'
––– output –––
-   "id": 6
+   "id": "6"
-   "id": 7
+   "id": "7"
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM test2 order by id asc;"
––– output –––
- +------+------------------+------------------+-------+--------------+-------------+------------------+------+------------+---------------+---------------------------------------+-----------------------------------------------------------------+-------------------------------------+
+ +------+------------------+-------+------------------+--------------+-------------+------------------+------+---------------+---------------+-------------------------------------------+-----------------------------------------------------------------+---------------------------------------+
- | id   | model            | storage_capacity | color | release_year | price       | discounted_price | sold | date_added | product_codes | values                                | additional_info                                                 | vector                              |
+ | id   | model            | color | storage_capacity | release_year | price       | discounted_price | sold | date_added    | product_codes | values                                    | additional_info                                                 | vector                                |
- +------+------------------+------------------+-------+--------------+-------------+------------------+------+------------+---------------+---------------------------------------+-----------------------------------------------------------------+-------------------------------------+
+ +------+------------------+-------+------------------+--------------+-------------+------------------+------+---------------+---------------+-------------------------------------------+-----------------------------------------------------------------+---------------------------------------+
- |    1 | Updated Model    |              512 | black |         2022 | 1399.989990 |      1299.989990 |    0 | 2661794816 | 10,11,12      | 123456789123456789,987654321987654321 | {"features":["New feature 1","New feature 2"]}                  | 0.700000,0.800000,0.900000,1.000000 |
+ |    1 | Updated Model    | black |              512 |         2022 | 1399.989990 |      1299.989990 |    0 | 1630454400000 | 10,11,12      | [987654321987654321,123456789123456789]   | {"features":["New feature 1","New feature 2"]}                  | [0.700000,0.800000,0.900000,1]        |
- |    2 | Galaxy S21 Ultra |              128 | black |         2021 | 1099.989990 |       999.989990 |    1 | 3141431296 | 4,5,6         | 1234567890123456789                   | {"features":["Dynamic AMOLED 2X","Exynos 2100","108MP camera"]} | 0.500000,0.400000,0.300000,0.200000 |
+ |    2 | Galaxy S21 Ultra | black |              128 |         2021 | 1099.989990 |       999.989990 |    1 | 1609459200000 | 4,5,6         | [1234567890123456789,9223372036854775807] | {"features":["Dynamic AMOLED 2X","Exynos 2100","108MP camera"]} | [0.500000,0.400000,0.300000,0.200000] |
- |    4 | iPhone 14        |              256 | black |         2022 |  999.989990 |       899.989990 |    1 | 1661990400 | 19,20,21      | 1234567890123456789                   | {"features":["A16 Bionic","Dynamic Island"]}                    | 0.100000,0.200000,0.300000,0.400000 |
+ |    4 | iPhone 14        | black |              256 |         2022 |  999.989990 |       899.989990 |    1 |    1661990400 | 19,20,21      | [1234567890123456789,9223372036854775807] | {"features":["A16 Bionic","Dynamic Island"]}                    | [0.100000,0.200000,0.300000,0.400000] |
- |    5 | Pixel 7          |              128 | white |         2022 |  699.989990 |       649.989990 |    0 | 1661990400 | 16,17,18      | 223344556677889900,998877665544332211 | {"features":["Tensor G2","120Hz display"]}                      | 0.400000,0.500000,0.600000,0.700000 |
+ |    5 | Pixel 7          | white |              128 |         2022 |  699.989990 |       649.989990 |    0 |    1661990400 | 16,17,18      | [223344556677889900,998877665544332211]   | {"features":["Tensor G2","120Hz display"]}                      | [0.400000,0.500000,0.600000,0.700000] |
- |    6 | OnePlus 10       |              256 | blue  |         2022 |  899.989990 |       849.989990 |    0 | 1661990400 | 22,23,24      | 111222333444555666,777888999000111222 | {"features":["Snapdragon 8","OxygenOS"]}                        | 0.200000,0.300000,0.400000,0.500000 |
+ |    6 | OnePlus 10       | blue  |              256 |         2022 |  899.989990 |       849.989990 |    0 |    1661990400 | 22,23,24      | [111222333444555666,777888999000111222]   | {"features":["Snapdragon 8","OxygenOS"]}                        | [0.200000,0.300000,0.400000,0.500000] |
- |    7 | Xiaomi 12        |              128 | gray  |         2022 |  799.989990 |       749.989990 |    1 | 1661990400 | 25,26,27      | 333444555666777888,999000111222333444 | {"features":["MIUI 13","5G"]}                                   | 0.300000,0.400000,0.500000,0.600000 |
+ |    7 | Xiaomi 12        | gray  |              128 |         2022 |  799.989990 |       749.989990 |    1 |    1661990400 | 25,26,27      | [333444555666777888,999000111222333444]   | {"features":["MIUI 13","5G"]}                                   | [0.300000,0.400000,0.500000,0.600000] |
- +------+------------------+------------------+-------+--------------+-------------+------------------+------+------------+---------------+---------------------------------------+-----------------------------------------------------------------+-------------------------------------+
+ +------+------------------+-------+------------------+--------------+-------------+------------------+------+---------------+---------------+-------------------------------------------+-----------------------------------------------------------------+---------------------------------------+
––– input –––
bulk_update=$(mktemp); echo -e '{"update":{"_index":"test2","_id":6}}\n{"doc":{"price": 799.99, "discounted_price": 749.99}}\n{"update":{"_index":"test2","_id":7}}\n{"doc":{"price": 699.99, "discounted_price": 649.99}}' > "$bulk_update"; echo $?
––– output –––
OK
––– input –––
curl -s -H 'Content-type: application/x-ndjson' --data-binary @"$bulk_update" http://localhost:9308/_bulk | jq '.items[] | {update: .update.result, id: .update._id}'
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM test2 order by id asc;"
––– output –––
- +------+------------------+------------------+-------+--------------+-------------+------------------+------+------------+---------------+---------------------------------------+-----------------------------------------------------------------+-------------------------------------+
+ +------+------------------+-------+------------------+--------------+-------------+------------------+------+---------------+---------------+-------------------------------------------+-----------------------------------------------------------------+---------------------------------------+
- | id   | model            | storage_capacity | color | release_year | price       | discounted_price | sold | date_added | product_codes | values                                | additional_info                                                 | vector                              |
+ | id   | model            | color | storage_capacity | release_year | price       | discounted_price | sold | date_added    | product_codes | values                                    | additional_info                                                 | vector                                |
- +------+------------------+------------------+-------+--------------+-------------+------------------+------+------------+---------------+---------------------------------------+-----------------------------------------------------------------+-------------------------------------+
+ +------+------------------+-------+------------------+--------------+-------------+------------------+------+---------------+---------------+-------------------------------------------+-----------------------------------------------------------------+---------------------------------------+
- |    1 | Updated Model    |              512 | black |         2022 | 1399.989990 |      1299.989990 |    0 | 2661794816 | 10,11,12      | 123456789123456789,987654321987654321 | {"features":["New feature 1","New feature 2"]}                  | 0.700000,0.800000,0.900000,1.000000 |
+ |    1 | Updated Model    | black |              512 |         2022 | 1399.989990 |      1299.989990 |    0 | 1630454400000 | 10,11,12      | [987654321987654321,123456789123456789]   | {"features":["New feature 1","New feature 2"]}                  | [0.700000,0.800000,0.900000,1]        |
- |    2 | Galaxy S21 Ultra |              128 | black |         2021 | 1099.989990 |       999.989990 |    1 | 3141431296 | 4,5,6         | 1234567890123456789                   | {"features":["Dynamic AMOLED 2X","Exynos 2100","108MP camera"]} | 0.500000,0.400000,0.300000,0.200000 |
+ |    2 | Galaxy S21 Ultra | black |              128 |         2021 | 1099.989990 |       999.989990 |    1 | 1609459200000 | 4,5,6         | [1234567890123456789,9223372036854775807] | {"features":["Dynamic AMOLED 2X","Exynos 2100","108MP camera"]} | [0.500000,0.400000,0.300000,0.200000] |
- |    4 | iPhone 14        |              256 | black |         2022 |  999.989990 |       899.989990 |    1 | 1661990400 | 19,20,21      | 1234567890123456789                   | {"features":["A16 Bionic","Dynamic Island"]}                    | 0.100000,0.200000,0.300000,0.400000 |
+ |    4 | iPhone 14        | black |              256 |         2022 |  999.989990 |       899.989990 |    1 |    1661990400 | 19,20,21      | [1234567890123456789,9223372036854775807] | {"features":["A16 Bionic","Dynamic Island"]}                    | [0.100000,0.200000,0.300000,0.400000] |
- |    5 | Pixel 7          |              128 | white |         2022 |  699.989990 |       649.989990 |    0 | 1661990400 | 16,17,18      | 223344556677889900,998877665544332211 | {"features":["Tensor G2","120Hz display"]}                      | 0.400000,0.500000,0.600000,0.700000 |
+ |    5 | Pixel 7          | white |              128 |         2022 |  699.989990 |       649.989990 |    0 |    1661990400 | 16,17,18      | [223344556677889900,998877665544332211]   | {"features":["Tensor G2","120Hz display"]}                      | [0.400000,0.500000,0.600000,0.700000] |
- |    6 | OnePlus 10       |              256 | blue  |         2022 |  799.989990 |       749.989990 |    0 | 1661990400 | 22,23,24      | 111222333444555666,777888999000111222 | {"features":["Snapdragon 8","OxygenOS"]}                        | 0.200000,0.300000,0.400000,0.500000 |
+ |    6 | OnePlus 10       | blue  |              256 |         2022 |  799.989990 |       749.989990 |    0 |    1661990400 | 22,23,24      | [111222333444555666,777888999000111222]   | {"features":["Snapdragon 8","OxygenOS"]}                        | [0.200000,0.300000,0.400000,0.500000] |
- |    7 | Xiaomi 12        |              128 | gray  |         2022 |  699.989990 |       649.989990 |    1 | 1661990400 | 25,26,27      | 333444555666777888,999000111222333444 | {"features":["MIUI 13","5G"]}                                   | 0.300000,0.400000,0.500000,0.600000 |
+ |    7 | Xiaomi 12        | gray  |              128 |         2022 |  699.989990 |       649.989990 |    1 |    1661990400 | 25,26,27      | [333444555666777888,999000111222333444]   | {"features":["MIUI 13","5G"]}                                   | [0.300000,0.400000,0.500000,0.600000] |
- +------+------------------+------------------+-------+--------------+-------------+------------------+------+------------+---------------+---------------------------------------+-----------------------------------------------------------------+-------------------------------------+
+ +------+------------------+-------+------------------+--------------+-------------+------------------+------+---------------+---------------+-------------------------------------------+-----------------------------------------------------------------+---------------------------------------+
––– input –––
bulk_delete=$(mktemp); echo -e '{"delete":{"_index":"test2","_id":2}}\n{"delete":{"_index":"test2","_id":3}}' > "$bulk_delete"; echo $?
––– output –––
OK
––– input –––
curl -s -H 'Content-type: application/x-ndjson' --data-binary @"$bulk_delete" http://localhost:9308/_bulk | jq '.items[] | {delete: .delete.result, id: .delete._id}'
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM test2 order by id asc;"
––– output –––
- +------+---------------+------------------+-------+--------------+-------------+------------------+------+------------+---------------+---------------------------------------+------------------------------------------------+-------------------------------------+
+ +------+---------------+-------+------------------+--------------+-------------+------------------+------+---------------+---------------+-------------------------------------------+------------------------------------------------+---------------------------------------+
- | id   | model         | storage_capacity | color | release_year | price       | discounted_price | sold | date_added | product_codes | values                                | additional_info                                | vector                              |
+ | id   | model         | color | storage_capacity | release_year | price       | discounted_price | sold | date_added    | product_codes | values                                    | additional_info                                | vector                                |
- +------+---------------+------------------+-------+--------------+-------------+------------------+------+------------+---------------+---------------------------------------+------------------------------------------------+-------------------------------------+
+ +------+---------------+-------+------------------+--------------+-------------+------------------+------+---------------+---------------+-------------------------------------------+------------------------------------------------+---------------------------------------+
- |    1 | Updated Model |              512 | black |         2022 | 1399.989990 |      1299.989990 |    0 | 2661794816 | 10,11,12      | 123456789123456789,987654321987654321 | {"features":["New feature 1","New feature 2"]} | 0.700000,0.800000,0.900000,1.000000 |
+ |    1 | Updated Model | black |              512 |         2022 | 1399.989990 |      1299.989990 |    0 | 1630454400000 | 10,11,12      | [987654321987654321,123456789123456789]   | {"features":["New feature 1","New feature 2"]} | [0.700000,0.800000,0.900000,1]        |
- |    4 | iPhone 14     |              256 | black |         2022 |  999.989990 |       899.989990 |    1 | 1661990400 | 19,20,21      | 1234567890123456789                   | {"features":["A16 Bionic","Dynamic Island"]}   | 0.100000,0.200000,0.300000,0.400000 |
+ |    4 | iPhone 14     | black |              256 |         2022 |  999.989990 |       899.989990 |    1 |    1661990400 | 19,20,21      | [1234567890123456789,9223372036854775807] | {"features":["A16 Bionic","Dynamic Island"]}   | [0.100000,0.200000,0.300000,0.400000] |
- |    5 | Pixel 7       |              128 | white |         2022 |  699.989990 |       649.989990 |    0 | 1661990400 | 16,17,18      | 223344556677889900,998877665544332211 | {"features":["Tensor G2","120Hz display"]}     | 0.400000,0.500000,0.600000,0.700000 |
+ |    5 | Pixel 7       | white |              128 |         2022 |  699.989990 |       649.989990 |    0 |    1661990400 | 16,17,18      | [223344556677889900,998877665544332211]   | {"features":["Tensor G2","120Hz display"]}     | [0.400000,0.500000,0.600000,0.700000] |
- |    6 | OnePlus 10    |              256 | blue  |         2022 |  799.989990 |       749.989990 |    0 | 1661990400 | 22,23,24      | 111222333444555666,777888999000111222 | {"features":["Snapdragon 8","OxygenOS"]}       | 0.200000,0.300000,0.400000,0.500000 |
+ |    6 | OnePlus 10    | blue  |              256 |         2022 |  799.989990 |       749.989990 |    0 |    1661990400 | 22,23,24      | [111222333444555666,777888999000111222]   | {"features":["Snapdragon 8","OxygenOS"]}       | [0.200000,0.300000,0.400000,0.500000] |
- |    7 | Xiaomi 12     |              128 | gray  |         2022 |  699.989990 |       649.989990 |    1 | 1661990400 | 25,26,27      | 333444555666777888,999000111222333444 | {"features":["MIUI 13","5G"]}                  | 0.300000,0.400000,0.500000,0.600000 |
+ |    7 | Xiaomi 12     | gray  |              128 |         2022 |  699.989990 |       649.989990 |    1 |    1661990400 | 25,26,27      | [333444555666777888,999000111222333444]   | {"features":["MIUI 13","5G"]}                  | [0.300000,0.400000,0.500000,0.600000] |
- +------+---------------+------------------+-------+--------------+-------------+------------------+------+------------+---------------+---------------------------------------+------------------------------------------------+-------------------------------------+
+ +------+---------------+-------+------------------+--------------+-------------+------------------+------+---------------+---------------+-------------------------------------------+------------------------------------------------+---------------------------------------+
––– input –––
bulk_ops=$(mktemp); echo -e '{"delete":{"_index":"test2","_id":1}}\n{"index":{"_index":"test2","_id":2}}\n{"model":"C","storage_capacity":256,"color":"black","release_year":2023,"price":799.99,"discounted_price":749.99,"sold":0,"date_added":1672531200,"product_codes":[10,11,12],"values":[1234567890123456789,9876543210987654321],"additional_info":{"features":["Feature A","Feature B"]},"vector":[0.5,0.6,0.7,0.8]}\n{"index":{"_index":"test2","_id":17}}\n{"model":"Updated B","storage_capacity":128,"color":"blue","release_year":2024,"price":899.99,"discounted_price":849.99,"sold":1,"date_added":1672531200,"product_codes":[40,41,42],"values":[222222222222222222,333333333333333333],"additional_info":{"features":["Feature X","Feature Y"]},"vector":[0.1,0.2,0.3,0.4]}\n{"update":{"_index":"test2","_id":6}}\n{"doc":{"price":749.99,"discounted_price":699.99}}' > "$bulk_ops"; echo $?
––– output –––
OK
––– input –––
curl -s -H 'Content-type: application/x-ndjson' --data-binary @"$bulk_ops" http://localhost:9308/_bulk | jq -c '.items[] | {operation: (to_entries | .[0].key), result: (.[].result?), id: (.[]._id?), status: (.[].status?), error: (.[].error?)}'
––– output –––
- {"operation":"delete","result":"deleted","id":1,"status":201,"error":null}
+ {"operation":"delete","result":"deleted","id":"1","status":201,"error":null}
- {"operation":"index","result":"created","id":2,"status":201,"error":null}
+ {"operation":"index","result":"created","id":"2","status":201,"error":null}
- {"operation":"index","result":"created","id":17,"status":201,"error":null}
+ {"operation":"index","result":"created","id":"17","status":201,"error":null}
- {"operation":"update","result":"updated","id":6,"status":201,"error":null}
+ {"operation":"update","result":"updated","id":"6","status":201,"error":null}
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM test2 WHERE id = 4;"
––– output –––
- +------+-----------+------------------+-------+--------------+------------+------------------+------+------------+---------------+---------------------+----------------------------------------------+-------------------------------------+
+ +------+-----------+-------+------------------+--------------+------------+------------------+------+------------+---------------+-------------------------------------------+----------------------------------------------+---------------------------------------+
- | id   | model     | storage_capacity | color | release_year | price      | discounted_price | sold | date_added | product_codes | values              | additional_info                              | vector                              |
+ | id   | model     | color | storage_capacity | release_year | price      | discounted_price | sold | date_added | product_codes | values                                    | additional_info                              | vector                                |
- +------+-----------+------------------+-------+--------------+------------+------------------+------+------------+---------------+---------------------+----------------------------------------------+-------------------------------------+
+ +------+-----------+-------+------------------+--------------+------------+------------------+------+------------+---------------+-------------------------------------------+----------------------------------------------+---------------------------------------+
- |    4 | iPhone 14 |              256 | black |         2022 | 999.989990 |       899.989990 |    1 | 1661990400 | 19,20,21      | 1234567890123456789 | {"features":["A16 Bionic","Dynamic Island"]} | 0.100000,0.200000,0.300000,0.400000 |
+ |    4 | iPhone 14 | black |              256 |         2022 | 999.989990 |       899.989990 |    1 | 1661990400 | 19,20,21      | [1234567890123456789,9223372036854775807] | {"features":["A16 Bionic","Dynamic Island"]} | [0.100000,0.200000,0.300000,0.400000] |
- +------+-----------+------------------+-------+--------------+------------+------------------+------+------------+---------------+---------------------+----------------------------------------------+-------------------------------------+
+ +------+-----------+-------+------------------+--------------+------------+------------------+------+------------+---------------+-------------------------------------------+----------------------------------------------+---------------------------------------+
––– input –––
mysql -h0 -P9306 -e "DELETE FROM test2 WHERE id BETWEEN 11 AND 20;"; echo $?
––– output –––
OK
––– input –––
curl -s -X POST http://localhost:9308/insert -d '{
  "table": "test2",
  "id": 4,
  "doc": {
    "model": "Updated iPhone 14",
    "storage_capacity": 512,
    "color": "black",
    "release_year": 2022,
    "price": 1299.99,
    "discounted_price": 1199.99,
    "sold": 1,
    "date_added": 1661990400,
    "product_codes": [19,20,21],
    "values": [1234567890123456789,9876543210987654321],
    "additional_info": {"features": ["A16 Bionic","Dynamic Island","Improved camera"]},
    "vector": [0.1,0.2,0.3,0.4]
  }
}' | jq -e '.error' && echo "Duplicate ID test passed!" || echo "Duplicate ID test failed!"
––– output –––
-   "table": "system.test2_s2",
+   "table": "test2"
-   "index": "test2"
+ }
- }
+ Duplicate ID test passed!
- Duplicate ID test passed!
––– input –––
(for i in {1..10}; do curl -s -X POST http://localhost:9308/insert -d '{
  "table": "test2",
  "id": '$((10 + i))',
  "doc": {
    "model": "Device '$i'",
    "storage_capacity": 64,
    "color": "black",
    "release_year": 2023,
    "price": 499.99,
    "discounted_price": 449.99,
    "sold": "0",
    "date_added": 1672531200,
    "product_codes": [1,2,3],
    "values": [1234567890123456789,9876543210987654321],
    "additional_info": {"features": ["Feature 1","Feature 2"]},
    "vector": [0.1,0.2,0.3,0.4]
  }
}' & done; wait) | jq -s 'map(select(.created == true)) | length == 10' > /dev/null && echo "Parallel insert test passed!" || echo "Parallel insert test failed!"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM test2 WHERE id BETWEEN 11 AND 20;"
––– output –––
- +------+-----------+------------------+-------+--------------+------------+------------------+------+------------+---------------+---------------------+----------------------------------------+-------------------------------------+
+ +------+-----------+-------+------------------+--------------+------------+------------------+------+------------+---------------+-------------------------------------------+----------------------------------------+---------------------------------------+
- | id   | model     | storage_capacity | color | release_year | price      | discounted_price | sold | date_added | product_codes | values              | additional_info                        | vector                              |
+ | id   | model     | color | storage_capacity | release_year | price      | discounted_price | sold | date_added | product_codes | values                                    | additional_info                        | vector                                |
- +------+-----------+------------------+-------+--------------+------------+------------------+------+------------+---------------+---------------------+----------------------------------------+-------------------------------------+
+ +------+-----------+-------+------------------+--------------+------------+------------------+------+------------+---------------+-------------------------------------------+----------------------------------------+---------------------------------------+
- |   12 | Device 2  |               64 | black |         2023 | 499.989990 |       449.989990 |    0 | 1672531200 | 1,2,3         | 1234567890123456789 | {"features":["Feature 1","Feature 2"]} | 0.100000,0.200000,0.300000,0.400000 |
+ |   15 | Device 5  | black |               64 |         2023 | 499.989990 |       449.989990 |    0 | 1672531200 | 1,2,3         | [1234567890123456789,9223372036854775807] | {"features":["Feature 1","Feature 2"]} | [0.100000,0.200000,0.300000,0.400000] |
- |   13 | Device 3  |               64 | black |         2023 | 499.989990 |       449.989990 |    0 | 1672531200 | 1,2,3         | 1234567890123456789 | {"features":["Feature 1","Feature 2"]} | 0.100000,0.200000,0.300000,0.400000 |
+ |   11 | Device 1  | black |               64 |         2023 | 499.989990 |       449.989990 |    0 | 1672531200 | 1,2,3         | [1234567890123456789,9223372036854775807] | {"features":["Feature 1","Feature 2"]} | [0.100000,0.200000,0.300000,0.400000] |
- |   14 | Device 4  |               64 | black |         2023 | 499.989990 |       449.989990 |    0 | 1672531200 | 1,2,3         | 1234567890123456789 | {"features":["Feature 1","Feature 2"]} | 0.100000,0.200000,0.300000,0.400000 |
+ |   13 | Device 3  | black |               64 |         2023 | 499.989990 |       449.989990 |    0 | 1672531200 | 1,2,3         | [1234567890123456789,9223372036854775807] | {"features":["Feature 1","Feature 2"]} | [0.100000,0.200000,0.300000,0.400000] |
- |   15 | Device 5  |               64 | black |         2023 | 499.989990 |       449.989990 |    0 | 1672531200 | 1,2,3         | 1234567890123456789 | {"features":["Feature 1","Feature 2"]} | 0.100000,0.200000,0.300000,0.400000 |
+ |   17 | Device 7  | black |               64 |         2023 | 499.989990 |       449.989990 |    0 | 1672531200 | 1,2,3         | [1234567890123456789,9223372036854775807] | {"features":["Feature 1","Feature 2"]} | [0.100000,0.200000,0.300000,0.400000] |
- |   16 | Device 6  |               64 | black |         2023 | 499.989990 |       449.989990 |    0 | 1672531200 | 1,2,3         | 1234567890123456789 | {"features":["Feature 1","Feature 2"]} | 0.100000,0.200000,0.300000,0.400000 |
+ |   16 | Device 6  | black |               64 |         2023 | 499.989990 |       449.989990 |    0 | 1672531200 | 1,2,3         | [1234567890123456789,9223372036854775807] | {"features":["Feature 1","Feature 2"]} | [0.100000,0.200000,0.300000,0.400000] |
- |   17 | Device 7  |               64 | black |         2023 | 499.989990 |       449.989990 |    0 | 1672531200 | 1,2,3         | 1234567890123456789 | {"features":["Feature 1","Feature 2"]} | 0.100000,0.200000,0.300000,0.400000 |
+ |   14 | Device 4  | black |               64 |         2023 | 499.989990 |       449.989990 |    0 | 1672531200 | 1,2,3         | [1234567890123456789,9223372036854775807] | {"features":["Feature 1","Feature 2"]} | [0.100000,0.200000,0.300000,0.400000] |
- |   18 | Device 8  |               64 | black |         2023 | 499.989990 |       449.989990 |    0 | 1672531200 | 1,2,3         | 1234567890123456789 | {"features":["Feature 1","Feature 2"]} | 0.100000,0.200000,0.300000,0.400000 |
+ |   20 | Device 10 | black |               64 |         2023 | 499.989990 |       449.989990 |    0 | 1672531200 | 1,2,3         | [1234567890123456789,9223372036854775807] | {"features":["Feature 1","Feature 2"]} | [0.100000,0.200000,0.300000,0.400000] |
- |   19 | Device 9  |               64 | black |         2023 | 499.989990 |       449.989990 |    0 | 1672531200 | 1,2,3         | 1234567890123456789 | {"features":["Feature 1","Feature 2"]} | 0.100000,0.200000,0.300000,0.400000 |
+ |   18 | Device 8  | black |               64 |         2023 | 499.989990 |       449.989990 |    0 | 1672531200 | 1,2,3         | [1234567890123456789,9223372036854775807] | {"features":["Feature 1","Feature 2"]} | [0.100000,0.200000,0.300000,0.400000] |
- |   20 | Device 10 |               64 | black |         2023 | 499.989990 |       449.989990 |    0 | 1672531200 | 1,2,3         | 1234567890123456789 | {"features":["Feature 1","Feature 2"]} | 0.100000,0.200000,0.300000,0.400000 |
+ |   19 | Device 9  | black |               64 |         2023 | 499.989990 |       449.989990 |    0 | 1672531200 | 1,2,3         | [1234567890123456789,9223372036854775807] | {"features":["Feature 1","Feature 2"]} | [0.100000,0.200000,0.300000,0.400000] |
- |   11 | Device 1  |               64 | black |         2023 | 499.989990 |       449.989990 |    0 | 1672531200 | 1,2,3         | 1234567890123456789 | {"features":["Feature 1","Feature 2"]} | 0.100000,0.200000,0.300000,0.400000 |
+ |   12 | Device 2  | black |               64 |         2023 | 499.989990 |       449.989990 |    0 | 1672531200 | 1,2,3         | [1234567890123456789,9223372036854775807] | {"features":["Feature 1","Feature 2"]} | [0.100000,0.200000,0.300000,0.400000] |
- +------+-----------+------------------+-------+--------------+------------+------------------+------+------------+---------------+---------------------+----------------------------------------+-------------------------------------+
+ +------+-----------+-------+------------------+--------------+------------+------------------+------+------------+---------------+-------------------------------------------+----------------------------------------+---------------------------------------+

Copy link

clt

❌ CLT tests in test/clt-tests/sharding/cluster/ test/clt-tests/sharding/functional/ test/clt-tests/sharding/replication/ test/clt-tests/sharding/syntax/
✅ OK: 9
❌ Failed: 10
⏳ Duration: 150s
👉 Check Action Results for commit 1c0bf8a
Failed tests:

test/clt-tests/sharding/replication/test-distributed-inserts-with-replication.rec
––– input –––
apt-get install -y jq > /dev/null; echo $?
––– output –––
OK
––– input –––
export INSTANCE=1
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log;fi
––– output –––
OK
––– input –––
export INSTANCE=2
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log;fi
––– output –––
OK
––– input –––
export CLUSTER_NAME=replication
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "CREATE CLUSTER ${CLUSTER_NAME}"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "SHOW STATUS LIKE 'cluster_${CLUSTER_NAME}_status'\G"
––– output –––
OK
––– input –––
for n in `seq 2 $INSTANCE`; do mysql -h0 -P${n}306 -e "JOIN CLUSTER ${CLUSTER_NAME} AT '127.0.0.1:1312'"; done;
––– output –––
OK
––– input –––
mysql -h0 -P${INSTANCE}306 -e "SHOW STATUS LIKE 'cluster_${CLUSTER_NAME}_status'\G"
––– output –––
OK
––– input –––
for port in 1306 2306; do echo "Checking status for port $port:"; timeout 10 bash -c "while ! mysql -h0 -P$port -e \"SHOW STATUS LIKE 'cluster_replication_node_state'\G\" | grep -q 'Value: synced'; do sleep 1; done" && echo "Port $port: Node is synced." || echo "Port $port: Node is not synced (Value: closed or other)."; done
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "DROP TABLE IF EXISTS test2;"; echo $?
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "CREATE TABLE replication:test2 (id BIGINT, model TEXT, storage_capacity INTEGER, color STRING, release_year INTEGER, price FLOAT, discounted_price FLOAT, sold BOOL, date_added TIMESTAMP, product_codes MULTI, values MULTI64, additional_info JSON, vector FLOAT_VECTOR KNN_TYPE='hnsw' KNN_DIMS='4' HNSW_SIMILARITY='l2') SHARDS='3' RF='2';"; echo $?
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: P03: syntax error, unexpected $undefined, expecting $end near ':test2 (id BIGINT, model TEXT, storage_capacity INTEGER, color STRING, release_year INTEGER, price FLOAT, discounted_price FLOAT, sold BOOL, date_added TIMESTAMP, product_codes MULTI, values MULTI64, additional_info JSON, vector FLOAT_VECTOR KNN_TYPE='hnsw' KNN_DIMS='4' HNSW_SIMILARITY='l2') SHARDS='3' RF='2''
+ 1
––– input –––
mysql -h0 -P1306 -e "SHOW STATUS LIKE 'cluster_replication_node_state'\G"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "SHOW TABLES FROM SYSTEM\G"
––– output –––
- Table: system.sharding_queue
+ Table: system.sharding_state
- Table: system.sharding_state
+ Table: system.sharding_table
- *************************** 3. row ***************************
- Table: system.sharding_table
-  Type: rt
- *************************** 4. row ***************************
- Table: system.test2_s0
-  Type: rt
- *************************** 5. row ***************************
- Table: system.test2_s1
-  Type: rt
- *************************** 6. row ***************************
- Table: system.test2_s2
-  Type: rt
––– input –––
mysql -h0 -P2306 -e "SHOW TABLES FROM SYSTEM\G"
––– output –––
- Table: system.sharding_queue
+ Table: system.sharding_state
- Table: system.sharding_state
+ Table: system.sharding_table
- *************************** 3. row ***************************
- Table: system.sharding_table
-  Type: rt
- *************************** 4. row ***************************
- Table: system.test2_s0
-  Type: rt
- *************************** 5. row ***************************
- Table: system.test2_s1
-  Type: rt
- *************************** 6. row ***************************
- Table: system.test2_s2
-  Type: rt
––– input –––
mysql -P1306 -h0 -e "SHOW TABLES;"
––– output –––
- +-------+-------------+
- | Table | Type        |
- +-------+-------------+
- | test2 | distributed |
- +-------+-------------+
––– input –––
mysql -P2306 -h0 -e "SHOW TABLES;"
––– output –––
- +-------+-------------+
- | Table | Type        |
- +-------+-------------+
- | test2 | distributed |
- +-------+-------------+
––– input –––
mysql -P1306 -h0 -e "DESCRIBE test2;"
––– output –––
- +------------------+--------------+----------------+
+ ERROR 1064 (42000) at line 1: no such table 'test2'
- | Field            | Type         | Properties     |
- +------------------+--------------+----------------+
- | id               | bigint       |                |
- | model            | text         | indexed stored |
- | storage_capacity | uint         |                |
- | color            | string       |                |
- | release_year     | uint         |                |
- | price            | float        |                |
- | discounted_price | float        |                |
- | sold             | bool         |                |
- | date_added       | timestamp    |                |
- | product_codes    | mva          |                |
- | values           | mva64        |                |
- | additional_info  | json         |                |
- | vector           | float_vector | knn            |
- +------------------+--------------+----------------+
––– input –––
curl -s -X POST http://localhost:1308/insert -d '{"cluster": "replication", "table": "test2", "id": 1, "doc": {"model": "iPhone 13 Pro", "storage_capacity": 256, "color": "silver", "release_year": 2021, "price": 1099.99, "discounted_price": 989.99, "sold": 1, "date_added": 1591362342000, "product_codes": [1,2,3], "values": [523456764345678976], "additional_info": {"features": ["ProMotion display", "A15 Bionic chip"]}, "vector": [0.773448,0.312478,0.137971,0.459821]}}' | jq '.result'
––– output –––
- "created"
+ null
––– input –––
curl -s -X POST http://localhost:1308/insert -d '{"cluster": "replication", "table": "test2", "id": 2, "doc": {"model": "Galaxy S21 Ultra", "storage_capacity": 128, "color": "black", "release_year": 2021, "price": 1199.99, "discounted_price": 1099.99, "sold": 1, "date_added": 1609459200000, "product_codes": [4,5,6], "values": [1234567890123456789], "additional_info": {"features": ["Dynamic AMOLED 2X", "Exynos 2100"]}, "vector": [0.5,0.4,0.3,0.2]}}' | jq '.result'
––– output –––
- "created"
+ null
––– input –––
curl -s -X POST http://localhost:1308/insert -d '{"cluster": "replication", "table": "test2", "id": 3, "doc": {"model": "Pixel 6", "storage_capacity": 128, "color": "white", "release_year": 2021, "price": 599.99, "discounted_price": 549.99, "sold": false, "date_added": 1630454400000, "product_codes": [7,8,9], "values": [987654321987654321], "additional_info": {"features": ["Smooth display", "Google Tensor chip"]}, "vector": [0.8,0.6,0.4,0.2]}}' | jq '.result'
––– output –––
- "created"
+ null
––– input –––
mysql -h0 -P1306 -e "SELECT * FROM test2 ORDER BY id ASC;"
––– output –––
- +------+------------------+------------------+--------+--------------+-------------+------------------+------+------------+---------------+---------------------+------------------------------------------------------+-------------------------------------+
- | id   | model            | storage_capacity | color  | release_year | price       | discounted_price | sold | date_added | product_codes | values              | additional_info                                      | vector                              |
- +------+------------------+------------------+--------+--------------+-------------+------------------+------+------------+---------------+---------------------+------------------------------------------------------+-------------------------------------+
- |    1 | iPhone 13 Pro    |              256 | silver |         2021 | 1099.989990 |       989.989990 |    1 | 2224442480 | 1,2,3         | 523456764345678976  | {"features":["ProMotion display","A15 Bionic chip"]} | 0.773448,0.312478,0.137971,0.459821 |
- |    2 | Galaxy S21 Ultra |              128 | black  |         2021 | 1199.989990 |      1099.989990 |    1 | 3141431296 | 4,5,6         | 1234567890123456789 | {"features":["Dynamic AMOLED 2X","Exynos 2100"]}     | 0.500000,0.400000,0.300000,0.200000 |
- |    3 | Pixel 6          |              128 | white  |         2021 |  599.989990 |       549.989990 |    0 | 2661794816 | 7,8,9         | 987654321987654321  | {"features":["Smooth display","Google Tensor chip"]} | 0.800000,0.600000,0.400000,0.200000 |
- +------+------------------+------------------+--------+--------------+-------------+------------------+------+------------+---------------+---------------------+------------------------------------------------------+-------------------------------------+
––– input –––
curl -s -X POST http://localhost:1308/replace -d '{"cluster": "replication", "table": "test2", "id": 1, "doc": {"model": "Updated Model", "storage_capacity": 512, "color": "black", "release_year": 2022, "price": 1399.99, "discounted_price": 1299.99, "sold": false, "date_added": 1630454400000, "product_codes": [10,11,12], "values": [987654321987654321], "additional_info": {"features": ["New feature 1", "New feature 2"]}, "vector": [0.7,0.8,0.9,1.0]}}' | jq '.result'
––– output –––
- "updated"
+ null
––– input –––
mysql -h0 -P1306 -e "SELECT * FROM test2 ORDER BY id ASC;"
––– output –––
- +------+------------------+------------------+-------+--------------+-------------+------------------+------+------------+---------------+---------------------+------------------------------------------------------+-------------------------------------+
- | id   | model            | storage_capacity | color | release_year | price       | discounted_price | sold | date_added | product_codes | values              | additional_info                                      | vector                              |
- +------+------------------+------------------+-------+--------------+-------------+------------------+------+------------+---------------+---------------------+------------------------------------------------------+-------------------------------------+
- |    1 | Updated Model    |              512 | black |         2022 | 1399.989990 |      1299.989990 |    0 | 2661794816 | 10,11,12      | 987654321987654321  | {"features":["New feature 1","New feature 2"]}       | 0.700000,0.800000,0.900000,1.000000 |
- |    2 | Galaxy S21 Ultra |              128 | black |         2021 | 1199.989990 |      1099.989990 |    1 | 3141431296 | 4,5,6         | 1234567890123456789 | {"features":["Dynamic AMOLED 2X","Exynos 2100"]}     | 0.500000,0.400000,0.300000,0.200000 |
- |    3 | Pixel 6          |              128 | white |         2021 |  599.989990 |       549.989990 |    0 | 2661794816 | 7,8,9         | 987654321987654321  | {"features":["Smooth display","Google Tensor chip"]} | 0.800000,0.600000,0.400000,0.200000 |
- +------+------------------+------------------+-------+--------------+-------------+------------------+------+------------+---------------+---------------------+------------------------------------------------------+-------------------------------------+
––– input –––
curl -s -X POST http://localhost:1308/update -d '{"cluster": "replication", "table": "test2", "id": 2, "doc": {"price": 1099.99, "discounted_price": 999.99}}' | jq '.result'
––– output –––
- "updated"
+ null
––– input –––
mysql -h0 -P1306 -e "SELECT * FROM test2 ORDER BY id ASC;"
––– output –––
- +------+------------------+------------------+-------+--------------+-------------+------------------+------+------------+---------------+---------------------+------------------------------------------------------+-------------------------------------+
- | id   | model            | storage_capacity | color | release_year | price       | discounted_price | sold | date_added | product_codes | values              | additional_info                                      | vector                              |
- +------+------------------+------------------+-------+--------------+-------------+------------------+------+------------+---------------+---------------------+------------------------------------------------------+-------------------------------------+
- |    1 | Updated Model    |              512 | black |         2022 | 1399.989990 |      1299.989990 |    0 | 2661794816 | 10,11,12      | 987654321987654321  | {"features":["New feature 1","New feature 2"]}       | 0.700000,0.800000,0.900000,1.000000 |
- |    2 | Galaxy S21 Ultra |              128 | black |         2021 | 1099.989990 |       999.989990 |    1 | 3141431296 | 4,5,6         | 1234567890123456789 | {"features":["Dynamic AMOLED 2X","Exynos 2100"]}     | 0.500000,0.400000,0.300000,0.200000 |
- |    3 | Pixel 6          |              128 | white |         2021 |  599.989990 |       549.989990 |    0 | 2661794816 | 7,8,9         | 987654321987654321  | {"features":["Smooth display","Google Tensor chip"]} | 0.800000,0.600000,0.400000,0.200000 |
- +------+------------------+------------------+-------+--------------+-------------+------------------+------+------------+---------------+---------------------+------------------------------------------------------+-------------------------------------+
––– input –––
curl -s -X POST http://localhost:1308/update -d '{"cluster": "replication", "table": "test2", "id": 2, "doc": {"price": 1099.99, "discounted_price": 999.99}}' | jq '.result'
––– output –––
- "updated"
+ null
––– input –––
mysql -h0 -P1306 -e "SELECT * FROM test2 ORDER BY id ASC;"
––– output –––
- +------+------------------+------------------+-------+--------------+-------------+------------------+------+------------+---------------+---------------------+------------------------------------------------------+-------------------------------------+
- | id   | model            | storage_capacity | color | release_year | price       | discounted_price | sold | date_added | product_codes | values              | additional_info                                      | vector                              |
- +------+------------------+------------------+-------+--------------+-------------+------------------+------+------------+---------------+---------------------+------------------------------------------------------+-------------------------------------+
- |    1 | Updated Model    |              512 | black |         2022 | 1399.989990 |      1299.989990 |    0 | 2661794816 | 10,11,12      | 987654321987654321  | {"features":["New feature 1","New feature 2"]}       | 0.700000,0.800000,0.900000,1.000000 |
- |    2 | Galaxy S21 Ultra |              128 | black |         2021 | 1099.989990 |       999.989990 |    1 | 3141431296 | 4,5,6         | 1234567890123456789 | {"features":["Dynamic AMOLED 2X","Exynos 2100"]}     | 0.500000,0.400000,0.300000,0.200000 |
- |    3 | Pixel 6          |              128 | white |         2021 |  599.989990 |       549.989990 |    0 | 2661794816 | 7,8,9         | 987654321987654321  | {"features":["Smooth display","Google Tensor chip"]} | 0.800000,0.600000,0.400000,0.200000 |
- +------+------------------+------------------+-------+--------------+-------------+------------------+------+------------+---------------+---------------------+------------------------------------------------------+-------------------------------------+
––– input –––
curl -s -X POST http://localhost:1308/delete -d '{"cluster": "replication", "table": "test2", "id": 3}' | jq '.result'
––– output –––
- "deleted"
+ null
––– input –––
mysql -h0 -P1306 -e "SELECT * FROM test2 ORDER BY id ASC;"
––– output –––
- +------+------------------+------------------+-------+--------------+-------------+------------------+------+------------+---------------+---------------------+--------------------------------------------------+-------------------------------------+
- | id   | model            | storage_capacity | color | release_year | price       | discounted_price | sold | date_added | product_codes | values              | additional_info                                  | vector                              |
- +------+------------------+------------------+-------+--------------+-------------+------------------+------+------------+---------------+---------------------+--------------------------------------------------+-------------------------------------+
- |    1 | Updated Model    |              512 | black |         2022 | 1399.989990 |      1299.989990 |    0 | 2661794816 | 10,11,12      | 987654321987654321  | {"features":["New feature 1","New feature 2"]}   | 0.700000,0.800000,0.900000,1.000000 |
- |    2 | Galaxy S21 Ultra |              128 | black |         2021 | 1099.989990 |       999.989990 |    1 | 3141431296 | 4,5,6         | 1234567890123456789 | {"features":["Dynamic AMOLED 2X","Exynos 2100"]} | 0.500000,0.400000,0.300000,0.200000 |
- +------+------------------+------------------+-------+--------------+-------------+------------------+------+------------+---------------+---------------------+--------------------------------------------------+-------------------------------------+
––– input –––
curl -s -X POST http://localhost:1308/delete -d '{"cluster": "replication", "table": "test2", "id": 3}' | jq '.result'
––– output –––
- "not found"
+ null
––– input –––
curl -s -X POST http://localhost:1308/insert -d '{"cluster": "replication", "table": "test2", "id": 4, "doc": {"model": "Updated iPhone 14", "storage_capacity": 512, "color": "black", "release_year": 2022, "price": 1299.99, "discounted_price": 1199.99, "sold": 1, "date_added": 1661990400, "product_codes": [19,20,21], "values": [1234567890123456789],"additional_info": {"features": ["A16 Bionic","Dynamic Island","Improved camera"]},"vector": [0.1,0.2,0.3,0.4]}}' | jq -e '.error' && echo "Duplicate ID test passed!" || echo "Duplicate ID test failed!"
––– output –––
- null
+ {
- Duplicate ID test failed!
+   "type": "action_request_validation_exception",
+   "reason": "table 'test2' is not in any cluster, use just 'test2'",
+   "table": "test2"
+ }
+ Duplicate ID test passed!
––– input –––
(for i in {1..10}; do curl -s -X POST http://localhost:1308/insert -d '{"cluster": "replication", "table": "test2", "id": '$((10 + $i))', "doc": {"model": "Device '$i'", "storage_capacity": 64, "color": "black", "release_year": 2023, "price": 499.99, "discounted_price": 449.99, "sold": 0, "date_added": 1672531200, "product_codes": [1,2,3], "values": [1234567890123456789], "additional_info": {"features": ["Feature 1","Feature 2"]}, "vector": [0.1,0.2,0.3,0.4]}}' & done; wait) | jq -s 'map(select(.created == true)) | length == 10' > /dev/null && echo "Parallel insert test passed!" || echo "Parallel insert test failed!"
––– output –––
OK
––– input –––
sleep 2; mysql -h0 -P1306 -e "SELECT * FROM test2 ORDER BY id ASC;"
––– output –––
- +------+-------------------+------------------+-------+--------------+-------------+------------------+------+------------+---------------+---------------------+----------------------------------------------------------------+-------------------------------------+
- | id   | model             | storage_capacity | color | release_year | price       | discounted_price | sold | date_added | product_codes | values              | additional_info                                                | vector                              |
- +------+-------------------+------------------+-------+--------------+-------------+------------------+------+------------+---------------+---------------------+----------------------------------------------------------------+-------------------------------------+
- |    1 | Updated Model     |              512 | black |         2022 | 1399.989990 |      1299.989990 |    0 | 2661794816 | 10,11,12      | 987654321987654321  | {"features":["New feature 1","New feature 2"]}                 | 0.700000,0.800000,0.900000,1.000000 |
- |    2 | Galaxy S21 Ultra  |              128 | black |         2021 | 1099.989990 |       999.989990 |    1 | 3141431296 | 4,5,6         | 1234567890123456789 | {"features":["Dynamic AMOLED 2X","Exynos 2100"]}               | 0.500000,0.400000,0.300000,0.200000 |
- |    4 | Updated iPhone 14 |              512 | black |         2022 | 1299.989990 |      1199.989990 |    1 | 1661990400 | 19,20,21      | 1234567890123456789 | {"features":["A16 Bionic","Dynamic Island","Improved camera"]} | 0.100000,0.200000,0.300000,0.400000 |
- |   11 | Device 1          |               64 | black |         2023 |  499.989990 |       449.989990 |    0 | 1672531200 | 1,2,3         | 1234567890123456789 | {"features":["Feature 1","Feature 2"]}                         | 0.100000,0.200000,0.300000,0.400000 |
- |   12 | Device 2          |               64 | black |         2023 |  499.989990 |       449.989990 |    0 | 1672531200 | 1,2,3         | 1234567890123456789 | {"features":["Feature 1","Feature 2"]}                         | 0.100000,0.200000,0.300000,0.400000 |
- |   13 | Device 3          |               64 | black |         2023 |  499.989990 |       449.989990 |    0 | 1672531200 | 1,2,3         | 1234567890123456789 | {"features":["Feature 1","Feature 2"]}                         | 0.100000,0.200000,0.300000,0.400000 |
- |   14 | Device 4          |               64 | black |         2023 |  499.989990 |       449.989990 |    0 | 1672531200 | 1,2,3         | 1234567890123456789 | {"features":["Feature 1","Feature 2"]}                         | 0.100000,0.200000,0.300000,0.400000 |
- |   15 | Device 5          |               64 | black |         2023 |  499.989990 |       449.989990 |    0 | 1672531200 | 1,2,3         | 1234567890123456789 | {"features":["Feature 1","Feature 2"]}                         | 0.100000,0.200000,0.300000,0.400000 |
- |   16 | Device 6          |               64 | black |         2023 |  499.989990 |       449.989990 |    0 | 1672531200 | 1,2,3         | 1234567890123456789 | {"features":["Feature 1","Feature 2"]}                         | 0.100000,0.200000,0.300000,0.400000 |
- |   17 | Device 7          |               64 | black |         2023 |  499.989990 |       449.989990 |    0 | 1672531200 | 1,2,3         | 1234567890123456789 | {"features":["Feature 1","Feature 2"]}                         | 0.100000,0.200000,0.300000,0.400000 |
- |   18 | Device 8          |               64 | black |         2023 |  499.989990 |       449.989990 |    0 | 1672531200 | 1,2,3         | 1234567890123456789 | {"features":["Feature 1","Feature 2"]}                         | 0.100000,0.200000,0.300000,0.400000 |
- |   19 | Device 9          |               64 | black |         2023 |  499.989990 |       449.989990 |    0 | 1672531200 | 1,2,3         | 1234567890123456789 | {"features":["Feature 1","Feature 2"]}                         | 0.100000,0.200000,0.300000,0.400000 |
- |   20 | Device 10         |               64 | black |         2023 |  499.989990 |       449.989990 |    0 | 1672531200 | 1,2,3         | 1234567890123456789 | {"features":["Feature 1","Feature 2"]}                         | 0.100000,0.200000,0.300000,0.400000 |
- +------+-------------------+------------------+-------+--------------+-------------+------------------+------+------------+---------------+---------------------+----------------------------------------------------------------+-------------------------------------+
––– input –––
sleep 2; mysql -h0 -P1306 -e "SELECT * FROM test2 WHERE id BETWEEN 11 AND 20 ORDER BY id ASC;"
––– output –––
- +------+-----------+------------------+-------+--------------+------------+------------------+------+------------+---------------+---------------------+----------------------------------------+-------------------------------------+
- | id   | model     | storage_capacity | color | release_year | price      | discounted_price | sold | date_added | product_codes | values              | additional_info                        | vector                              |
- +------+-----------+------------------+-------+--------------+------------+------------------+------+------------+---------------+---------------------+----------------------------------------+-------------------------------------+
- |   11 | Device 1  |               64 | black |         2023 | 499.989990 |       449.989990 |    0 | 1672531200 | 1,2,3         | 1234567890123456789 | {"features":["Feature 1","Feature 2"]} | 0.100000,0.200000,0.300000,0.400000 |
- |   12 | Device 2  |               64 | black |         2023 | 499.989990 |       449.989990 |    0 | 1672531200 | 1,2,3         | 1234567890123456789 | {"features":["Feature 1","Feature 2"]} | 0.100000,0.200000,0.300000,0.400000 |
- |   13 | Device 3  |               64 | black |         2023 | 499.989990 |       449.989990 |    0 | 1672531200 | 1,2,3         | 1234567890123456789 | {"features":["Feature 1","Feature 2"]} | 0.100000,0.200000,0.300000,0.400000 |
- |   14 | Device 4  |               64 | black |         2023 | 499.989990 |       449.989990 |    0 | 1672531200 | 1,2,3         | 1234567890123456789 | {"features":["Feature 1","Feature 2"]} | 0.100000,0.200000,0.300000,0.400000 |
- |   15 | Device 5  |               64 | black |         2023 | 499.989990 |       449.989990 |    0 | 1672531200 | 1,2,3         | 1234567890123456789 | {"features":["Feature 1","Feature 2"]} | 0.100000,0.200000,0.300000,0.400000 |
- |   16 | Device 6  |               64 | black |         2023 | 499.989990 |       449.989990 |    0 | 1672531200 | 1,2,3         | 1234567890123456789 | {"features":["Feature 1","Feature 2"]} | 0.100000,0.200000,0.300000,0.400000 |
- |   17 | Device 7  |               64 | black |         2023 | 499.989990 |       449.989990 |    0 | 1672531200 | 1,2,3         | 1234567890123456789 | {"features":["Feature 1","Feature 2"]} | 0.100000,0.200000,0.300000,0.400000 |
- |   18 | Device 8  |               64 | black |         2023 | 499.989990 |       449.989990 |    0 | 1672531200 | 1,2,3         | 1234567890123456789 | {"features":["Feature 1","Feature 2"]} | 0.100000,0.200000,0.300000,0.400000 |
- |   19 | Device 9  |               64 | black |         2023 | 499.989990 |       449.989990 |    0 | 1672531200 | 1,2,3         | 1234567890123456789 | {"features":["Feature 1","Feature 2"]} | 0.100000,0.200000,0.300000,0.400000 |
- |   20 | Device 10 |               64 | black |         2023 | 499.989990 |       449.989990 |    0 | 1672531200 | 1,2,3         | 1234567890123456789 | {"features":["Feature 1","Feature 2"]} | 0.100000,0.200000,0.300000,0.400000 |
- +------+-----------+------------------+-------+--------------+------------+------------------+------+------------+---------------+---------------------+----------------------------------------+-------------------------------------+
––– input –––
mysql -h0 -P1306 -e "SELECT * FROM test2 WHERE id = 20;"
––– output –––
- +------+-----------+------------------+-------+--------------+------------+------------------+------+------------+---------------+---------------------+----------------------------------------+-------------------------------------+
- | id   | model     | storage_capacity | color | release_year | price      | discounted_price | sold | date_added | product_codes | values              | additional_info                        | vector                              |
- +------+-----------+------------------+-------+--------------+------------+------------------+------+------------+---------------+---------------------+----------------------------------------+-------------------------------------+
- |   20 | Device 10 |               64 | black |         2023 | 499.989990 |       449.989990 |    0 | 1672531200 | 1,2,3         | 1234567890123456789 | {"features":["Feature 1","Feature 2"]} | 0.100000,0.200000,0.300000,0.400000 |
- +------+-----------+------------------+-------+--------------+------------+------------------+------+------------+---------------+---------------------+----------------------------------------+-------------------------------------+
––– input –––
rm -f bulk.json bulk_insert.json bulk_update.json bulk_delete.json bulk_operations.json; if [[ ! -f bulk.json && ! -f bulk_insert.json && ! -f bulk_update.json && ! -f bulk_delete.json && ! -f bulk_operations.json ]]; then echo "All temporary files deleted successfully."; else echo "Error: Some temporary files were not deleted."; fi
––– output –––
OK
test/clt-tests/sharding/cluster/test-drop-sharded-clustering-table.rec
––– input –––
export INSTANCE=1
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export INSTANCE=2
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export CLUSTER_NAME=c
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create cluster ${CLUSTER_NAME}"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "show status like 'cluster_${CLUSTER_NAME}_status'\G"
––– output –––
OK
––– input –––
for n in `seq 2 $INSTANCE`; do mysql -h0 -P${n}306 -e "join cluster ${CLUSTER_NAME} at '127.0.0.1:1312'"; done;
––– output –––
OK
––– input –––
mysql -h0 -P${INSTANCE}306 -e "show status like 'cluster_${CLUSTER_NAME}_status'\G"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:tbl1(id bigint) shards='3' rf='2';"; echo $?;
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: P03: syntax error, unexpected $undefined, expecting $end near ':tbl1(id bigint) shards='3' rf='2''
+ 1
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 2306 failed!"
––– output –––
- *************************** 1. row ***************************
+ === Node 2306 ===
- Table: tbl1
- Type: distributed
- === Node 2306 ===
- *************************** 1. row ***************************
- Table: tbl1
- Type: distributed
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:tbl1;"; echo $?;
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: table 'tbl1' is missing: DROP TABLE failed: table 'tbl1' must exist
+ 1
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 2306 failed!"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:Tbl2(id bigint) shards='3' rf='1';"; echo $?
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: P03: syntax error, unexpected $undefined, expecting $end near ':Tbl2(id bigint) shards='3' rf='1''
+ 1
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 2306 failed!"
––– output –––
- *************************** 1. row ***************************
+ === Node 2306 ===
- Table: tbl2
- Type: distributed
- === Node 2306 ===
- *************************** 1. row ***************************
- Table: tbl2
- Type: distributed
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:Tbl2;"; echo $?
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: table 'tbl2' is missing: DROP TABLE failed: table 'tbl2' must exist
+ 1
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 2306 failed!"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:tbl_missing_type(id) shards='3' rf='1';"
––– output –––
+ ERROR 1064 (42000) at line 1: P03: syntax error, unexpected $undefined, expecting $end near ':tbl_missing_type(id) shards='3' rf='1''
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 2306 failed!"
––– output –––
- *************************** 1. row ***************************
+ === Node 2306 ===
- Table: tbl_missing_type
- Type: distributed
- === Node 2306 ===
- *************************** 1. row ***************************
- Table: tbl_missing_type
- Type: distributed
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:tbl_missing_type;"; echo $?
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: table 'tbl_missing_type' is missing: DROP TABLE failed: table 'tbl_missing_type' must exist
+ 1
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 2306 failed!"
––– output –––
OK
––– input –––
LONG_TABLE_NAME=$(printf "tbl%065d" 1)
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:${LONG_TABLE_NAME}(id bigint) shards='3' rf='1';"
––– output –––
+ ERROR 1064 (42000) at line 1: P03: syntax error, unexpected $undefined, expecting $end near ':tbl00000000000000000000000000000000000000000000000000000000000000001(id bigint) shards='3' rf='1''
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 2306 failed!"
––– output –––
- *************************** 1. row ***************************
+ === Node 2306 ===
- Table: tbl00000000000000000000000000000000000000000000000000000000000000001
- Type: distributed
- === Node 2306 ===
- *************************** 1. row ***************************
- Table: tbl00000000000000000000000000000000000000000000000000000000000000001
- Type: distributed
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:${LONG_TABLE_NAME};"
––– output –––
+ ERROR 1064 (42000) at line 1: table 'tbl00000000000000000000000000000000000000000000000000000000000000001' is missing: DROP TABLE failed: table 'tbl00000000000000000000000000000000000000000000000000000000000000001' must exist
––– input –––
echo "=== Node 1306 ==="; mysql -h0 -P1306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 1306 failed!"; echo "=== Node 2306 ==="; mysql -h0 -P2306 -e "SHOW TABLES\G" | sed 's/^[[:space:]]*//' || echo "Node 2306 failed!"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:nonexistent_table;"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "DROP TABLE nonexistent_cluster:tbl1;"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:tbl1;"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "INSERT INTO ${CLUSTER_NAME}:tbl1 VALUES (1);" & sleep 1; mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:tbl1;"
––– output –––
OK
test/clt-tests/sharding/replication/create-table-3-nodes-6-shards.rec
––– input –––
export INSTANCE=1
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export INSTANCE=2
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export INSTANCE=3
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export CLUSTER_NAME=c
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create cluster ${CLUSTER_NAME}"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "show status like 'cluster_${CLUSTER_NAME}_status'\G"
––– output –––
OK
––– input –––
export CLUSTER_NAME=c
––– output –––
OK
––– input –––
for n in `seq 2 $INSTANCE`; do mysql -h0 -P${n}306 -e "join cluster ${CLUSTER_NAME} at '127.0.0.1:1312'"; done;
––– output –––
OK
––– input –––
mysql -h0 -P${INSTANCE}306 -e "show status like 'cluster_${CLUSTER_NAME}_status'\G"
––– output –––
OK
––– input –––
for port in 1306 2306 3306; do timeout 30 mysql -h0 -P$port -e "SHOW STATUS LIKE 'cluster_c_status'\G" > /tmp/status_$port.log && grep -q "Value: primary" /tmp/status_$port.log && echo "Port $port: Node synced"; done && cat /tmp/status_1306.log
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create table c:t(id bigint) shards='6' rf='2'"
––– output –––
+ ERROR 1064 (42000) at line 1: P03: syntax error, unexpected $undefined, expecting $end near ':t(id bigint) shards='6' rf='2''
––– input –––
for i in 1 2 3; do mysql -h0 -P${i}306 -e "show tables from system\G"; done | grep 'Table: system.t' | sort -V
––– output –––
- Table: system.t_s0
- Table: system.t_s0
- Table: system.t_s1
- Table: system.t_s1
- Table: system.t_s2
- Table: system.t_s2
- Table: system.t_s3
- Table: system.t_s3
- Table: system.t_s4
- Table: system.t_s4
- Table: system.t_s5
- Table: system.t_s5
––– input –––
for i in 1 2 3; do mysql -h0 -P${i}306 -e "desc t\G"; done
––– output –––
- *************************** 1. row ***************************
+ ERROR 1064 (42000) at line 1: no such table 't'
-      Field: id
+ ERROR 1064 (42000) at line 1: no such table 't'
-       Type: bigint
+ ERROR 1064 (42000) at line 1: no such table 't'
- Properties:
- *************************** 1. row ***************************
-      Field: id
-       Type: bigint
- Properties:
- *************************** 1. row ***************************
-      Field: id
-       Type: bigint
- Properties:
––– input –––
for i in 1 2 3; do mysql -h0 -P${i}306 -e "show tables from system\G" | grep 'Table: system.t' | wc -l; done
––– output –––
- 4
+ 0
- 4
+ 0
- 4
+ 0
test/clt-tests/sharding/replication/create-table-2-nodes-4-shards.rec
––– input –––
export INSTANCE=1
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export INSTANCE=2
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export CLUSTER_NAME=c
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create cluster ${CLUSTER_NAME}"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "show status like 'cluster_${CLUSTER_NAME}_status'\G"
––– output –––
OK
––– input –––
for n in `seq 2 $INSTANCE`; do mysql -h0 -P${n}306 -e "join cluster ${CLUSTER_NAME} at '127.0.0.1:1312'"; done;
––– output –––
OK
––– input –––
mysql -h0 -P${INSTANCE}306 -e "show status like 'cluster_${CLUSTER_NAME}_status'\G"
––– output –––
OK
––– input –––
for port in 1306 2306; do timeout 30 mysql -h0 -P$port -e "SHOW STATUS LIKE 'cluster_c_status'\G" > /tmp/status_$port.log && grep -q "Value: primary" /tmp/status_$port.log && echo "Port $port: Node synced"; done && cat /tmp/status_1306.log
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create table c:t(id bigint) shards='4' rf='2'"
––– output –––
+ ERROR 1064 (42000) at line 1: P03: syntax error, unexpected $undefined, expecting $end near ':t(id bigint) shards='4' rf='2''
––– input –––
for i in 1 2; do mysql -h0 -P${i}306 -e "show tables from system\G"; done | grep 'Table: system.t' | sort -V
––– output –––
- Table: system.t_s0
- Table: system.t_s0
- Table: system.t_s1
- Table: system.t_s1
- Table: system.t_s2
- Table: system.t_s2
- Table: system.t_s3
- Table: system.t_s3
––– input –––
for i in 1 2; do mysql -h0 -P${i}306 -e "desc t\G"; done
––– output –––
- *************************** 1. row ***************************
+ ERROR 1064 (42000) at line 1: no such table 't'
-      Field: id
+ ERROR 1064 (42000) at line 1: no such table 't'
-       Type: bigint
- Properties:
- *************************** 1. row ***************************
-      Field: id
-       Type: bigint
- Properties:
––– input –––
for i in 1 2; do mysql -h0 -P${i}306 -e "show tables from system\G" | grep 'Table: system.t' | wc -l; done
––– output –––
- 4
+ 0
- 4
+ 0
test/clt-tests/sharding/replication/test-data-manipulation.rec
––– input –––
export INSTANCE=1
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export INSTANCE=2
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export CLUSTER_NAME=c
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create cluster ${CLUSTER_NAME}"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "show status like 'cluster_${CLUSTER_NAME}_status'\G"
––– output –––
OK
––– input –––
for n in `seq 2 $INSTANCE`; do mysql -h0 -P${n}306 -e "join cluster ${CLUSTER_NAME} at '127.0.0.1:1312'"; done;
––– output –––
OK
––– input –––
mysql -h0 -P${INSTANCE}306 -e "show status like 'cluster_${CLUSTER_NAME}_status'\G"
––– output –––
OK
––– input –––
for port in 1306 2306; do timeout 30 mysql -h0 -P$port -e "SHOW STATUS LIKE 'cluster_c_status'\G" > /tmp/status_$port.log && grep -q "Value: primary" /tmp/status_$port.log && echo "Port $port: Node synced"; done && cat /tmp/status_1306.log
––– output –––
OK
––– input –––
sleep 5; mysql -h0 -P1306 -e "create table c:testrt(id bigint, title text, content text, gid uint) shards='2' rf='1';"; echo $?
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: P03: syntax error, unexpected $undefined, expecting $end near ':testrt(id bigint, title text, content text, gid uint) shards='2' rf='1''
+ 1
––– input –––
mysql -h0 -P1306 -e "SHOW STATUS LIKE 'cluster_c_indexes';"
––– output –––
- +-------------------+-------------------------------------------------------------------+
+ +-------------------+---------------------------------------------+
- | Counter           | Value                                                             |
+ | Counter           | Value                                       |
- +-------------------+-------------------------------------------------------------------+
+ +-------------------+---------------------------------------------+
- | cluster_c_indexes | system.sharding_state,system.sharding_table,system.sharding_queue |
+ | cluster_c_indexes | system.sharding_state,system.sharding_table |
- +-------------------+-------------------------------------------------------------------+
+ +-------------------+---------------------------------------------+
––– input –––
for i in 1 2; do mysql -h0 -P${i}306 -e "show tables from system\G"; done | grep 'Table: system.t' | sort -V
––– output –––
- Table: system.testrt_s0
- Table: system.testrt_s1
––– input –––
mysql -h0 -P1306 -e "INSERT INTO testrt (id, title, content, gid) values (1, 'Title 1', 'Content 1', 1), (2, 'Title 2', 'Content 2', 2);"; echo $?
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "INSERT INTO testrt (id, title, content, gid) values (3, 'Title 3', 'Content 3', 3);"; echo $?
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "INSERT INTO testrt (id, title, content, gid) values (4, 'Title 4', 'Content 4', 4);"; echo $?
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "SELECT * FROM testrt WHERE id IN (1, 2, 3, 4) ORDER BY id ASC;"
––– output –––
OK
test/clt-tests/sharding/syntax/sharding-syntax-positive.rec
––– input –––
export INSTANCE=1
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "CREATE TABLE tbl1"; echo $?
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create table tbl2 shards='5' rf='1'"; echo $?
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: table 'tbl2': CREATE TABLE failed: table 'tbl2': CREATE TABLE failed: 'shards' and 'rf' options require Buddy
+ 1
––– input –––
mysql -h0 -P1306 -e "create table tbl3(id bigint) shards='3' rf='1'"; echo $?
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: table 'tbl3': CREATE TABLE failed: table 'tbl3': CREATE TABLE failed: 'shards' and 'rf' options require Buddy
+ 1
––– input –––
mysql -h0 -P1306 -e "create table tbl4(id bigint) SHARDS='4' RF='1'"; echo $?
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: table 'tbl4': CREATE TABLE failed: table 'tbl4': CREATE TABLE failed: 'shards' and 'rf' options require Buddy
+ 1
––– input –––
mysql -h0 -P1306 -e "create table tbl5(id bigint) shards = '2' rf = '1'"; echo $?
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: table 'tbl5': CREATE TABLE failed: table 'tbl5': CREATE TABLE failed: 'shards' and 'rf' options require Buddy
+ 1
––– input –––
mysql -h0 -P1306 -e "create table tbl6(id bigint) shards='1' rf='1'"; echo $?
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: table 'tbl6': CREATE TABLE failed: table 'tbl6': CREATE TABLE failed: 'shards' and 'rf' options require Buddy
+ 1
––– input –––
mysql -h0 -P1306 -e "CREATE TaBle tbl8(id bigint) ShaRDS='4' rf='1'"; echo $?
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: table 'tbl8': CREATE TABLE failed: table 'tbl8': CREATE TABLE failed: 'shards' and 'rf' options require Buddy
+ 1
––– input –––
mysql -h0 -P1306 -e "CREATE TABLE tbl9 shards='1000' rf='1'"; echo $?
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: table 'tbl9': CREATE TABLE failed: table 'tbl9': CREATE TABLE failed: 'shards' and 'rf' options require Buddy
+ 1
––– input –––
mysql -h0 -P1306 -e "CREATE TABLE tbl10 SHARDS='3' rf='1'"; echo $?
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: table 'tbl10': CREATE TABLE failed: table 'tbl10': CREATE TABLE failed: 'shards' and 'rf' options require Buddy
+ 1
test/clt-tests/sharding/replication/create-table-1-node-10-shards.rec
––– input –––
export INSTANCE=1
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create table t(id bigint) shards='10' rf='1'"
––– output –––
+ ERROR 1064 (42000) at line 1: table 't': CREATE TABLE failed: table 't': CREATE TABLE failed: 'shards' and 'rf' options require Buddy
––– input –––
mysql -h0 -P1306 -e "show tables from system" | grep 'Table: system.a' | sort
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "DESC t\G"
––– output –––
- *************************** 1. row ***************************
+ ERROR 1064 (42000) at line 1: no such table 't'
-      Field: id
-       Type: bigint
- Properties:
––– input –––
mysql -h0 -P1306 -e "create table a(id bigint) shards='4' rf='1'"
––– output –––
+ ERROR 1064 (42000) at line 1: table 'a': CREATE TABLE failed: table 'a': CREATE TABLE failed: 'shards' and 'rf' options require Buddy
––– input –––
mysql -h0 -P1306 -e "show tables from system\G" | grep 'Table: system.a' | sort
––– output –––
- Table: system.a_s0
- Table: system.a_s1
- Table: system.a_s2
- Table: system.a_s3
––– input –––
mysql -h0 -P1306 -e "DESCRIBE a\G"
––– output –––
- *************************** 1. row ***************************
+ ERROR 1064 (42000) at line 1: no such table 'a'
-      Field: id
-       Type: bigint
- Properties:
––– input –––
mysql -h0 -P1306 -e "DESC a\G"
––– output –––
- *************************** 1. row ***************************
+ ERROR 1064 (42000) at line 1: no such table 'a'
-      Field: id
-       Type: bigint
- Properties:
test/clt-tests/sharding/replication/create-table-5-nodes-60-shards.rec
––– input –––
export INSTANCE=1
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export INSTANCE=2
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export INSTANCE=3
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export INSTANCE=4
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export INSTANCE=5
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export CLUSTER_NAME=c
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create cluster ${CLUSTER_NAME}"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "show status like 'cluster_${CLUSTER_NAME}_status'\G"
––– output –––
OK
––– input –––
export CLUSTER_NAME=c
––– output –––
OK
––– input –––
for n in `seq 2 $INSTANCE`; do mysql -h0 -P${n}306 -e "join cluster ${CLUSTER_NAME} at '127.0.0.1:1312'"; done;
––– output –––
OK
––– input –––
mysql -h0 -P${INSTANCE}306 -e "show status like 'cluster_${CLUSTER_NAME}_status'\G"
––– output –––
OK
––– input –––
for port in 1306 2306 3306 4306 5306; do timeout 30 mysql -h0 -P$port -e "SHOW STATUS LIKE 'cluster_c_status'\G" > /tmp/status_$port.log && grep -q "Value: primary" /tmp/status_$port.log && echo "Port $port: Node synced"; done && cat /tmp/status_1306.log
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create table c:t(id bigint) shards='60' rf='3' timeout='60'"
––– output –––
+ ERROR 1064 (42000) at line 1: P03: syntax error, unexpected $undefined, expecting $end near ':t(id bigint) shards='60' rf='3' timeout='60''
––– input –––
for i in 1 2 3 4 5; do mysql -h0 -P${i}306 -e "show tables from system\G"; done | grep 'Table: system.t' | sort -V
––– output –––
- Table: system.t_s0
- Table: system.t_s0
- Table: system.t_s0
- Table: system.t_s1
- Table: system.t_s1
- Table: system.t_s1
- Table: system.t_s2
- Table: system.t_s2
- Table: system.t_s2
- Table: system.t_s3
- Table: system.t_s3
- Table: system.t_s3
- Table: system.t_s4
- Table: system.t_s4
- Table: system.t_s4
- Table: system.t_s5
- Table: system.t_s5
- Table: system.t_s5
- Table: system.t_s6
- Table: system.t_s6
- Table: system.t_s6
- Table: system.t_s7
- Table: system.t_s7
- Table: system.t_s7
- Table: system.t_s8
- Table: system.t_s8
- Table: system.t_s8
- Table: system.t_s9
- Table: system.t_s9
- Table: system.t_s9
- Table: system.t_s10
- Table: system.t_s10
- Table: system.t_s10
- Table: system.t_s11
- Table: system.t_s11
- Table: system.t_s11
- Table: system.t_s12
- Table: system.t_s12
- Table: system.t_s12
- Table: system.t_s13
- Table: system.t_s13
- Table: system.t_s13
- Table: system.t_s14
- Table: system.t_s14
- Table: system.t_s14
- Table: system.t_s15
- Table: system.t_s15
- Table: system.t_s15
- Table: system.t_s16
- Table: system.t_s16
- Table: system.t_s16
- Table: system.t_s17
- Table: system.t_s17
- Table: system.t_s17
- Table: system.t_s18
- Table: system.t_s18
- Table: system.t_s18
- Table: system.t_s19
- Table: system.t_s19
- Table: system.t_s19
- Table: system.t_s20
- Table: system.t_s20
- Table: system.t_s20
- Table: system.t_s21
- Table: system.t_s21
- Table: system.t_s21
- Table: system.t_s22
- Table: system.t_s22
- Table: system.t_s22
- Table: system.t_s23
- Table: system.t_s23
- Table: system.t_s23
- Table: system.t_s24
- Table: system.t_s24
- Table: system.t_s24
- Table: system.t_s25
- Table: system.t_s25
- Table: system.t_s25
- Table: system.t_s26
- Table: system.t_s26
- Table: system.t_s26
- Table: system.t_s27
- Table: system.t_s27
- Table: system.t_s27
- Table: system.t_s28
- Table: system.t_s28
- Table: system.t_s28
- Table: system.t_s29
- Table: system.t_s29
- Table: system.t_s29
- Table: system.t_s30
- Table: system.t_s30
- Table: system.t_s30
- Table: system.t_s31
- Table: system.t_s31
- Table: system.t_s31
- Table: system.t_s32
- Table: system.t_s32
- Table: system.t_s32
- Table: system.t_s33
- Table: system.t_s33
- Table: system.t_s33
- Table: system.t_s34
- Table: system.t_s34
- Table: system.t_s34
- Table: system.t_s35
- Table: system.t_s35
- Table: system.t_s35
- Table: system.t_s36
- Table: system.t_s36
- Table: system.t_s36
- Table: system.t_s37
- Table: system.t_s37
- Table: system.t_s37
- Table: system.t_s38
- Table: system.t_s38
- Table: system.t_s38
- Table: system.t_s39
- Table: system.t_s39
- Table: system.t_s39
- Table: system.t_s40
- Table: system.t_s40
- Table: system.t_s40
- Table: system.t_s41
- Table: system.t_s41
- Table: system.t_s41
- Table: system.t_s42
- Table: system.t_s42
- Table: system.t_s42
- Table: system.t_s43
- Table: system.t_s43
- Table: system.t_s43
- Table: system.t_s44
- Table: system.t_s44
- Table: system.t_s44
- Table: system.t_s45
- Table: system.t_s45
- Table: system.t_s45
- Table: system.t_s46
- Table: system.t_s46
- Table: system.t_s46
- Table: system.t_s47
- Table: system.t_s47
- Table: system.t_s47
- Table: system.t_s48
- Table: system.t_s48
- Table: system.t_s48
- Table: system.t_s49
- Table: system.t_s49
- Table: system.t_s49
- Table: system.t_s50
- Table: system.t_s50
- Table: system.t_s50
- Table: system.t_s51
- Table: system.t_s51
- Table: system.t_s51
- Table: system.t_s52
- Table: system.t_s52
- Table: system.t_s52
- Table: system.t_s53
- Table: system.t_s53
- Table: system.t_s53
- Table: system.t_s54
- Table: system.t_s54
- Table: system.t_s54
- Table: system.t_s55
- Table: system.t_s55
- Table: system.t_s55
- Table: system.t_s56
- Table: system.t_s56
- Table: system.t_s56
- Table: system.t_s57
- Table: system.t_s57
- Table: system.t_s57
- Table: system.t_s58
- Table: system.t_s58
- Table: system.t_s58
- Table: system.t_s59
- Table: system.t_s59
- Table: system.t_s59
––– input –––
for i in 1 2 3 4 5; do mysql -h0 -P${i}306 -e "desc t\G" | grep 'Create Table'; done
––– output –––
+ ERROR 1064 (42000) at line 1: no such table 't'
+ ERROR 1064 (42000) at line 1: no such table 't'
+ ERROR 1064 (42000) at line 1: no such table 't'
+ ERROR 1064 (42000) at line 1: no such table 't'
+ ERROR 1064 (42000) at line 1: no such table 't'
––– input –––
for i in 1 2 3 4 5; do mysql -h0 -P${i}306 -e "show tables from system\G" | grep 'Table: system.t' | wc -l; done
––– output –––
- 36
+ 0
- 36
+ 0
- 36
+ 0
- 36
+ 0
- 36
+ 0
test/clt-tests/sharding/replication/test-multi-node-sharding-and-replication.rec
––– input –––
export INSTANCE=1
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export INSTANCE=2
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export INSTANCE=3
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export INSTANCE=4
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export INSTANCE=5
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export CLUSTER_NAME=c
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create cluster ${CLUSTER_NAME}"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "show status like 'cluster_${CLUSTER_NAME}_status'\G"
––– output –––
OK
––– input –––
export CLUSTER_NAME=c
––– output –––
OK
––– input –––
for n in `seq 2 $INSTANCE`; do mysql -h0 -P${n}306 -e "join cluster ${CLUSTER_NAME} at '127.0.0.1:1312'"; done;
––– output –––
OK
––– input –––
mysql -h0 -P${INSTANCE}306 -e "show status like 'cluster_${CLUSTER_NAME}_status'\G"
––– output –––
OK
––– input –––
apt-get install -y jq 1> /dev/null 2>&1 ; echo $?
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create table c:t(id bigint) shards='5' rf='3' timeout='300'" >/dev/null
––– output –––
+ ERROR 1064 (42000) at line 1: P03: syntax error, unexpected $undefined, expecting $end near ':t(id bigint) shards='5' rf='3' timeout='300''
––– input –––
grep 'started v' /var/log/manticore-{1,2,3,4,5}/searchd.log | cut -d\' -f3 | cut -d: -f3 | wc -l
––– output –––
OK
––– input –––
for i in 1 2 3 4 5; do echo "#{$i}"; mysql -h0 -P${i}306 -e "show create table t option force=1\G" | grep 'Create Table'; done
––– output –––
- Create Table: CREATE TABLE t type='distributed' agent='127.0.0.1:1312:system.t_s0|127.0.0.1:3312:system.t_s0|127.0.0.1:5312:system.t_s0' agent='127.0.0.1:1312:system.t_s1|127.0.0.1:2312:system.t_s1|127.0.0.1:4312:system.t_s1' agent='127.0.0.1:1312:system.t_s3|127.0.0.1:4312:system.t_s3|127.0.0.1:5312:system.t_s3' agent='127.0.0.1:2312:system.t_s2|127.0.0.1:3312:system.t_s2|127.0.0.1:4312:system.t_s2' agent='127.0.0.1:2312:system.t_s4|127.0.0.1:3312:system.t_s4|127.0.0.1:5312:system.t_s4'
+ ERROR 1064 (42000) at line 1: You have an error in your query. Please, double-check it.
- Create Table: CREATE TABLE t type='distributed' agent='127.0.0.1:1312:system.t_s0|127.0.0.1:3312:system.t_s0|127.0.0.1:5312:system.t_s0' agent='127.0.0.1:1312:system.t_s1|127.0.0.1:2312:system.t_s1|127.0.0.1:4312:system.t_s1' agent='127.0.0.1:1312:system.t_s3|127.0.0.1:4312:system.t_s3|127.0.0.1:5312:system.t_s3' agent='127.0.0.1:2312:system.t_s2|127.0.0.1:3312:system.t_s2|127.0.0.1:4312:system.t_s2' agent='127.0.0.1:2312:system.t_s4|127.0.0.1:3312:system.t_s4|127.0.0.1:5312:system.t_s4'
+ ERROR 1064 (42000) at line 1: You have an error in your query. Please, double-check it.
- Create Table: CREATE TABLE t type='distributed' agent='127.0.0.1:1312:system.t_s0|127.0.0.1:3312:system.t_s0|127.0.0.1:5312:system.t_s0' agent='127.0.0.1:1312:system.t_s1|127.0.0.1:2312:system.t_s1|127.0.0.1:4312:system.t_s1' agent='127.0.0.1:1312:system.t_s3|127.0.0.1:4312:system.t_s3|127.0.0.1:5312:system.t_s3' agent='127.0.0.1:2312:system.t_s2|127.0.0.1:3312:system.t_s2|127.0.0.1:4312:system.t_s2' agent='127.0.0.1:2312:system.t_s4|127.0.0.1:3312:system.t_s4|127.0.0.1:5312:system.t_s4'
+ ERROR 1064 (42000) at line 1: You have an error in your query. Please, double-check it.
- Create Table: CREATE TABLE t type='distributed' agent='127.0.0.1:1312:system.t_s0|127.0.0.1:3312:system.t_s0|127.0.0.1:5312:system.t_s0' agent='127.0.0.1:1312:system.t_s1|127.0.0.1:2312:system.t_s1|127.0.0.1:4312:system.t_s1' agent='127.0.0.1:1312:system.t_s3|127.0.0.1:4312:system.t_s3|127.0.0.1:5312:system.t_s3' agent='127.0.0.1:2312:system.t_s2|127.0.0.1:3312:system.t_s2|127.0.0.1:4312:system.t_s2' agent='127.0.0.1:2312:system.t_s4|127.0.0.1:3312:system.t_s4|127.0.0.1:5312:system.t_s4'
+ ERROR 1064 (42000) at line 1: You have an error in your query. Please, double-check it.
- Create Table: CREATE TABLE t type='distributed' agent='127.0.0.1:1312:system.t_s0|127.0.0.1:3312:system.t_s0|127.0.0.1:5312:system.t_s0' agent='127.0.0.1:1312:system.t_s1|127.0.0.1:2312:system.t_s1|127.0.0.1:4312:system.t_s1' agent='127.0.0.1:1312:system.t_s3|127.0.0.1:4312:system.t_s3|127.0.0.1:5312:system.t_s3' agent='127.0.0.1:2312:system.t_s2|127.0.0.1:3312:system.t_s2|127.0.0.1:4312:system.t_s2' agent='127.0.0.1:2312:system.t_s4|127.0.0.1:3312:system.t_s4|127.0.0.1:5312:system.t_s4'
+ ERROR 1064 (42000) at line 1: You have an error in your query. Please, double-check it.
test/clt-tests/sharding/functional/functional-sharding-positive.rec
––– input –––
export INSTANCE=1
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export INSTANCE=2
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export INSTANCE=3
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export CLUSTER_NAME=replication
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create cluster ${CLUSTER_NAME}"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "show status like 'cluster_${CLUSTER_NAME}_status'\G"
––– output –––
OK
––– input –––
for n in `seq 2 $INSTANCE`; do mysql -h0 -P${n}306 -e "join cluster ${CLUSTER_NAME} at '127.0.0.1:1312'"; done;
––– output –––
OK
––– input –––
mysql -h0 -P${INSTANCE}306 -e "show status like 'cluster_${CLUSTER_NAME}_status'\G"
––– output –––
OK
––– input –––
for port in 1306 2306 3306; do timeout 60 mysql -h0 -P$port -e "SHOW STATUS LIKE 'cluster_replication_status'\G" > /tmp/status_$port.log && grep -q "Value: primary" /tmp/status_$port.log && echo "Port $port: Node synced"; done && cat /tmp/status_1306.log
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:tbl1(id bigint) shards='5' rf='2'"; echo $?
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: P03: syntax error, unexpected $undefined, expecting $end near ':tbl1(id bigint) shards='5' rf='2''
+ 1
––– input –––
for i in 1 2 3; do mysql -h0 -P${i}306 -e "show tables from system\G"; done | grep 'system.tbl1_s' | sort -V
––– output –––
- Table: system.tbl1_s0
- Table: system.tbl1_s0
- Table: system.tbl1_s1
- Table: system.tbl1_s1
- Table: system.tbl1_s2
- Table: system.tbl1_s2
- Table: system.tbl1_s3
- Table: system.tbl1_s3
- Table: system.tbl1_s4
- Table: system.tbl1_s4
––– input –––
mysql -h0 -P2306 -e "create table ${CLUSTER_NAME}:tbl2(id bigint) shards='4' rf='1'"; echo $?
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: P03: syntax error, unexpected $undefined, expecting $end near ':tbl2(id bigint) shards='4' rf='1''
+ 1
––– input –––
for i in 1 2 3; do mysql -h0 -P${i}306 -e "show tables from system\G"; done | grep 'system.tbl2_s' | sort -V
––– output –––
- Table: system.tbl2_s0
- Table: system.tbl2_s1
- Table: system.tbl2_s2
- Table: system.tbl2_s3
––– input –––
mysql -h0 -P3306 -e "create table ${CLUSTER_NAME}:tbl3(id bigint) shards='5' rf='2'"; echo $?
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: P03: syntax error, unexpected $undefined, expecting $end near ':tbl3(id bigint) shards='5' rf='2''
+ 1
––– input –––
for i in 1 2 3; do mysql -h0 -P${i}306 -e "show tables from system\G"; done | grep 'system.tbl3_s' | sort -V
––– output –––
- Table: system.tbl3_s0
- Table: system.tbl3_s0
- Table: system.tbl3_s1
- Table: system.tbl3_s1
- Table: system.tbl3_s2
- Table: system.tbl3_s2
- Table: system.tbl3_s3
- Table: system.tbl3_s3
- Table: system.tbl3_s4
- Table: system.tbl3_s4
––– input –––
mysql -h0 -P3306 -e "DROP TABLE ${CLUSTER_NAME}:tbl3"; echo $?
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: table 'tbl3' is missing: DROP TABLE failed: table 'tbl3' must exist
+ 1
––– input –––
mysql -h0 -P3306 -e "create table ${CLUSTER_NAME}:tbl3(id bigint) shards='10' rf='3'"; echo $?
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: P03: syntax error, unexpected $undefined, expecting $end near ':tbl3(id bigint) shards='10' rf='3''
+ 1
––– input –––
for i in 1 2 3; do mysql -h0 -P${i}306 -e "show tables from system\G"; done | grep 'system.tbl3_s' | sort -V
––– output –––
- Table: system.tbl3_s0
- Table: system.tbl3_s0
- Table: system.tbl3_s0
- Table: system.tbl3_s1
- Table: system.tbl3_s1
- Table: system.tbl3_s1
- Table: system.tbl3_s2
- Table: system.tbl3_s2
- Table: system.tbl3_s2
- Table: system.tbl3_s3
- Table: system.tbl3_s3
- Table: system.tbl3_s3
- Table: system.tbl3_s4
- Table: system.tbl3_s4
- Table: system.tbl3_s4
- Table: system.tbl3_s5
- Table: system.tbl3_s5
- Table: system.tbl3_s5
- Table: system.tbl3_s6
- Table: system.tbl3_s6
- Table: system.tbl3_s6
- Table: system.tbl3_s7
- Table: system.tbl3_s7
- Table: system.tbl3_s7
- Table: system.tbl3_s8
- Table: system.tbl3_s8
- Table: system.tbl3_s8
- Table: system.tbl3_s9
- Table: system.tbl3_s9
- Table: system.tbl3_s9
––– input –––
mysql -h0 -P3306 -e "create table ${CLUSTER_NAME}:tbl4(id bigint) shards='3000' rf='3' timeout='60'"; echo $?
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: P03: syntax error, unexpected $undefined, expecting $end near ':tbl4(id bigint) shards='3000' rf='3' timeout='60''
+ 1
––– input –––
for i in 1 2 3; do mysql -h0 -P${i}306 -e "show tables from system\G"; done | grep -c 'system.tbl4_s'
––– output –––
- 9000
+ 0
––– input –––
mysql -h0 -P3306 -e "create table ${CLUSTER_NAME}:tbl5(id bigint) shards='3001' rf='3'"?
––– output –––
OK

@donhardman donhardman force-pushed the feature/sharding-rollback branch from 9b97be0 to 923451f Compare August 25, 2025 04:45
- Introduce atomic operation groups with rollback commands
- Add rollback execution with error handling and schema migration
- Implement rebalancing controls: stop, pause, resume, and progress tracking
- Add HealthMonitor for issue detection and automatic recovery
- Provide CleanupManager for orphaned resources and stale states
- Extend queue schema and APIs to support rollback metadata
- Update documentation with usage examples and migration steps
- Merge rollback logic into unified add and replication methods
- Auto-generate rollback queries when supported
- Use rollback columns with schema fallback
- Simplify queue insertion and processing with operation groups
- Remove redundant rollback-specific methods and cleanup code
- Remove RollbackCommandGenerator and legacy fallback code
- Make rollback SQL parameter required for all queue operations
- Update queue schema and docs to mandate rollback commands
- Add rollback commands for shard and cluster operations
- Improve test coverage with explicit rollback parameters
- Simplify rollback handling by assuming always-on support
- Ensure rollback queries and commands are properly captured in tests
- Explain rollback usage in sharding context
- Refresh related component documentation
- Explain rollback usage in sharding context
- Refresh related component documentation
- Replace count() with sizeof() for array counts
- Extract health recovery and cleanup into methods
- Remove unused object instantiations
- Reformat method signatures and code blocks for consistency
- Add precise array shapes for health, queue, and cleanup methods
- Fix nullable and optional keys in health check results
- Replace null coalescing with explicit empty string in rollbackQuery
- Add explicit type checks to prevent mixed types
- Correct test imports for PHPStan compliance
- Add precise array shape annotations for mocks and methods
- Handle empty query results and missing error keys safely
- Refactor recommendation generation with proper type checks
- Fix code style to satisfy static analysis requirements
- Add callback support to TestableQueue to capture commands during tests
- Introduce mock node sets and setters in TestableCluster for flexible test setups
- Enable TestableTable to accept test scenarios and generate corresponding mock commands
- Update test helpers to pass callbacks and scenarios for more accurate test coverage
- Change addNodeIds, addTables, removeTables to accept array parameters instead of variadic strings
- Update all call sites to pass arrays consistently
- Prevent errors when detaching tables by ensuring proper argument types
@donhardman donhardman force-pushed the feature/sharding-rollback branch from 923451f to 63c5ee1 Compare September 4, 2025 05:07
Copy link

github-actions bot commented Sep 4, 2025

🐳 Docker Images Pushed

Buddy Test-Kit Images:

  • Branch image: ghcr.io/manticoresoftware/manticoresearch:test-kit-feature_sharding-rollback-buddy
  • Commit image: ghcr.io/manticoresoftware/manticoresearch:test-kit-9cd5b2a1-buddy

Base image used: ghcr.io/manticoresoftware/manticoresearch:test-kit-latest

These images contain the buddy code from this PR and can be used for testing.

Built from commit: 63c5ee1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant