RustToMetal opened a new pull request, #4553: URL: https://github.com/apache/iggy/pull/4553
## Which issue does this PR address? Relates to #4001 ## Rationale The Swift client can connect and manage resources (#4503) but cannot move data. This is the next step of #4001: messaging, consumer groups, and offsets. ## What changed? The server now fences every partition request on a partition context and routes explicit partitions only, so a client has to find the context, keep it, and resolve balanced and keyed partitioning itself. The Swift client now does this the way the Rust client does. Sends take the context from `GetPartitionRoute` and cache it, and after `HistoryUnavailable` read one fresh route. Polls and offset writes take theirs from `GetPollRouting` and `GetConsumerOffsetRouting`: on a single node they go over the main connection, in a cluster over a data connection to the partition primary bound to the same session with `BindSession`. Consumer-group polls round-robin over the member's synced assignment, re-sync after a fence, and the heartbeat keeps joined groups in sync. Raw partition requests take the same routes. The end-to-end suite and its CI lane (plain and TLS) come with this PR. Of the 3,180 added lines, 1,676 are tests. ## Local Execution - Passed - Pre-commit hooks ran Run on macOS (Swift 6.4): `swift format lint --strict`, `swift build -Xswiftc -warnings-as-errors` (sources and tests), `swift build -c release`, `swift test --parallel` (209 tests, also three runs with the CPUs saturated), the golden lane (fmt, clippy, regenerate, no diff), and `prek` on commit. The end-to-end suite (29 tests) passed against `iggy-server` built from current master, plain and with TLS using the certificates in `core/certs`. I also ran sends, polls, offsets, and group polls against a local two-node cluster on loopback, signing in through the leader and through the follower; that check is not part of this PR. Not run locally: the Linux build, and a cluster where a partition's primary is a different node from the one the client is connected to (on the local cluster every partition primary was the leader, so the data connections went back to it). The scripted-server tests cover that case. ## AI Usage 1. Claude Code. 2. Implementation and tests were written with it, as a port of the Rust client's routing (`core/common/src/traits/binary_impls/messages.rs`, `core/sdk/src/driver/poll_router.rs`, `core/common/src/consumer_group_client_state.rs`), and it was used for a review pass against the comments on the earlier Swift PRs. 3. The local runs listed above, including the real-server and two-node cluster runs, plus mutation checks: each routing behaviour was broken on purpose and a test failed for each. 4. Yes. -- 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]
