[ 
https://issues.apache.org/jira/browse/ARTEMIS-2676?focusedWorklogId=413565&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-413565
 ]

ASF GitHub Bot logged work on ARTEMIS-2676:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 31/Mar/20 22:26
            Start Date: 31/Mar/20 22:26
    Worklog Time Spent: 10m 
      Work Description: clebertsuconic commented on issue #3044: ARTEMIS-2676 
PageCursorProviderImpl::cleanup can save decoding pages without large messages
URL: https://github.com/apache/activemq-artemis/pull/3044#issuecomment-606911209
 
 
   I could fix the rebasing, however your implementation is not valid.
   
   Up until CoreMessages, we used a special record type on paging, only used 
for Large Messages.
   
   With AMQP, I didn't use that record at all. instead I used the Persister 
from the AMQP Protocol. So, you would have to check the Persister Type, at the 
proper record position.
   
   Besides, the following implementation is not self documented... if things 
change this will likely introduce bugs (lack of encapsulation of this rule):
   
   ```
      public static boolean isLargeMessage(ActiveMQBuffer buffer) {
         // skip transactionID
         final boolean isLargeMessage = buffer.getByte(buffer.readerIndex() + 
Long.BYTES) != 0;
         return isLargeMessage;
      }
   ```
   
   
   You would need to encapsulate this through PagePosition for Core Records, or 
check the Persister, and do the proper encapsulation if you really want to 
implement such feature.
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 413565)
    Time Spent: 3h  (was: 2h 50m)

> PageCursorProviderImpl::cleanup can save decoding pages without large messages
> ------------------------------------------------------------------------------
>
>                 Key: ARTEMIS-2676
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-2676
>             Project: ActiveMQ Artemis
>          Issue Type: Improvement
>          Components: Broker
>    Affects Versions: 2.11.0
>            Reporter: Francesco Nigro
>            Priority: Major
>          Time Spent: 3h
>  Remaining Estimate: 0h
>
> PageCurosrProviderImpl::cleanup is calling 
> PageCurosrProviderImpl::finishCleanup that's fully reading pages (when not 
> present in the PageCache), just to trigger large messages delete.
> The decoding phase could be skipped and possibly the page read as well.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to