fresh-borzoni opened a new issue, #535: URL: https://github.com/apache/fluss-rust/issues/535
### Search before asking - [x] I searched in the [issues](https://github.com/apache/fluss-rust/issues) and found nothing similar. ### Description PbApiVersion carries api_key, min_version, max_version as int32 for forward-compat, but both clients use them as int16/short internally. Today: - Java silently truncates with (short) intValue. A server advertising e.g. api_key = 70000 becomes 4464, a different (probably invalid) API key — with no signal to the operator. - Rust panics via i16::try_from(...).unwrap(). A misbehaving server can crash a client connection task by advertising any value outside i16 range. Both behaviors are wrong. Better: validate at the wire boundary and surface a typed protocol error (e.g. InvalidApiVersionException / Error::UnsupportedVersion) carrying the offending field name and value, then close the connection. No panic, no silent corruption. Trivial change in both clients, should land together to keep cross-language behavior aligned. Lower priority as this has low chances to happen in practice ### Willingness to contribute - [ ] I'm willing to submit a PR! -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
