[ 
https://issues.apache.org/jira/browse/KAFKA-9190?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16978814#comment-16978814
 ] 

ASF GitHub Bot commented on KAFKA-9190:
---------------------------------------

rondagostino commented on pull request #7723: KAFKA-9190: Close connections 
with expired authentication sessions
URL: https://github.com/apache/kafka/pull/7723
 
 
   @hachikuji Here's the PR with two commits: one for the autoboxing/unboxing 
cleanup and the other for the close of the connection when an authentication 
session expires.  You had originally suggested invoking 
`selector.close(channel.id)` but I committed `close(channel.id)` instead 
because that invokes `selector.close()` but also performs additional cleanup 
associated with the termination of a connection.
 
----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Server leaves connections with expired authentication sessions open 
> --------------------------------------------------------------------
>
>                 Key: KAFKA-9190
>                 URL: https://issues.apache.org/jira/browse/KAFKA-9190
>             Project: Kafka
>          Issue Type: Bug
>            Reporter: Jason Gustafson
>            Assignee: Ron Dagostino
>            Priority: Major
>
> SocketServer implements some logic to disconnect connections which have 
> expired authentication sessions. At the moment, we just call 
> `SelectionKey.cancel` in order to trigger this disconnect. I think the 
> expectation is that this causes the channel to be closed on the next `poll`, 
> but as far as I can tell, all it does is disassociate the selection key from 
> the selector. This means that the key never gets selected again and we never 
> close the connection until the client times out.
> This was found when debugging the flaky test failure 
> `EndToEndAuthorizationTest.testNoDescribeProduceOrConsumeWithoutTopicDescribeAcl`.
>  I modified the code to call `Selector.close` instead of 
> `TransportLayer.disconnect`. I was able to reproduce the session 
> authentication expiration, but the connection properly closes and the test 
> does no longer times out.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to