cshannon commented on PR #1659:
URL: https://github.com/apache/activemq/pull/1659#issuecomment-3917575694

   > The root cause is a state-transition gap. Currently, 
clearUnmarshalledState() assumes the content bytes are already there and simply 
wipes the 'live' data (String, Map, etc.). If a background task (like a memory 
sweep) hits this method before marshaling is finished, the message becomes 
empty—leading to the data loss I caught.
   
   Where you seeing a background task actually call that method? I've only 
found it called in 
[Topic](https://github.com/apache/activemq/blob/e2b8de9e1d5df2fa47d10d94c18d50b05409f74d/activemq-broker/src/main/java/org/apache/activemq/broker/region/Topic.java#L815-L819)
 and 
[Queue](https://github.com/apache/activemq/blob/e2b8de9e1d5df2fa47d10d94c18d50b05409f74d/activemq-broker/src/main/java/org/apache/activemq/broker/region/Queue.java#L911-L916)
 during message send if reduceMemoryFootprint is true and in each case it 
verifies the data is already marshaled before clearing.
   


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact


Reply via email to