luoyuxia opened a new issue, #585:
URL: https://github.com/apache/fluss-rust/issues/585

   ### Search before asking
   
   - [x] I searched in the 
[issues](https://github.com/apache/fluss-rust/issues) and found nothing similar.
   
   ### Please describe the bug 🐞
   
   The Rust client currently appears to support only one bootstrap endpoint, 
even though the public configuration is named `bootstrap_servers` / 
`bootstrap.servers`. A comma-separated value such as 
`127.0.0.1:9123,127.0.0.1:9124` should be accepted so users can configure 
multiple bootstrap nodes for high availability.
   
   Current behavior:
   
   1. Set the Rust client config to a comma-separated bootstrap list, for 
example:
   
   ```rust
   let mut config = Config::default();
   config.bootstrap_servers = "127.0.0.1:9123,127.0.0.1:9124".to_string();
   let conn = FlussConnection::create(config).await?;
   ```
   
   2. The client passes the whole string through `Metadata::new` / 
`Metadata::init_cluster`.
   3. `Metadata::parse_bootstrap` calls `to_socket_addrs()` on the complete 
string, so the comma-separated value is treated as a single socket address and 
fails to resolve.
   
   Expected behavior:
   
   The client should parse `bootstrap_servers` as a comma-separated list of 
`host:port` entries, trim whitespace, validate each endpoint, and use one 
reachable bootstrap endpoint to initialize metadata. Reinitialization should 
also keep using the configured bootstrap list instead of assuming a single 
address.
   
   Impact:
   
   Users cannot configure multiple bootstrap nodes/coordinators for HA or 
failover. This also makes the plural config name misleading.
   
   ### Solution
   
   Update the client bootstrap parsing to return a list of socket addresses 
rather than a single `SocketAddr`. During metadata initialization and 
reinitialization, try the parsed endpoints in a deterministic order, falling 
back to the next endpoint if one cannot be resolved or connected.
   
   Suggested test coverage:
   
   - comma-separated IPv4/hostname entries, e.g. 
`127.0.0.1:9123,localhost:9124`;
   - whitespace around entries;
   - IPv6 entries such as `[::1]:9123`;
   - invalid empty entries and invalid ports;
   - `reinit_cluster` uses the configured bootstrap list.
   
   ### Are you willing to submit a PR?
   
   - [ ] 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]

Reply via email to