t8y2/dbx · error
unsupported IOTDB_BENCH_MODE: %s
Error message
unsupported IOTDB_BENCH_MODE: %s
What it means
The IoTDB bench harness only supports two IOTDB_BENCH_MODE values: 'capture' (record observations then hold) and 'benchmark'. Any other value is fatal. This fail-fast check prevents running an undefined workload configuration.
Source
Thrown at agents/drivers/iotdb/bench/go/main.go:114
})
return
}
if conf.Mode == "hold" {
observation, err := executeQuery(&session, conf, "SHOW DATABASES")
if err != nil {
fatal(err)
}
writeJSON(map[string]any{
"driver": "go",
"client_version": clientVersion,
"ready": true,
"rows": observation.Rows,
})
time.Sleep(time.Duration(envInt("BENCH_HOLD_MS", 30_000)) * time.Millisecond)
return
}
if conf.Mode != "benchmark" {
fatal(fmt.Errorf("unsupported IOTDB_BENCH_MODE: %s", conf.Mode))
}
workloads := []workload{
{Name: "show_databases", SQL: "SHOW DATABASES", Iterations: conf.MetadataIterations},
{
Name: "point_query",
SQL: fmt.Sprintf("SELECT s1,s2,s3 FROM %s WHERE time = %d", device, max(1, conf.Rows/2)),
Iterations: conf.PointIterations,
},
{Name: "range_100", SQL: "SELECT s1,s2,s3 FROM " + device + " LIMIT 100", Iterations: conf.RangeIterations},
{Name: "scan_all", SQL: "SELECT s1,s2,s3 FROM " + device, Iterations: conf.ScanIterations},
}
results := make([]workloadResult, 0, len(workloads))
for _, item := range workloads {
warmups := conf.Warmups
if item.Name == "scan_all" && warmups > 1 {
warmups = 1View on GitHub (pinned to c0390bff16)
Solutions
- Set IOTDB_BENCH_MODE=benchmark for measurement runs
- Set IOTDB_BENCH_MODE=capture for recording observations
- Check main.go loadConfig for the exact accepted values and the default
- Unset the stale env var if you intended the default mode
Example fix
// before IOTDB_BENCH_MODE=quick ./iotdb-bench // after IOTDB_BENCH_MODE=benchmark ./iotdb-bench
Defensive patterns
Strategy: validation
Validate before calling
mode := os.Getenv("IOTDB_BENCH_MODE")
if mode != "" && mode != "benchmark" && mode != "capture" {
panic(fmt.Sprintf("IOTDB_BENCH_MODE must be 'benchmark' or 'capture', got %q", mode))
} Prevention
- Pin IOTDB_BENCH_MODE=benchmark in CI configs
- Grep deployment manifests for stale mode values before releasing
When it happens
Trigger: Running the bench binary with IOTDB_BENCH_MODE set to anything other than 'benchmark' or 'capture' (e.g. typo 'benchmarks', 'run', or empty string if loadConfig doesn't default it).
Common situations: CI pipeline env var renamed or misspelled; copying an example .env with an old mode value; local shell exporting a stale IOTDB_BENCH_MODE.
Related errors
- %s must be a positive integer
- BENCH_ORDER must contain exactly: {','.join(commands)}
- unstable result shape for %s
- parse IoTDB connection string: %w
- unsupported IoTDB connection scheme: %s
AI-assisted analysis of t8y2/dbx@c0390bff16 (2026-09-05).
Data as JSON: /api/errors/92778ceae0f31169.
Report an issue: GitHub.