{"record":{"id":"7abc965c2aba78ad","repo":"t8y2/dbx","slug":"unsupported-iotdb-timestamp-precision-s","errorCode":null,"errorMessage":"unsupported IoTDB timestamp precision: %s","messagePattern":"unsupported IoTDB timestamp precision: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"agents/drivers/iotdb/driver.go","lineNumber":312,"sourceCode":"\t\t}\n\t\tif !hasNext {\n\t\t\treturn \"\", errors.New(\"IoTDB SHOW VARIABLES did not return TimestampPrecision\")\n\t\t}\n\t\tvariable, err := dataset.GetStringByIndex(variableIndex)\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\tif !strings.EqualFold(strings.ReplaceAll(strings.TrimSpace(variable), \"_\", \"\"), \"TimestampPrecision\") {\n\t\t\tcontinue\n\t\t}\n\t\tvalue, err := dataset.GetStringByIndex(valueIndex)\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\tif precision := normalizeTimestampPrecision(value); precision != \"\" {\n\t\t\treturn precision, nil\n\t\t}\n\t\treturn \"\", fmt.Errorf(\"unsupported IoTDB timestamp precision: %s\", value)\n\t}\n}\n\nfunc normalizeTimestampPrecision(value string) string {\n\tswitch strings.ToLower(strings.TrimSpace(value)) {\n\tcase \"ms\", \"us\", \"ns\":\n\t\treturn strings.ToLower(strings.TrimSpace(value))\n\tdefault:\n\t\treturn \"\"\n\t}\n}\n\nfunc (s *sessionClient) Close() error {\n\tif s == nil || s.session == nil {\n\t\treturn nil\n\t}\n\treturn s.session.Close()\n}","sourceCodeStart":294,"sourceCodeEnd":330,"githubUrl":"https://github.com/t8y2/dbx/blob/c0390bff16418b651f4728520d99adf8ce48829a/agents/drivers/iotdb/driver.go#L294-L330","documentation":"queryTimestampPrecision asks the server for its timestamp precision and normalizes it via normalizeTimestampPrecision, which accepts only ms, us, or ns. If the server reports anything else, newSessionClient fails with 'unsupported IoTDB timestamp precision: %s'.","triggerScenarios":"Connecting to an IoTDB server whose timestamp_precision setting reports an unexpected value (casing/locale variant or a version reporting a precision unit this driver doesn't know).","commonSituations":"Running against a forked, older, or newer IoTDB build that reports an unknown precision string, or a server configured with a non-standard timestamp_precision value such as 'microsecond'.","solutions":["Set the server's timestamp_precision to ms, us, or ns in iotdb-common.properties and restart the server.","Query the server to see what precision value it reports and compare with the accepted set.","Align driver and server versions so the reported value is recognized.","Patch normalizeTimestampPrecision if your server legitimately reports a new precision unit."],"exampleFix":"# before (iotdb-common.properties)\ntimestamp_precision=microsecond\n# after\ntimestamp_precision=us","handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"client, err := newSessionClient(cfg)\nif err != nil && strings.Contains(err.Error(), \"unsupported IoTDB timestamp precision\") {\n    return fmt.Errorf(\"server timestamp_precision unsupported; set it to ms/us/ns: %w\", err)\n}","preventionTips":["Configure server timestamp_precision as ms, us, or ns in iotdb-common.properties.","Keep driver and server versions aligned.","Verify server precision in deployment smoke tests before rollout."],"tags":["go","iotdb","server-config","timestamp-precision"],"backgroundTag":"unsupported-server-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"}