clebertsuconic commented on a change in pull request #3048: ARTEMIS-1975 Fixing
LargeMessage encoding for replication
URL: https://github.com/apache/activemq-artemis/pull/3048#discussion_r397978492
##########
File path:
artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/AMQPLargeMessage.java
##########
@@ -126,6 +127,20 @@ public void closeLargeMessage() throws Exception {
parsingData = null;
}
+ public synchronized void releaseEncodedBuffer() {
+ if (temporaryBuffer != null && temporaryBuffer.release()) {
+ temporaryBuffer = null;
+ }
+ }
+
+ public synchronized ByteBuf getSavedEncodeBuffer() {
+ if (temporaryBuffer == null) {
+ temporaryBuffer =
PooledByteBufAllocator.DEFAULT.buffer(getEstimateSavedEncode());
+ saveEncoding(temporaryBuffer);
+ }
+ return temporaryBuffer.retain();
Review comment:
I renamed the method. This is not much my style of coding. I have seen other
code you've written and you would create a new method. but I will submit and
created the new method now.
pushed it ! :)
----------------------------------------------------------------
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]
With regards,
Apache Git Services