You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@zookeeper.apache.org by "nagi kami (Jira)" <ji...@apache.org> on 2022/08/02 08:32:00 UTC
[jira] [Created] (ZOOKEEPER-4605) When deciding whether to send more notifications, no check is made that all queues are empty
nagi kami created ZOOKEEPER-4605:
------------------------------------
Summary: When deciding whether to send more notifications, no check is made that all queues are empty
Key: ZOOKEEPER-4605
URL: https://issues.apache.org/jira/browse/ZOOKEEPER-4605
Project: ZooKeeper
Issue Type: Bug
Components: server
Reporter: nagi kami
The current implementation only checks that one queue is empty and not all queues are empty.
{code:java}
boolean haveDelivered() {
for (BlockingQueue<ByteBuffer> queue : queueSendMap.values()) {
final int queueSize = queue.size();
LOG.debug("Queue size: {}", queueSize);
if (queueSize == 0) {
return true;
}
}
return false;
} {code}
Perhaps it could be:
{code:java}
boolean haveDelivered() {
for (BlockingQueue<ByteBuffer> queue : queueSendMap.values()) {
final int queueSize = queue.size();
LOG.debug("Queue size: {}", queueSize);
if (queueSize != 0) {
return false;
}
}
return true;
} {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)