{"record":{"id":"02edd4986eed8a87","repo":"t8y2/dbx","slug":"invalid-hive-thrift-client-max-message-size-q-ex","errorCode":null,"errorMessage":"invalid Hive thrift.client.max.message.size %q: expected bytes","messagePattern":"invalid Hive thrift\\.client\\.max\\.message\\.size %q: expected bytes","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"agents/drivers/argo-go/config.go","lineNumber":601,"sourceCode":"\t\tparsed, err := strconv.Atoi(value)\n\t\tif err != nil || parsed <= 0 {\n\t\t\treturn fmt.Errorf(\"invalid Hive fetchSize %q: expected a positive integer\", value)\n\t\t}\n\t\tconfig.FetchSize = parsed\n\t}\n\tif value := parameter(values, \"sockettimeout\"); value != \"\" {\n\t\tparsed, err := strconv.ParseInt(value, 10, 64)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"invalid Hive socketTimeout %q: expected seconds\", value)\n\t\t}\n\t\tif parsed > 0 {\n\t\t\tconfig.SocketTimeout = time.Duration(parsed) * time.Second\n\t\t}\n\t}\n\tif value := parameter(values, \"thrift.client.max.message.size\"); value != \"\" {\n\t\tparsed, err := strconv.ParseInt(value, 10, 32)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"invalid Hive thrift.client.max.message.size %q: expected bytes\", value)\n\t\t}\n\t\tif parsed > 0 {\n\t\t\tconfig.MaxMessageSize = int32(parsed)\n\t\t}\n\t}\n\tif value := parameter(values, \"retries\"); value != \"\" {\n\t\tparsed, err := strconv.Atoi(value)\n\t\tif err == nil && parsed > 0 {\n\t\t\tconfig.Retries = parsed\n\t\t}\n\t}\n\tif value := parameter(values, \"retryinterval\"); value != \"\" {\n\t\tparsed, err := strconv.ParseInt(value, 10, 64)\n\t\tif err == nil && parsed >= 0 {\n\t\t\tconfig.RetryInterval = time.Duration(parsed) * time.Millisecond\n\t\t}\n\t}\n\tif value := parameter(values, \"initfile\"); value != \"\" {","sourceCodeStart":583,"sourceCodeEnd":619,"githubUrl":"https://github.com/t8y2/dbx/blob/c0390bff16418b651f4728520d99adf8ce48829a/agents/drivers/argo-go/config.go#L583-L619","documentation":"This error is returned when the Hive `thrift.client.max.message.size` DSN parameter is present but cannot be parsed by strconv.ParseInt as an integer number of bytes (32-bit range). The value is applied as the Thrift client MaxMessageSize int32. Non-integer or out-of-range values fail.","triggerScenarios":"Opening a Hive connection with thrift.client.max.message.size=\"10mb\", \"2147483648\" (> int32), or any non-integer value in the connection parameters.","commonSituations":"Specifying human-readable sizes (\"10mb\") instead of raw bytes; exceeding the 32-bit integer limit with very large byte counts; quotes or commas injected by templated config.","solutions":["Set the parameter to a raw byte count as an integer, e.g. thrift.client.max.message.size=104857600","Convert MB/GB to bytes (1 MB = 1048576) before putting it in the DSN","Keep the value within the 32-bit signed integer range (max 2147483647)","Remove the parameter to use the driver default"],"exampleFix":"// before\ndsn := \"hive://user:pass@host:10000/db?thrift.client.max.message.size=100mb\"\n// after\ndsn := \"hive://user:pass@host:10000/db?thrift.client.max.message.size=104857600\"","handlingStrategy":"validation","validationCode":"func validateMaxMessageSize(dsn string) error {\n\tvals, _ := url.ParseQuery(dsn)\n\tv := vals.Get(\"thrift.client.max.message.size\")\n\tif v == \"\" { return nil }\n\tn, err := strconv.ParseInt(v, 10, 32)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"thrift.client.max.message.size must be bytes within int32 range, got %q\", v)\n\t}\n\treturn nil\n}","typeGuard":null,"tryCatchPattern":"if _, err := ParseConfig(dsn); err != nil && strings.Contains(err.Error(), \"max.message.size\") {\n\treturn fmt.Errorf(\"use raw byte count (e.g. 104857600, not 100mb): %w\", err)\n}","preventionTips":["Convert human-readable sizes (100mb) to bytes (104857600) at config generation time","Keep values below 2147483647 (int32 max)","Validate all DSN parameters in CI","Avoid templating units or thousands separators into the value"],"tags":["hive","config","thrift","connection-string"],"backgroundTag":"invalid-connection-string-parameter","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"}