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

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

                Author: ASF GitHub Bot
            Created on: 20/Mar/20 18:01
            Start Date: 20/Mar/20 18:01
    Worklog Time Spent: 10m 
      Work Description: franz1981 commented on pull request #3036: ARTEMIS-2669 
Improve AMQPStandardMessage::reencode on depaging not durable messages
URL: https://github.com/apache/activemq-artemis/pull/3036#discussion_r395805550
 
 

 ##########
 File path: 
artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/AMQPMessage.java
 ##########
 @@ -837,16 +837,26 @@ protected synchronized void 
lazyScanAfterReloadPersistence() {
       messageDataScanned = MessageDataScanningStatus.SCANNED.code;
       modified = false;
 
+      makeDurable();
+   }
+
+   private void makeDurable() {
+      assert messageDataScanned == MessageDataScanningStatus.SCANNED.code;
       // Message state should reflect that is came from persistent storage 
which
       // can happen when moved to a durable location.  We must re-encode here 
to
       // avoid a subsequent redelivery from suddenly appearing with a durable 
header
       // tag when the initial delivery did not.
       if (!isDurable()) {
 
 Review comment:
   Thanks guys for the help on this, highly appreciated!!! I am super happy to 
follow the path that both have found and I can close this!! 
   A code removed is a code we doesn't have to maintain anymore, yeeeeee
 
----------------------------------------------------------------
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:
us...@infra.apache.org


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

    Worklog Id:     (was: 407152)
    Time Spent: 2h  (was: 1h 50m)

> Improve AMQPStandardMessage::reencode on depaging not durable messages
> ----------------------------------------------------------------------
>
>                 Key: ARTEMIS-2669
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-2669
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>          Components: AMQP, Broker
>    Affects Versions: 2.11.0
>            Reporter: Francesco Nigro
>            Priority: Major
>          Time Spent: 2h
>  Remaining Estimate: 0h
>
> Currently depaging AMQP not durable messages turn them into durable ones 
> (with the Header section created) and reencoded again: the reencode could be 
> optimized by preserving  and limiting the amount of buffer copies and Java 
> object allocations in specific cases.



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

Reply via email to