almostintuitive opened a new pull request, #4437:
URL: https://github.com/apache/iggy/pull/4437

   ## Which issue does this PR address?
   
   Relates to #4436
   
   ## Rationale
   
   New bugs should come with a failing test, so this PR adds only that test. The
   fix belongs in the Rust SDK's send path, and is left for discussion.
   
   ## What changed?
   
   When two partitions of a topic have their primaries on different nodes, a
   producer that alternates between them is refused (`TransientNotAccepted`) on
   every send. It waits out two 2s transient windows, then moves its only 
session to
   another node. Each send takes about 4s. Polls avoid this through 
`PollRouter`.
   Sends have no equivalent.
   
   
`given_partitions_on_different_primaries_when_sending_round_robin_should_keep_the_session`
   builds on the existing `seed_split_primaries` fixture. Partition 0 keeps its
   primary through a metadata-only election. Partition 1, created afterwards 
with
   `create_partitions`, is seeded onto the metadata leader. A precondition 
checks
   via `GET_POLL_ROUTING` that the two primaries are on different nodes. After 
one
   warm-up send to each partition, the test alternates four sends and asserts 
that
   none of them moves the session to another node. It is
   `#[ignore = "#4436: ..."]`, so default CI stays green, and it runs with
   `--ignored`.
   
   ## Local Execution
   
   - Not passed: the new test fails as intended, 3 of 3 runs on `master` @
     `43fb44364`, every time with
     `4 of 4 sends moved it to another node ... [(0, 2, 0, 4.020694671s), (1, 
0, 2, 4.018801233s), (0, 2, 0, 4.019829788s), (1, 0, 2, 4.018055753s)]`.
     On tag `iggy-0.11.0` it fails the same way (about 4.07s per send).
     `cargo fmt --all --check` and
     `cargo clippy -p integration --all-features --tests -- -D warnings` are 
clean.
   - Pre-commit hooks: `prek run --files <changed>` ran. Everything that applies
     passed (typos, whitespace, trailing newline, binary artifacts, skills) 
except
     `license-headers`, which could not run because `jq`/`hawkeye` are not
     installed. The file already carries the ASF header and the diff does not
     touch it. cargo fmt and clippy ran separately (see above).
   - The last change before the push only filled in the issue number in the
     `#[ignore]` reason. The file was checked with `rustfmt --check` after that
     change, but the test was not rerun.
   
   ## AI Usage
   
   1. Claude (Claude Code).
   2. Investigation (reading the TCP client's refusal, routing-lock and 
roster-walk
      path, and comparing it with `PollRouter`), the test and the write-up.
   3. The test was run against the 3-node harness cluster and fails as shown
      above. The client log confirms the mechanism: about 4s of refusals, then
      `trying the next cluster node` or `redirecting to leader` on every send. 
The
      fixture asserts its precondition, that the partition primaries are on
      different nodes, before any send, so it cannot fail for an unrelated 
reason.
   4. Yes.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
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