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

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

    [ https://issues.apache.org/jira/browse/AMQ-7107?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16695263#comment-16695263 ] 

ASF GitHub Bot commented on AMQ-7107:
-------------------------------------

GitHub user alanprot opened a pull request:

    https://github.com/apache/activemq/pull/318

    AMQ-7107 - Make QueueBrowsingTest and UsageBlockedDispatchTest succee…

    …d with ConcurrentStoreAndDispachQueues=false

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/alanprot/activemq AMQ-7107

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/activemq/pull/318.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #318
    
----
commit 2eda327abac8bd092e094b313314682cd9269e36
Author: Alan Protasio <al...@...>
Date:   2018-11-21T19:01:19Z

    AMQ-7107 - Make QueueBrowsingTest and UsageBlockedDispatchTest succeed with ConcurrentStoreAndDispachQueues=false

----


> 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
>            Priority: Minor
>
> 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)