[
https://issues.apache.org/jira/browse/ZOOKEEPER-2069?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14247397#comment-14247397
]
Flavio Junqueira commented on ZOOKEEPER-2069:
---------------------------------------------
One idea to avoid the synchronized block in cleanup (and possibly remove the
one from queuePacket too) is to use a while loop in cleanup like this:
{noformat}
while(outgoingQueue.size() > 0) {
outgoingQueue.drainTo(list);
for each element p of list {
conLossPacket(p);
}
}
{noformat}
Let me know if you think this works, hopefully this pseudocode is clear.
> Netty Support for ClientCnxnSocket
> ----------------------------------
>
> Key: ZOOKEEPER-2069
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2069
> Project: ZooKeeper
> Issue Type: Sub-task
> Reporter: Hongchao Deng
> Assignee: Hongchao Deng
> Attachments: QA-run-nettyclient-for-test.patch,
> ZOOKEEPER-2069-v10-channel.patch, ZOOKEEPER-2069-v11.patch,
> ZOOKEEPER-2069-v12.patch, ZOOKEEPER-2069-v14.patch,
> ZOOKEEPER-2069-v15-jdk6.patch, ZOOKEEPER-2069-v15-jdk6.patch,
> ZOOKEEPER-2069-v16.patch, ZOOKEEPER-2069-v2.patch, ZOOKEEPER-2069-v3.patch,
> ZOOKEEPER-2069-v4.patch, ZOOKEEPER-2069-v5.patch, ZOOKEEPER-2069-v6.patch,
> ZOOKEEPER-2069-v7.patch, ZOOKEEPER-2069-v8.patch, ZOOKEEPER-2069-v9.1.patch,
> ZOOKEEPER-2069-v9.2.patch, ZOOKEEPER-2069-v9.patch, ZOOKEEPER-2069.patch,
> draft.patch
>
>
> Review Board: https://reviews.apache.org/r/27244/diff/#
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)