fluss icon indicating copy to clipboard operation
fluss copied to clipboard

[client] Add validation for client.scanner.log.max-poll-records and client.connect-timeout config options

Open pbanakar opened this issue 7 months ago • 0 comments

Search before asking

  • [x] I searched in the issues and found nothing similar.

Description

Problem

The Java client currently has no validation for client.scanner.log.max-poll-records and client.connect-timeout. Setting either of these to 0 makes no practical sense poll() would return nothing and TCP connect would time out immediately but no error is raised at config initialization time.

FlussConfigUtils.validateServerConfigs() already uses validMinValue() to validate server-side numeric configs like default.replication.factor, kv.snapshot.num-retained, and others, but there is no equivalent validation for client-side config options.

Proposed Fix

Add validation in the client initialization path (similar to how server configs are validated in FlussConfigUtils) to enforce:

  • client.scanner.log.max-poll-records must be > 0
  • client.connect-timeout must be > 0

Context

This was identified while implementing validation for the Rust client in apache/fluss-rust#449. The Rust client intentionally skips these checks to match Java behavior, pending this fix upstream.

Willingness to contribute

  • [x] I'm willing to submit a PR!

pbanakar avatar Apr 13 '26 15:04 pbanakar