You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Thomas Koch (JIRA)" <ji...@apache.org> on 2010/12/30 18:17:45 UTC
[jira] Updated: (ZOOKEEPER-970) Review and refactor Java client
close logic
[ https://issues.apache.org/jira/browse/ZOOKEEPER-970?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Thomas Koch updated ZOOKEEPER-970:
----------------------------------
Description:
There have been several jira tickets to fix the close logic but there are still possibilities for blocks as discovered in ZOOKEEPER-911.
For example the failing server.InvalidSnapshotTest times out because the ClientCnxn.close() call blocks in Packet.waitForFinish().
However the only change introduced is that instead of
synchronize(packet) while(!packet.finished) packet.wait()
I call packet.waitForFinish() which is a synchronized method.
The bug is in ClientCnxn.queuePacket:
ClientCnxn.closing is set to true before the closeSession Packet is added to outgoingQueue. Between these two steps, the SendThread already terminate so that there's nobody left to call packet.notifyAll().
> Review and refactor Java client close logic
> -------------------------------------------
>
> Key: ZOOKEEPER-970
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-970
> Project: ZooKeeper
> Issue Type: Sub-task
> Reporter: Thomas Koch
> Assignee: Thomas Koch
>
> There have been several jira tickets to fix the close logic but there are still possibilities for blocks as discovered in ZOOKEEPER-911.
> For example the failing server.InvalidSnapshotTest times out because the ClientCnxn.close() call blocks in Packet.waitForFinish().
> However the only change introduced is that instead of
> synchronize(packet) while(!packet.finished) packet.wait()
> I call packet.waitForFinish() which is a synchronized method.
> The bug is in ClientCnxn.queuePacket:
> ClientCnxn.closing is set to true before the closeSession Packet is added to outgoingQueue. Between these two steps, the SendThread already terminate so that there's nobody left to call packet.notifyAll().
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.