zookeeper-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Enrico Olivelli (Jira)" <j...@apache.org>
Subject [jira] [Updated] (ZOOKEEPER-2091) Possible logic error in ClientCnxnSocketNIO
Date Fri, 06 Sep 2019 15:45:05 GMT

     [ https://issues.apache.org/jira/browse/ZOOKEEPER-2091?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Enrico Olivelli updated ZOOKEEPER-2091:
---------------------------------------
    Fix Version/s:     (was: 3.5.6)

> Possible logic error in ClientCnxnSocketNIO
> -------------------------------------------
>
>                 Key: ZOOKEEPER-2091
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2091
>             Project: ZooKeeper
>          Issue Type: Bug
>          Components: java client
>    Affects Versions: 3.4.6
>            Reporter: Cheng
>            Assignee: Rakesh R
>            Priority: Major
>             Fix For: 3.6.0, 3.5.7
>
>         Attachments: ZOOKEEPER-2091.patch
>
>
> When SASL authentication is enabled, the ZooKeeper client will finally call ClientCnxnSocketNIO#sendPacket(Packet
p) to send a packet to server:
> @Override
> void sendPacket(Packet p) throws IOException {
>     SocketChannel sock = (SocketChannel) sockKey.channel();
>     if (sock == null) {
>         throw new IOException("Socket is null!");
>     }
>     p.createBB();
>     ByteBuffer pbb = p.bb;
>     sock.write(pbb);
> }
> One problem I can see is that the sock is non-blocking, so when the sock's output buffer
is full(theoretically), only part of the Packet is sent out and the communication will break.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

Mime
View raw message