]
Clebert Suconic closed JBMESSAGING-565.
---------------------------------------
Resolution: Done
Race Condition between Topic/Queue.getMessageCount and Deliver
Thread
---------------------------------------------------------------------
Key: JBMESSAGING-565
URL:
http://jira.jboss.com/jira/browse/JBMESSAGING-565
Project: JBoss Messaging
Issue Type: Bug
Affects Versions: 1.2.0.Alpha1
Reporter: Clebert Suconic
Assigned To: Clebert Suconic
Fix For: 1.2.0.Alpha1
Time Spent: 1 day, 1 hour
Remaining Estimate: 0 minutes
This is not necessarily a bug. It' s more a task, but I will assume it as a bug at
this point.
QueueManagementTest::testMessageCountOverFullSize has a race condition between
getMessageCount and Deliver Thread.
PagingChannelSupport::messageCount is an arithmethic expressions of messageRefs.size() +
deliveries.size() + nextPagingOrder - firstPagingOrder
deliveries.size is being controlled by Delivery Thread, determined by DeliveryRunnable
that runs as-synchronously on Destination.
While getMessageCount might diverge momentarily it will eventually be fixed as soon as
DeliveryRunnable has the appropriate time to send the result to the collection
deliveries.
To fix this we would need to synchronize delivery and messageCount somehow, probably
adding global lock, what we don' t want to add I assume. So, if this is correct the
test has to be fixed somehow.
I have changed the test in such way it will make easier to identify the racing condition.
Use tracing in your tests and you will see a retry routine that will eventually pass.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: