ijuma commented on code in PR #12228:
URL: https://github.com/apache/kafka/pull/12228#discussion_r903236313
##########
clients/src/main/java/org/apache/kafka/common/network/Selector.java:
##########
@@ -809,6 +810,13 @@ private void maybeCloseOldestConnection(long
currentTimeNanos) {
* poll().
*/
public void clearCompletedReceives() {
+ this.completedReceives.values().forEach(networkReceive -> {
+ try {
+ networkReceive.close();
Review Comment:
Yes, that makes sense. I was unsure how we could have such a bad leak that
had gone undetected. It makes sense that the Selector cannot be responsible for
closing the network receive since it transfers the ownership to the caller of
`poll`. Perhaps we can add a comment explaining this?
--
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]