Caideyipi commented on PR #17567: URL: https://github.com/apache/iotdb/pull/17567#issuecomment-4610401444
Thanks for working on the IPv6 parsing fix. I found two issues that look worth addressing before merge: 1. Ratis still cannot read legacy unbracketed IPv6 peer addresses. `hostAddress()` now writes IPv6 as `[ip]:port`, but `fromRaftPeerAddressToTEndPoint()` and `fromRaftPeerProtoToTEndPoint()` still parse non-bracket addresses with `split(:)`. If a node has existing/persisted peer metadata from the previous format, e.g. `::1:10710`, recovery/redirect parsing will still hit the old `NumberFormatException`. It would be safer to parse the non-bracket path with the last colon as the port separator, or explicitly normalize legacy addresses during recovery. 2. The bracketed IPv6 branches do not verify that `]` is followed by `:`. Inputs such as `[::1]6667` are currently accepted and parsed as port `667` because the code blindly starts at `bracketEnd + 2`. This affects the Ratis utils, JDBC URL parser, and Python `Session.init_from_node_urls()`. Please validate the `]:` separator and reject empty/non-numeric ports. Could you also add regression tests for `[::1]:port` plus malformed bracket inputs like `[::1]6667`, `[::1]:`, and missing `]`? JDBC already has URL parser tests, and Ratis `UtilsTest` would be a good place to lock down the server-side behavior. -- 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]
