From 7b19ac5e0a6968c861d05f8cb0b6194597bcb934 Mon Sep 17 00:00:00 2001 From: John Wiebe Date: Sat, 7 Nov 2026 00:34:48 -0500 Subject: [PATCH 1/5] ENG-30396: document the nightly job's third cluster shape, 3 nodes with k=2 and 2 sites per host The run-sqlancer.sh options it needs (--kfactor, --sites) exist; the shape is chosen by the job's CLUSTERS, nodes:kfactor[:kill[:sites]]. --- src/sqlancer/voltdb/README.md | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/src/sqlancer/voltdb/README.md b/src/sqlancer/voltdb/README.md index d5cb2365b..88e132f0a 100644 --- a/src/sqlancer/voltdb/README.md +++ b/src/sqlancer/voltdb/README.md @@ -4,13 +4,14 @@ A SQLancer provider for [VoltDB](https://www.voltactivedata.com/), developed for VoltDB schemas, both replicated and partitioned tables, fills them with single-row inserts, upserts, updates and deletes, and runs SQLancer's oracles against them through the VoltDB JDBC driver. -**Status: milestone 12.** The provider creates schemas and data and runs these logic-bug oracles: NoREC (the default, +**Status: milestone 13.** The provider creates schemas and data and runs these logic-bug oracles: NoREC (the default, milestone 2), TLP WHERE (milestone 3), TLP DISTINCT, TLP HAVING and TLP AGGREGATE (milestone 5), PQS (milestone 6), and PARAMS, literals against JDBC parameters (milestone 8). Since milestone 9 each database's rows are also updated, upserted and deleted before the oracles run. Since milestone 10 each database also has materialized views, which the VIEWS oracle checks. Since milestone 11 expressions also use CASE, COALESCE, MOD, FLOOR, CEILING, CHAR_LENGTH, SUBSTRING, UPPER, LOWER and TRIM, and the LIMIT oracle checks LIMIT and OFFSET. Since milestone 12 the run script -can kill and rejoin nodes while SQLancer runs (`--kill-interval`), which the nightly job's 3-node run does. +can kill and rejoin nodes while SQLancer runs (`--kill-interval`), which the nightly job's 3-node run does. Since +milestone 13 the nightly job also runs a third cluster shape: 3 nodes with k=2 and 2 sites per host. `SMOKE`, from milestone 1, only reads every table and checks that the queries succeed. `voltdb/run-sqlancer.sh` (milestone 4) starts a cluster, runs SQLancer against it and saves the results. A nightly lab job (milestone 7) runs it against master's kit; @@ -137,14 +138,21 @@ system test (`matrix-systemtest/master`, on the nights the rotation in `internal The job fetches this repository at the commit in its `SQLANCER_REF` parameter. That commit is pinned in the Jenkinsfile, so a change here reaches the nightly run only when the Jenkinsfile is changed to name it. It then builds SQLancer with -the kit's runtime JDK and makes two runs, one after the other, every node on the agent: +the kit's runtime JDK and makes three runs, one after the other, every node on the agent: | Run (triagedb name) | Cluster | Oracles | Time | | --- | --- | --- | --- | | `sqlancer-3n-k1-kill300` | 3 nodes, k=1, 8 sites per host; a node is killed and rejoined every 5 minutes | all nine (NoREC, TLP WHERE, DISTINCT, HAVING, AGGREGATE, PQS, PARAMS, VIEWS, LIMIT) | 45 minutes | | `sqlancer-1n-k0` | 1 node, 8 sites per host | the same | 45 minutes | +| `sqlancer-3n-k2-s2` | 3 nodes, k=2, 2 sites per host: every partition on every node, and 2 partitions in all | the same | 45 minutes | -Both runs use `--use-reducer`. The first run's seed is the UTC time as `yyyymmddHHMM`, and the second's is one more. +The shapes differ in what the planner and the execution engine do. With one node and 8 sites, a multi-partition query +gathers 8 partitions' results in one process. With 3 nodes, k=1, the partitions' leaders are spread over the nodes and +each has one replica, and node failures move them. With k=2 and 2 sites per host, every node holds every partition, so +there are only 2 partitions and every write is replicated twice. The whole job takes about 2 hours 20 minutes. + +Every run uses `--use-reducer`. The first run's seed is the UTC time as `yyyymmddHHMM`, and each next run's is one +more. `--avoid-known-bugs` stays on, so a failure is a new bug, or a known one in a new form. Each run is one row in the triagedb, with the seed in its run arguments. A failing row's reason is the oracle's account @@ -156,8 +164,8 @@ To repeat a failure on your machine, take the seed and oracles from the bundle's them against the same build. The reproduction in `reproductions/` is usually quicker: run its statements on an empty server. -The job's parameters change a manual run: `CLUSTERS` (runs as `nodes:kfactor[:kill]`, where kill is the seconds -between node failures, default `3:1:300 1:0`), `DURATION` (seconds +The job's parameters change a manual run: `CLUSTERS` (runs as `nodes:kfactor[:kill[:sites]]`, where kill is the +seconds between node failures and sites the sites per host, default `3:1:300 1:0 3:2:0:2`), `DURATION` (seconds per run, default 2700), `ORACLES`, `SEED`, `EXTRA_ARGS` (provider options) and `SQLANCER_REF`. A run of the job alone needs a kit: give `releasedir`, for example `releases/one-offs/16.1.0-SNAPSHOT-master/`. From f22ef7d09c351d6a9abeeb3b27d03da6c1dbbf59 Mon Sep 17 00:00:00 2001 From: John Wiebe Date: Sat, 7 Nov 2026 01:29:38 -0500 Subject: [PATCH 2/5] ENG-30396: with node failures, skip a CREATE whose name an interrupted DDL took Lab build #17's 3-node run with node failures failed on CREATE TABLE DB0_T0: "object name already exists". A DDL statement that a failure interrupted can still commit after its client is told it failed, so the provider never saw the table and reused its name. While --node-failures is on, VoltDBConnection skips such a statement like the other errors a failure causes; without it, the error still fails the run. --- src/sqlancer/voltdb/README.md | 1 + src/sqlancer/voltdb/VoltDBErrors.java | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/sqlancer/voltdb/README.md b/src/sqlancer/voltdb/README.md index 88e132f0a..4b75c50de 100644 --- a/src/sqlancer/voltdb/README.md +++ b/src/sqlancer/voltdb/README.md @@ -123,6 +123,7 @@ handle the errors a node failure causes: | `Transaction being restarted due to fault recovery or shutdown` | The same for a read, aborted by the failure. | The same. | | `OPS request hit sixty second timeout before all responses were received` | A system request, such as the JDBC metadata calls that read the schema, waited on the dead node. | The same. | | `The errors for @VerifyCatalogAndWriteJar from host N: Host N failed, connection lost` | A DDL statement's catalog update was waiting on the dead node. | The same. | +| `object name already exists` | A DDL statement that a failure interrupted committed after all, so a later CREATE of the same name collides with a table or index the provider never saw. | Skips, as above. Without `--node-failures` this fails the run, as it would be a provider bug. | | `Can't do catalog update(@AdHoc) while node rejoin is in progress`, `... while catalog update transaction is in progress` | VoltDB rejects DDL until the rejoin is done, or until a catalog update the failure interrupted is cleaned up. | Retries the statement, like a concurrent schema change, for up to `--retry-seconds`. VoltDB rejects it before running it. | Without `--node-failures`, these errors fail the run as before. The OPS timeout makes each failure cost up to a minute diff --git a/src/sqlancer/voltdb/VoltDBErrors.java b/src/sqlancer/voltdb/VoltDBErrors.java index c14890d9a..3e8624e93 100644 --- a/src/sqlancer/voltdb/VoltDBErrors.java +++ b/src/sqlancer/voltdb/VoltDBErrors.java @@ -29,7 +29,10 @@ public final class VoltDBErrors { private static final String[] NODE_FAILURE = { "Transaction dropped due to change in mastership", "OPS request hit sixty second timeout", "Transaction being restarted due to fault recovery", // a catalog update (DDL) whose verification step was waiting on the dead node - "failed, connection lost" }; + "failed, connection lost", + // a DDL statement that one of the errors above interrupted can still commit after its client was told it + // failed, so a later CREATE of the same name collides with an object the provider never saw + "object name already exists" }; private VoltDBErrors() { } From aba90717b2e912013ace71987096027dd6ba5d9b Mon Sep 17 00:00:00 2001 From: John Wiebe Date: Sat, 7 Nov 2026 02:23:52 -0500 Subject: [PATCH 3/5] ENG-30396: retry 'The planner is outdated' and the other transient rejections txnid2 retries Lab build #18's 3-node run with node failures failed on an UPDATE: "Catalog has been updated. The planner is outdated." PlannerTool raises it before running a statement once a catalog update has replaced the planner, which happens often around a rejoin. It is now retried like a concurrent schema change, with "was no longer live" and "Ad Hoc Planner task queue is full". "Transaction Interrupted" and "transaction completion is in progress" are skipped while --node-failures is on, as a failure can leave such a transaction committed. The list follows txnid2's TxnId2Utils. --- src/sqlancer/voltdb/README.md | 3 ++- src/sqlancer/voltdb/VoltDBErrors.java | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/sqlancer/voltdb/README.md b/src/sqlancer/voltdb/README.md index 4b75c50de..a8da802d4 100644 --- a/src/sqlancer/voltdb/README.md +++ b/src/sqlancer/voltdb/README.md @@ -120,10 +120,11 @@ handle the errors a node failure causes: | Error | What it means | What the provider does | | --- | --- | --- | | `Transaction dropped due to change in mastership. It is possible the transaction was committed` | The statement was in flight when a partition's leader moved; it may have committed. | Skips the statement, check or database (IgnoreMeException), since it cannot know. | -| `Transaction being restarted due to fault recovery or shutdown` | The same for a read, aborted by the failure. | The same. | +| `Transaction being restarted due to fault recovery or shutdown`, `Transaction Interrupted`, `transaction completion is in progress` | The same for a transaction the failure aborted or caught completing. | The same. | | `OPS request hit sixty second timeout before all responses were received` | A system request, such as the JDBC metadata calls that read the schema, waited on the dead node. | The same. | | `The errors for @VerifyCatalogAndWriteJar from host N: Host N failed, connection lost` | A DDL statement's catalog update was waiting on the dead node. | The same. | | `object name already exists` | A DDL statement that a failure interrupted committed after all, so a later CREATE of the same name collides with a table or index the provider never saw. | Skips, as above. Without `--node-failures` this fails the run, as it would be a provider bug. | +| `Catalog has been updated. The planner is outdated.`, `... was no longer live`, `Ad Hoc Planner task queue is full` | The statement was planned while a catalog update, frequent around a rejoin, replaced the planner, or the planner was busy. VoltDB rejects it before running it. | Retries it, with or without `--node-failures`, like a concurrent schema change. | | `Can't do catalog update(@AdHoc) while node rejoin is in progress`, `... while catalog update transaction is in progress` | VoltDB rejects DDL until the rejoin is done, or until a catalog update the failure interrupted is cleaned up. | Retries the statement, like a concurrent schema change, for up to `--retry-seconds`. VoltDB rejects it before running it. | Without `--node-failures`, these errors fail the run as before. The OPS timeout makes each failure cost up to a minute diff --git a/src/sqlancer/voltdb/VoltDBErrors.java b/src/sqlancer/voltdb/VoltDBErrors.java index 3e8624e93..fadace4ba 100644 --- a/src/sqlancer/voltdb/VoltDBErrors.java +++ b/src/sqlancer/voltdb/VoltDBErrors.java @@ -17,6 +17,10 @@ public final class VoltDBErrors { */ private static final String[] RETRYABLE = { "while another one is in progress", "was planned against a catalog version which does not match", + // the same, raised by the planner itself once a catalog update has replaced it (PlannerTool.planSql), and + // for DDL planned against a configuration that is no longer live; and the ad hoc planner's queue being + // full. txnid2 (TxnId2Utils) retries the same rejections. + "The planner is outdated", "was no longer live", "Ad Hoc Planner task queue is full", // the same while a node fails or rejoins (run-sqlancer.sh --kill-interval): VoltDB rejects DDL until the // failed catalog update is cleaned up and the rejoin is done "while catalog update transaction is in progress", "while node rejoin is in progress" }; @@ -28,6 +32,8 @@ public final class VoltDBErrors { */ private static final String[] NODE_FAILURE = { "Transaction dropped due to change in mastership", "OPS request hit sixty second timeout", "Transaction being restarted due to fault recovery", + // a transaction a failure interrupted, or whose completion it caught (txnid2 lists both as transient) + "Transaction Interrupted", "transaction completion is in progress", // a catalog update (DDL) whose verification step was waiting on the dead node "failed, connection lost", // a DDL statement that one of the errors above interrupted can still commit after its client was told it From 4cdf217dc3f11ce76e39a48b891491322f484c42 Mon Sep 17 00:00:00 2001 From: John Wiebe Date: Sat, 7 Nov 2026 02:46:40 -0500 Subject: [PATCH 4/5] ENG-30396: retry every DDL the catalog update blocker refuses A local run with node failures hit "Can't do catalog update(@AdHoc) while leader promotion or transaction repair are in progress". VoltZK.createCatalogUpdateBlocker refuses DDL, before it starts, while any of several operations is in progress, all with that prefix, so the prefix is now retryable instead of each condition. The next 10-minute trial, 8 kills and 8 rejoins, passed. --- src/sqlancer/voltdb/README.md | 2 +- src/sqlancer/voltdb/VoltDBErrors.java | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/sqlancer/voltdb/README.md b/src/sqlancer/voltdb/README.md index a8da802d4..ded220808 100644 --- a/src/sqlancer/voltdb/README.md +++ b/src/sqlancer/voltdb/README.md @@ -125,7 +125,7 @@ handle the errors a node failure causes: | `The errors for @VerifyCatalogAndWriteJar from host N: Host N failed, connection lost` | A DDL statement's catalog update was waiting on the dead node. | The same. | | `object name already exists` | A DDL statement that a failure interrupted committed after all, so a later CREATE of the same name collides with a table or index the provider never saw. | Skips, as above. Without `--node-failures` this fails the run, as it would be a provider bug. | | `Catalog has been updated. The planner is outdated.`, `... was no longer live`, `Ad Hoc Planner task queue is full` | The statement was planned while a catalog update, frequent around a rejoin, replaced the planner, or the planner was busy. VoltDB rejects it before running it. | Retries it, with or without `--node-failures`, like a concurrent schema change. | -| `Can't do catalog update(@AdHoc) while node rejoin is in progress`, `... while catalog update transaction is in progress` | VoltDB rejects DDL until the rejoin is done, or until a catalog update the failure interrupted is cleaned up. | Retries the statement, like a concurrent schema change, for up to `--retry-seconds`. VoltDB rejects it before running it. | +| `Can't do catalog update(@AdHoc) while ...`: a node rejoin, leader promotion or transaction repair, or a catalog update transaction, is in progress | VoltDB's catalog update blocker (`VoltZK`) refuses DDL until the failure is handled and the rejoin is done. | Retries the statement, like a concurrent schema change, for up to `--retry-seconds`. VoltDB rejects it before running it. | Without `--node-failures`, these errors fail the run as before. The OPS timeout makes each failure cost up to a minute of the threads that read the schema at the time, so a run with failures checks fewer queries. diff --git a/src/sqlancer/voltdb/VoltDBErrors.java b/src/sqlancer/voltdb/VoltDBErrors.java index fadace4ba..d5a02ff4f 100644 --- a/src/sqlancer/voltdb/VoltDBErrors.java +++ b/src/sqlancer/voltdb/VoltDBErrors.java @@ -21,9 +21,10 @@ public final class VoltDBErrors { // for DDL planned against a configuration that is no longer live; and the ad hoc planner's queue being // full. txnid2 (TxnId2Utils) retries the same rejections. "The planner is outdated", "was no longer live", "Ad Hoc Planner task queue is full", - // the same while a node fails or rejoins (run-sqlancer.sh --kill-interval): VoltDB rejects DDL until the - // failed catalog update is cleaned up and the rejoin is done - "while catalog update transaction is in progress", "while node rejoin is in progress" }; + // the same while a node fails or rejoins (run-sqlancer.sh --kill-interval): VoltZK's catalog update + // blocker refuses DDL, before it starts, while a rejoin, leader promotion, transaction repair or an + // interrupted catalog update is in progress ("Can't do catalog update(@AdHoc) while ...") + "Can't do catalog update(@AdHoc) while" }; /** * Errors a node failure causes while nodes are killed and rejoined during the run (--node-failures). A statement in From 07a3c79bb25f9611085ed4df323e8eedbf4dfb61 Mon Sep 17 00:00:00 2001 From: John Wiebe Date: Sat, 7 Nov 2026 05:16:46 -0500 Subject: [PATCH 5/5] ENG-30396: kill nodes by the PID their start recorded, not by command-line match Lab build #20's 3-node run with node failures failed at its first kill: "node1 is not running", though node 1 ran the whole time. pgrep -f did not find the server, whose command line carries a long classpath before its voltdbroot directory. start_node now records the PID it starts (the launcher execs the JVM, so it is the server's) in node.pid; the kill loop uses it, after checking that the process is a VoltDB server, and stopping the cluster kills any recorded server still running. --- voltdb/run-sqlancer.sh | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/voltdb/run-sqlancer.sh b/voltdb/run-sqlancer.sh index ca1088336..ed6c09c88 100755 --- a/voltdb/run-sqlancer.sh +++ b/voltdb/run-sqlancer.sh @@ -159,12 +159,20 @@ stop_cluster() { if grep -q "Server completed initialization" "$cluster/node0/voltdbroot/log/volt.log" 2>/dev/null; then "$voltdb_home/bin/voltadmin" shutdown --force -H "localhost:$(admin_port 0)" >>"$results/run.log" 2>&1 fi - # only processes started for this run carry its directory on their command line + # only processes started for this run carry its directory on their command line, and their PIDs are recorded for _ in $(seq 1 30); do pgrep -f "$cluster/" >/dev/null || break sleep 1 done pkill -f "$cluster/" 2>/dev/null + for f in "$cluster"/node*.pid; do + [ -e "$f" ] && is_server "$(cat "$f")" && kill -9 "$(cat "$f")" 2>/dev/null + done +} + +# is_server PID: whether PID is a running VoltDB server (and not another process that reused the PID) +is_server() { + ps -ww -o command= -p "$1" 2>/dev/null | grep -q "org.voltdb.VoltDB" } trap 'stop_cluster' EXIT @@ -226,11 +234,13 @@ cluster_started=true # start_node I LOG: starts node I, or restarts it after a failure, which rejoins it to the running cluster start_node() { # in the foreground under nohup: "voltdb start --background" allows one server per user (a shared PID file). - # In a subshell, so that the server is not one of this script's jobs and its kill -9 is not reported. + # In a subshell, so that the server is not one of this script's jobs and its kill -9 is not reported. The + # launcher execs the server's JVM, so the PID it starts with is the server's, which node.pid records. (nohup "$voltdb_home/bin/voltdb" start -D "$cluster/node$1" -c "$nodes" -H "localhost:$(internal_port 0)" \ --client="$(client_port $1)" --admin="$(admin_port $1)" --internal="$(internal_port $1)" \ --zookeeper="$(port $1 3)" --replication="$(port $1 4)" --metrics="$(port $1 5)" \ - >"$2" 2>&1 &) + >"$2" 2>&1 & + echo $! >"$cluster/node$1.pid") } for ((i = 0; i < nodes; i++)); do start_node $i "$cluster/start$i.log" @@ -305,8 +315,10 @@ chaos_loop() { done i=$((1 + RANDOM % (nodes - 1))) n=$((n + 1)) - pid=$(pgrep -f -- "voltdbroot $cluster/node$i( |\$)" | head -1) - if [ -z "$pid" ]; then + # the PID start_node recorded; a pattern match on the command line is not reliable, as the server's command + # line carries a long classpath before its voltdbroot directory + pid=$(cat "$cluster/node$i.pid" 2>/dev/null) + if [ -z "$pid" ] || ! is_server "$pid"; then echo "$(date '+%H:%M:%S') kill $n: node$i is not running" >>"$results/chaos.log" return 1 fi @@ -314,7 +326,7 @@ chaos_loop() { t0=$(date +%s) echo "$(date '+%H:%M:%S') kill $n: node$i (pid $pid)" >>"$results/chaos.log" while port_in_use "$(client_port $i)"; do sleep 1; done - # the server is "java ... voltdbroot "; the survivors must notice the failure before it comes back + # the survivors must notice the failure before the node comes back sleep 5 if ! rejoin_node "$i" "$n"; then echo "$(date '+%H:%M:%S') rejoin $n: node$i did not rejoin within 600 s" >>"$results/chaos.log"