[jboss-jira] [JBoss JIRA] (JGRP-1986) TransferQueueBundler: sending messages one-by-one when threshold has been exceeded
Bela Ban (JIRA)
issues at jboss.org
Tue Nov 24 08:45:01 EST 2015
[ https://issues.jboss.org/browse/JGRP-1986?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bela Ban updated JGRP-1986:
---------------------------
Fix Version/s: 3.6.7
> TransferQueueBundler: sending messages one-by-one when threshold has been exceeded
> ----------------------------------------------------------------------------------
>
> Key: JGRP-1986
> URL: https://issues.jboss.org/browse/JGRP-1986
> Project: JGroups
> Issue Type: Bug
> Reporter: Bela Ban
> Assignee: Bela Ban
> Fix For: 3.6.7
>
>
> In {{TP.TransferQueueBundler}}, when the queue's threshold (90% of the queue's capacity) is exceeded, messages are dequeued and sent one-by-one. See {{queue.take()}} and {{queue.poll()}} below.
> This is inefficient and slows down sending of messages until the queue size falls below the threshold again.
> Solution: remove {{threshold}} and the associated checks.
> {noformat}
> public void run() {
> while(Thread.currentThread() == bundler_thread) {
> Message msg=null;
> try {
> if(count == 0) {
> msg=queue.take();
> if(msg == null)
> continue;
> long size=msg.size();
> if(count + size >= max_bundle_size || queue.size() >= threshold)
> sendBundledMessages();
> addMessage(msg, size);
> }
> while(null != (msg=queue.poll())) {
> long size=msg.size();
> if(count + size >= max_bundle_size || queue.size() >= threshold)
> sendBundledMessages();
> addMessage(msg, size);
> }
> if(count > 0)
> sendBundledMessages();
> }
> catch(Throwable t) {
> }
> }
> }
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
More information about the jboss-jira
mailing list