{"record":{"id":"92778ceae0f31169","repo":"t8y2/dbx","slug":"unsupported-iotdb-bench-mode-s","errorCode":null,"errorMessage":"unsupported IOTDB_BENCH_MODE: %s","messagePattern":"unsupported IOTDB_BENCH_MODE: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"agents/drivers/iotdb/bench/go/main.go","lineNumber":114,"sourceCode":"\t\t})\n\t\treturn\n\t}\n\tif conf.Mode == \"hold\" {\n\t\tobservation, err := executeQuery(&session, conf, \"SHOW DATABASES\")\n\t\tif err != nil {\n\t\t\tfatal(err)\n\t\t}\n\t\twriteJSON(map[string]any{\n\t\t\t\"driver\":         \"go\",\n\t\t\t\"client_version\": clientVersion,\n\t\t\t\"ready\":          true,\n\t\t\t\"rows\":           observation.Rows,\n\t\t})\n\t\ttime.Sleep(time.Duration(envInt(\"BENCH_HOLD_MS\", 30_000)) * time.Millisecond)\n\t\treturn\n\t}\n\tif conf.Mode != \"benchmark\" {\n\t\tfatal(fmt.Errorf(\"unsupported IOTDB_BENCH_MODE: %s\", conf.Mode))\n\t}\n\n\tworkloads := []workload{\n\t\t{Name: \"show_databases\", SQL: \"SHOW DATABASES\", Iterations: conf.MetadataIterations},\n\t\t{\n\t\t\tName:       \"point_query\",\n\t\t\tSQL:        fmt.Sprintf(\"SELECT s1,s2,s3 FROM %s WHERE time = %d\", device, max(1, conf.Rows/2)),\n\t\t\tIterations: conf.PointIterations,\n\t\t},\n\t\t{Name: \"range_100\", SQL: \"SELECT s1,s2,s3 FROM \" + device + \" LIMIT 100\", Iterations: conf.RangeIterations},\n\t\t{Name: \"scan_all\", SQL: \"SELECT s1,s2,s3 FROM \" + device, Iterations: conf.ScanIterations},\n\t}\n\n\tresults := make([]workloadResult, 0, len(workloads))\n\tfor _, item := range workloads {\n\t\twarmups := conf.Warmups\n\t\tif item.Name == \"scan_all\" && warmups > 1 {\n\t\t\twarmups = 1","sourceCodeStart":96,"sourceCodeEnd":132,"githubUrl":"https://github.com/t8y2/dbx/blob/c0390bff16418b651f4728520d99adf8ce48829a/agents/drivers/iotdb/bench/go/main.go#L96-L132","documentation":"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.","triggerScenarios":"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).","commonSituations":"CI pipeline env var renamed or misspelled; copying an example .env with an old mode value; local shell exporting a stale IOTDB_BENCH_MODE.","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"],"exampleFix":"// before\nIOTDB_BENCH_MODE=quick ./iotdb-bench\n// after\nIOTDB_BENCH_MODE=benchmark ./iotdb-bench","handlingStrategy":"validation","validationCode":"mode := os.Getenv(\"IOTDB_BENCH_MODE\")\nif mode != \"\" && mode != \"benchmark\" && mode != \"capture\" {\n  panic(fmt.Sprintf(\"IOTDB_BENCH_MODE must be 'benchmark' or 'capture', got %q\", mode))\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Pin IOTDB_BENCH_MODE=benchmark in CI configs","Grep deployment manifests for stale mode values before releasing"],"tags":["config","benchmark","env-var","iotdb"],"backgroundTag":"unsupported-mode-value","analyzedSha":"c0390bff16418b651f4728520d99adf8ce48829a","analyzedAt":"2026-09-05T23:05:10.900Z","contentChangedAt":"2026-09-05T23:05:10.900Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}