You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Alan Protasio (JIRA)" <ji...@apache.org> on 2018/11/21 21:17:00 UTC

[jira] [Created] (AMQ-7107) QueueBrowsingTest and UsageBlockedDispatchTest are failing with ConcurrentStoreAndDispachQueues=false

Alan Protasio created AMQ-7107:
----------------------------------

             Summary: QueueBrowsingTest and UsageBlockedDispatchTest are failing with ConcurrentStoreAndDispachQueues=false
                 Key: AMQ-7107
                 URL: https://issues.apache.org/jira/browse/AMQ-7107
             Project: ActiveMQ
          Issue Type: Test
            Reporter: Alan Protasio


Hi,

I was working towards https://issues.apache.org/jira/browse/AMQ-7028 and after my change QueueBrowsingTest and UsageBlockedDispatchTest were failing.

QueueBrowsingTest was changed by https://issues.apache.org/jira/browse/AMQ-4495 and it is testing if a full page was pagedIn by the cursor.
The problem is because this test was only succeeding due how ConcurrentStoreAndDispachQueues=true is implemented. When this flag is set to True, we increase the memory usage when start the async task and when decrease it when the task is done:


https://github.com/alanprot/activemq/blob/master/activemq-broker/src/main/java/org/apache/activemq/broker/region/Queue.java#L897

So, imagine this timeline:

1 . Send message 1

2. The cursor get full and the cache is disabled

3. Message1 finish and the memory is freed

4. messages 2 to 100 are sent and the cache is skipped

5. We call browser queue and the cursor can pageIn messages because the cursorMemory is not full

Now with ConcurrentStoreAndDispachQueues=false

1 . Send message 1

2 . Send message 2

3. The cursor get full and the cache is disabled

4. messages 3 to 100 are sent and the cache is skipped (memory still full)

5. We call browser queue and the cursor cannot pageIn messages because the cursorMemory is full

So, in order to make this test work with ConcurrentStoreAndDispachQueues=false i did a simple change on it... After sending all the messages, consume one of them and make sure that the cursor has memory to pageIn messages.

Similar thing is happening with UsageBlockedDispatchTest.

I create 2 more test to do the same test with ConcurrentStoreAndDispachQueues=false and changed it a little bit to make them works with this flag false.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)