chia7712 commented on PR #16833: URL: https://github.com/apache/kafka/pull/16833#issuecomment-2299794890
> completeExceptionally the request if it's expired -> this is already done by the event reaping logic that applies to all events, and does completeExceptionally if expired, right after polling the managers ([ConsumerNetworkTread#reapExpiredApplicationEvents](https://github.com/apache/kafka/blob/cd47b3c1cce7a9f1881e40d38742b9ec8b30cf32/clients/src/main/java/org/apache/kafka/clients/consumer/internals/ConsumerNetworkThread.java#L156)). remove the request from the internal buffer unsentOffsetFetches -> this is already done in the commitMgr after it gets the requests to send and calls [clearAll](https://github.com/apache/kafka/blob/cd47b3c1cce7a9f1881e40d38742b9ec8b30cf32/clients/src/main/java/org/apache/kafka/clients/consumer/internals/CommitRequestManager.java#L1208) ensures that the event was sent at least once (because of where it was called) -> this would still be the case even if we remove it, mainly because the requests would only be removed on clearAll after having being added to the inflightOffsetFetches According to those conditions, I feel `failAndRemoveExpiredCommitRequests` can be removed too, right? -- 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org