mirror of
https://github.com/apache/activemq-artemis.git
synced 2025-02-07 02:29:08 +00:00
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.