You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Karel Vervaeke (JIRA)" <ji...@apache.org> on 2012/09/11 11:59:09 UTC

[jira] [Commented] (AVRO-1154) NettyTransceiver: cancel channelFuture on close

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

Karel Vervaeke commented on AVRO-1154:
--------------------------------------

The description is a bit too concise.
NettyTransceiver.writeDataPack() calls getChannel(), which in turn calls channelFuture.awaitUninterruptibly(connectTimeoutMillis).

NettyTransceiver.close() calls disconnect(), which hangs while the first call is waiting until the specified timeout is reached.
The attached patch immediately cancels the channelFuture, so the first clients are no longer blocked.

It's difficult to write a test case for this, since you need a server thread and two client threads, performing operations in the correct order.
                
> NettyTransceiver: cancel channelFuture on close
> -----------------------------------------------
>
>                 Key: AVRO-1154
>                 URL: https://issues.apache.org/jira/browse/AVRO-1154
>             Project: Avro
>          Issue Type: Bug
>            Reporter: Karel Vervaeke
>         Attachments: AVRO-1154.patch
>
>
> See AVRO-747.
> When the server is stopped, threads calling writeDataPacket() will hang for 'connectTimeoutMillis'.
> If another thread calls disconnect() (with the first thread still waiting), it would be nice if that writeDataPacket() call immediately throw an IOException.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira