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

ASF subversion and git services commented on ARTEMIS-2088:
----------------------------------------------------------

Commit 90ca87c5e16df9812a65db37d05306f444dd7fb1 in activemq-artemis's branch 
refs/heads/master from Howard Gao
[ https://gitbox.apache.org/repos/asf?p=activemq-artemis.git;h=90ca87c ]

ARTEMIS-2088 - Page.write() should throw exception if file is closed

In Page.write(final PagedMessage message) if the page file is closed
it returns silently. The caller has no way to know that if the message
is paged to file or not. It should throw an exception so that the
caller can handle it correctly.

This causes random failure PagingTest#testExpireLargeMessageOnPaging().
The test shows that when the server stops it closes the page file.
In the mean time a message is expired to the expiry queue and if
the expiry queue is in paging mode, it goes to Page.write() and
returns without any error. The result is that the message is removed
from the original queue and not added to the expiry queue.

If we throw exception here it makes the expiration failed, the message
will not be removed from the orginal queue. Next time broker is started,
the message will be reloaded and expired again. no message lost.


> Page.write() should throw exception if file is closed
> -----------------------------------------------------
>
>                 Key: ARTEMIS-2088
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-2088
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 2.6.3
>            Reporter: Howard Gao
>            Assignee: Howard Gao
>            Priority: Major
>             Fix For: 2.6.5
>
>
> In Page.write(final PagedMessage message) if the page file is closed it 
> returns silently. The caller has no way to know that if the message is paged 
> to file or not.
> It should throw an exception so that the caller can handle it correctly.
> This causes random failure in test 
> org.hornetq.tests.integration.client.PagingTest#testExpireLargeMessageOnPaging().
> The test shows that when the server stops it closes the page file. In the 
> mean time a message is expired to the expiry queue.
>  and if the expiry queue is in paging mode, it goes to Page.write() and 
> returns without any error. The result is that the message is removed from the 
> original queue and not added to the expiry queue.
> If we throw exception here it make the expiration failed, the message will 
> not be removed from the orginal queue. Next time broker is started, the 
> message will be reloaded and expired again. no message lost.



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

Reply via email to