lianetm commented on code in PR #16304:
URL: https://github.com/apache/kafka/pull/16304#discussion_r1636775753
##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/ConsumerNetworkThread.java:
##########
@@ -207,8 +207,7 @@ private void reapExpiredApplicationEvents(long
currentTimeMs) {
*/
// Visible for testing
static void runAtClose(final Collection<Optional<? extends
RequestManager>> requestManagers,
- final NetworkClientDelegate networkClientDelegate,
- final Timer timer) {
Review Comment:
Agreed, that was probably the thinking behind the timer here, but it ended
up unused and that actually seemed sensible to me here (because it's used
somewhere else). This is how I see it: `pollOnClose` is only building requests
without blocking on any activity that would need a time boundary (just like
poll() doesn't take a timer to limit its execution). It's then the
`sendUnsentRequests` the one that takes the requests created by pollOnClose and
performs the operation that needs the timer (and it has it already). Taking the
pollOnClose on the FetchRequestManager as example (actually the only manager
where it's used), it only generates a fetch request to close the fetch sessions
(no timer needed). Makes sense?
--
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]