[jboss-jira] [JBoss JIRA] Created: (JGRP-1145) TP.Bundler: bundler doesn't respect max_bundling_timeout
Bela Ban (JIRA)
jira-events at lists.jboss.org
Fri Jan 29 04:16:20 EST 2010
TP.Bundler: bundler doesn't respect max_bundling_timeout
--------------------------------------------------------
Key: JGRP-1145
URL: https://jira.jboss.org/jira/browse/JGRP-1145
Project: JGroups
Issue Type: Bug
Reporter: Bela Ban
Assignee: Bela Ban
Fix For: 2.10
The bundler is supposed to send a bundle (batch) of messages when (1) the size of the queued messages exceeds max_bundle_size or (2) when max_bundle_timeout milliseconds have elapsed. We're starting a timer whenever we add a message. Now consider this case (max_bundling_timeout=300ms):
T 0: add M1 --> timer1 is scheduled to be run at T+300
T 50: add M2 --> timer2 is scheduled to be run at T + 350
T 350: add M3 --> timer1 is scheduled to be run at T + 650
When timer1 goes off, it will actually send all queued messages at T+300, including M1 and M2.
However, M3 will be sent by timer2 at T+350, which is not correct, as it was received after T300, so it should be sent at T600 ! (We're assuming of course that max_bundle_size has not been exceeded)
To experiment with different bundler strategies, we should make Bundler an interface and provide different implementations !
One implementation could use a ConcurrentLinkedQueue, which has no lock contention on addition and removal. A bundler thread removes messages and sends them as batches. The marshalling and sending could potentially be delegated to a thread pool.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list