krishvishal opened a new pull request, #4706: URL: https://github.com/apache/iggy/pull/4706
## Which issue does this PR address? Relates to #4515 ## Rationale Fetch reads from Iggy through 4 read slots. A read slot is an Iggy client that serves one Fetch at a time. A Fetch polls its partitions one at a time in its slot, and each poll can wait until the 20 s request deadline. When its node stops, or when the primary balancer of #4619 moves its primary, a partition does not answer for seconds. Four Fetches that touch such a partition hold every slot, and the consumers of healthy partitions stall too. ## What changed? Each Iggy poll now gets 2 s, and the first polls of a request run at the same time, up to 8 at once. So a partition that does not answer no longer holds up the partitions after it. A partition whose poll gets no answer in 2 s answers `NOT_LEADER_OR_FOLLOWER` (6), and the client refreshes metadata and retries. For the next 2 s, the gateway answers 6 for that partition to every consumer, with no poll. So those consumers do not take the slots that others need. A poll that times out now keeps the slot's client, so the other polls on it go on. Polls in one slot share its connection, and the SDK drops a reply that nobody waits for. Before, a timeout dropped the client, and the next poll connected a new one. When a request takes a slot, the slot now connects its client first. So a slow sign-in does not use up the 2 s of a poll. `IGGY_KAFKA_FETCH_SLOTS` sets the slot count, 4 by default. `ProduceSessionLimits::from_env` takes the produce session variables out of `IggyBridgeConfig::from_env`, which the new variable pushed past the clippy line limit. The README no longer says that Iggy polls by count, because polls on master carry a byte cap. Not in this PR: Fetch still waits for new records with 100 ms probes, not with the deferred poll of #4629. No metric shows slot use, because the gateway has no metrics endpoint yet. -- 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]
