{"record":{"id":"835ff7e1681f284e","repo":"t8y2/dbx","slug":"invalid-hive-thrift-client-max-message-size-q-ex-835ff7","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/hive-go/config.go","lineNumber":604,"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":586,"sourceCodeEnd":622,"githubUrl":"https://github.com/t8y2/dbx/blob/c0390bff16418b651f4728520d99adf8ce48829a/agents/drivers/hive-go/config.go#L586-L622","documentation":"This error means the 'thrift.client.max.message.size' parameter could not be parsed as an integer number of bytes. The driver parses it with ParseInt(value, 10, 32) and assigns it to MaxMessageSize as an int32, so fractional, unit-suffixed, or out-of-int32-range values are rejected. It is thrown during DSN parsing in config.go before any connection is made.","triggerScenarios":"Passing thrift.client.max.message.size=100MB, =1048576.0, or a value larger than 2147483647 in the Hive DSN / parameter map.","commonSituations":"Specifying the size with a human unit (MB/GB) instead of raw bytes; pasting a 64-bit byte count that overflows int32; copying a setting from a different driver that accepts byte-size strings.","solutions":["Convert the size to a plain integer byte count, e.g. 100MB -> 104857600","Ensure the value fits in a signed 32-bit integer (max 2147483647)","Remove the parameter to use the driver's default max message size"],"exampleFix":"// before\ndsn := \"hive://user@host:10000/db?thrift.client.max.message.size=100MB\"\n// after\ndsn := \"hive://user@host:10000/db?thrift.client.max.message.size=104857600\"","handlingStrategy":"validation","validationCode":"func validMaxMessageSize(v string) bool {\n\tn, err := strconv.ParseInt(v, 10, 32)\n\treturn err == nil && n > 0 && n <= math.MaxInt32\n}\n// e.g. validate \"104857600\" passes, \"100MB\" fails","typeGuard":null,"tryCatchPattern":"if _, err := driver.Open(dsn); err != nil {\n\tif strings.Contains(err.Error(), \"thrift.client.max.message.size\") {\n\t\treturn fmt.Errorf(\"fix DSN: %w\", err)\n\t}\n\treturn err\n}","preventionTips":["Always express thrift.client.max.message.size in raw bytes within int32 range","Compute MB/GB sizes in code before formatting the DSN","Document accepted format (bytes) next to the config key"],"tags":["hive","config-parsing","thrift"],"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"}