Pankraz76 commented on PR #22680: URL: https://github.com/apache/kafka/pull/22680#issuecomment-6462947117
Thanks @xiaoqingwanga for the fix, and @jolshan / @kevin-wu24 for the reviews! Two small follow-ups, in case they're useful: 1. **Backport**: KAFKA-20734 is a Blocker and the regression comes from KAFKA-17573. Should this be cherry-picked to 4.3 / 4.4? 2. **Retry busy-loop**: with this fix, markers for offline partitions now land in `markersQueueForUnknownBroker` (as intended). However, `addTxnMarkersToBrokerQueue` always ends with `wakeup()`, so on every `generateRequests()` the parked marker is drained, re-parked, and the next `pollOnce` returns immediately. With one parked marker I measured ~30k `getPartitionLeaderEndpoint` calls/s for as long as the partition stays offline. Correctness is fine, since the marker goes out once a leader is registered, but it's a hot loop on the coordinator. A possible fix would be to only `wakeup()` when a marker reaches a real broker queue and retry the unknown-broker queue after `retry.backoff.ms` or on a metadata update. I'm happy to open a JIRA and a PR for this if that sounds reasonable. I also have an end-to-end test in `TransactionsTest` (offline partition on a non-coordinator broker → commit → bring it back → `read_committed` sees the record) from #23947. Happy to submit it separately if you think it adds value on top of the unit test here; otherwise no worries. -- 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]
