Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Not A Problem
-
3.5.9
-
None
-
None
-
3.5.9.
The connection status response gives a very large outstanding_requests.
- curl -s http://127.0.0.1:18080/commands/stats | jq .secure_connections
[
Unknown macro: { "remote_socket_address"},
Unknown macro: { "remote_socket_address"},
Unknown macro: { "remote_socket_address"}]
-
It just a count.
Description
In the receiveMessage method the count is increased right after processPacket without judges anything as below.
if (initialized) {
// TODO: if zks.processPacket() is changed to take a ByteBuffer[],
// we could implement zero-copy queueing.
zks.processPacket(this, bb);if (zks.shouldThrottle(outstandingCount.incrementAndGet()))
Unknown macro: { disableRecvNoWait(); }}
But after the request is handled, the decrease operation is taken only when xid is larger than 0.
@Override
public void sendResponse(ReplyHeader h, Record r, String tag)
throws IOException
Unknown macro: { if (closingChannel || !channel.isOpen()) Unknown macro}
super.sendResponse(h, r, tag);
if (h.getXid() > 0)
Unknown macro: { // zks cannot be null otherwise we would not have gotten here! if (!zkServer.shouldThrottle(outstandingCount.decrementAndGet())) Unknown macro}
}
}
So the bultin xids like "PING", "AUTH", will make outstandingCount larger and larger, until it hits the limit; All the request on that connection will be refused.
I see the problem is solved in 3.6.0 version, should there be a patch for 3.5.9? Looking forward for your reply, Thantks!