[ 
https://issues.apache.org/jira/browse/ARTEMIS-2661?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Francesco Nigro updated ARTEMIS-2661:
-------------------------------------
    Description: 
The journal loading is seeing AMQP messages to be decoded while they shouldn't 
not; it seems causes by AMQPStandardMessage:: reloadPersistence:

{code:java}
   @Override
   public void reloadPersistence(ActiveMQBuffer record, CoreMessageObjectPools 
pools) {
      int size = record.readInt();
      byte[] recordArray = new byte[size];
      record.readBytes(recordArray);
      data = ReadableBuffer.ByteBufferReader.wrap(ByteBuffer.wrap(recordArray));

      // Message state is now that the underlying buffer is loaded, but the 
contents not yet scanned
      resetMessageData();
      modified = false;
      messageDataScanned = RELOAD_PERSISTENCE;
      // 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()) {
         setDurable(true);
         reencode();
      }
   }
{code}

Specifically by:

{code:java}
      if (!isDurable()) {
         setDurable(true);
         reencode();
      } 
{code}

This code path shouldn't really be taken so need some investigation to 
understand what's going on.




  was:
The journal loading is seeing AMQP messages to be decoded while they shouldn't 
not; it seems causes by AMQPStandardMessage:: reloadPersistence:

{code:java}
   @Override
   public void reloadPersistence(ActiveMQBuffer record, CoreMessageObjectPools 
pools) {
      int size = record.readInt();
      byte[] recordArray = new byte[size];
      record.readBytes(recordArray);
      data = ReadableBuffer.ByteBufferReader.wrap(ByteBuffer.wrap(recordArray));

      // Message state is now that the underlying buffer is loaded, but the 
contents not yet scanned
      resetMessageData();
      modified = false;
      messageDataScanned = RELOAD_PERSISTENCE;
      // 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()) {
         setDurable(true);
         reencode();
      }
   }
{code}

Specifically by:

{code:java}
     if (!isDurable()) {
         setDurable(true);
         reencode();
      } 
{code}

This code path shouldn't really be taken so need some investigation to 
understand what's going on.





> AMQP Journal loading is triggering reencode
> -------------------------------------------
>
>                 Key: ARTEMIS-2661
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-2661
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 2.12.0
>            Reporter: Francesco Nigro
>            Priority: Major
>
> The journal loading is seeing AMQP messages to be decoded while they 
> shouldn't not; it seems causes by AMQPStandardMessage:: reloadPersistence:
> {code:java}
>    @Override
>    public void reloadPersistence(ActiveMQBuffer record, 
> CoreMessageObjectPools pools) {
>       int size = record.readInt();
>       byte[] recordArray = new byte[size];
>       record.readBytes(recordArray);
>       data = 
> ReadableBuffer.ByteBufferReader.wrap(ByteBuffer.wrap(recordArray));
>       // Message state is now that the underlying buffer is loaded, but the 
> contents not yet scanned
>       resetMessageData();
>       modified = false;
>       messageDataScanned = RELOAD_PERSISTENCE;
>       // 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()) {
>          setDurable(true);
>          reencode();
>       }
>    }
> {code}
> Specifically by:
> {code:java}
>       if (!isDurable()) {
>          setDurable(true);
>          reencode();
>       } 
> {code}
> This code path shouldn't really be taken so need some investigation to 
> understand what's going on.



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

Reply via email to