[
https://issues.apache.org/jira/browse/QPID-7199?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Keith Wall updated QPID-7199:
-----------------------------
Description:
Port startup currently may claim the port is listening before the port is
actually bound and accepting connection. On stop, the close of the server
socket races with the deregistering of the server socket from the selector.
Refactor start and stop so that the Port's activation step does not complete
until the server socket is registered on the selector with OP_ACCEPT, and at
shutdown, the closing of the server socket channel should not occur until after
the socket registering on the selector has been removed. We can achieve this
using our established {{ListenableFuture}} patterns.
The current implementation whilst untidy, does not seem to have negative
consequences for the end-user. It does make it harder to reason about the
Broker from the logs.
was:
Port startup currently may claim the port is listening before the port is
actually bound and accepting connection. On stop, the close of the server
socket races with the deregistering of the server socket from the selector.
Refactor start and stop so that the Port's activation step does not complete
until the server socket is registered on the selector with OP_ACCEPT, and at
shutdown, the closing of the server socket channel should not occur until after
the socket registering on the selector has been removed. We can achieve this
using our established {{ListenableFuture}} patterns.
The current implementation whilst untidy, does not seem to have negative
consequences for the end-user.
> Port startup/shutdown should await registration/deregistration of OP_ACCEPT
> on the server socket
> ------------------------------------------------------------------------------------------------
>
> Key: QPID-7199
> URL: https://issues.apache.org/jira/browse/QPID-7199
> Project: Qpid
> Issue Type: Improvement
> Components: Java Broker
> Reporter: Keith Wall
>
> Port startup currently may claim the port is listening before the port is
> actually bound and accepting connection. On stop, the close of the server
> socket races with the deregistering of the server socket from the selector.
> Refactor start and stop so that the Port's activation step does not complete
> until the server socket is registered on the selector with OP_ACCEPT, and at
> shutdown, the closing of the server socket channel should not occur until
> after the socket registering on the selector has been removed. We can
> achieve this using our established {{ListenableFuture}} patterns.
> The current implementation whilst untidy, does not seem to have negative
> consequences for the end-user. It does make it harder to reason about the
> Broker from the logs.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]