You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@activemq.apache.org by "clebertsuconic (via GitHub)" <gi...@apache.org> on 2025/08/12 13:48:54 UTC
[PR] ARTEMIS-5530 Some handling of compressed messages can throw NegativeArraySizeException [activemq-artemis]
clebertsuconic opened a new pull request, #5867:
URL: https://github.com/apache/activemq-artemis/pull/5867
(no comment)
--
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: gitbox-unsubscribe@activemq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org
For additional commands, e-mail: gitbox-help@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact
Re: [PR] ARTEMIS-5530 Some handling of compressed messages can throw NegativeArraySizeException [activemq-artemis]
Posted by "clebertsuconic (via GitHub)" <gi...@apache.org>.
clebertsuconic commented on PR #5867:
URL: https://github.com/apache/activemq-artemis/pull/5867#issuecomment-3185915686
@AntonRoskvist I have incorporated your suggestions.. (basically reverting some of the changes from the previous PR you mentioned).
I'm running tests.. so far so good.
--
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: gitbox-unsubscribe@activemq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org
For additional commands, e-mail: gitbox-help@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact
Re: [PR] ARTEMIS-5530 Some handling of compressed messages can throw NegativeArraySizeException [activemq-artemis]
Posted by "AntonRoskvist (via GitHub)" <gi...@apache.org>.
AntonRoskvist commented on code in PR #5867:
URL: https://github.com/apache/activemq-artemis/pull/5867#discussion_r2272706677
##########
artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientProducerImpl.java:
##########
@@ -411,6 +411,8 @@ private void largeMessageSendStreamed(final boolean sendBlocking,
DeflaterReader deflaterReader = null;
if (session.isCompressLargeMessages()) {
+ // We need to change properties the compressed message as we send it
+ msgI = msgI.copy();
Review Comment:
Yes, that resolved it. Very nice!
--
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: gitbox-unsubscribe@activemq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org
For additional commands, e-mail: gitbox-help@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact
Re: [PR] ARTEMIS-5530 Some handling of compressed messages can throw NegativeArraySizeException [activemq-artemis]
Posted by "clebertsuconic (via GitHub)" <gi...@apache.org>.
clebertsuconic commented on PR #5867:
URL: https://github.com/apache/activemq-artemis/pull/5867#issuecomment-3184053056
@AntonRoskvist do you have all your changes on your branch? can I have them?
--
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: gitbox-unsubscribe@activemq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org
For additional commands, e-mail: gitbox-help@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact
Re: [PR] ARTEMIS-5530 Some handling of compressed messages can throw NegativeArraySizeException [activemq-artemis]
Posted by "clebertsuconic (via GitHub)" <gi...@apache.org>.
clebertsuconic commented on code in PR #5867:
URL: https://github.com/apache/activemq-artemis/pull/5867#discussion_r2269924061
##########
artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientProducerImpl.java:
##########
@@ -411,6 +411,8 @@ private void largeMessageSendStreamed(final boolean sendBlocking,
DeflaterReader deflaterReader = null;
if (session.isCompressLargeMessages()) {
+ // We need to change properties the compressed message as we send it
+ msgI = msgI.copy();
Review Comment:
@AntonRoskvist this is basically the fix for your negative positioning on the buffer. The body of the message is changed during send... and subsequent sends are getting lost.
With this copy, any changes on the compressed handling are not affecting the original message.
--
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: gitbox-unsubscribe@activemq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org
For additional commands, e-mail: gitbox-help@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact
Re: [PR] ARTEMIS-5530 Some handling of compressed messages can throw NegativeArraySizeException [activemq-artemis]
Posted by "AntonRoskvist (via GitHub)" <gi...@apache.org>.
AntonRoskvist commented on PR #5867:
URL: https://github.com/apache/activemq-artemis/pull/5867#issuecomment-3179443751
Was just writing up an answer, but I'll hold that until I have time to test the changes. (Will log off soon so might not be until tomorrow), thanks for looking into this @clebertsuconic
--
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: gitbox-unsubscribe@activemq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org
For additional commands, e-mail: gitbox-help@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact
Re: [PR] ARTEMIS-5530 Some handling of compressed messages can throw NegativeArraySizeException [activemq-artemis]
Posted by "AntonRoskvist (via GitHub)" <gi...@apache.org>.
AntonRoskvist commented on PR #5867:
URL: https://github.com/apache/activemq-artemis/pull/5867#issuecomment-3183031316
I think this pretty much did it, except for one remaining issue:
Yesterday I made a change to the test `testUpstreamFederatedAddressWithCompressedMessage` [link here](https://github.com/AntonRoskvist/activemq-artemis/commit/fbae046a48707229a4927288105c6a618446eabb). Where I added federation of two more messages. One regular message and one regular that's been compressed. The latter fails to federate.
I'm able to get it working by removing two lines in `ClientConsumerImpl.handleCompressedMessageSentAsRegular(..)`
```
largeMessage.putBooleanProperty(Message.HDR_LARGE_COMPRESSED, false);
//make sure the message is decompressed before it is handled
largeMessage.checkCompletion();
```
I am not seeing any side effects of this at the moment, though I see the call to `checkCompletion()` was added as part of the recent #5867
I'm currently doing some more testing
--
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: gitbox-unsubscribe@activemq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org
For additional commands, e-mail: gitbox-help@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact
Re: [PR] ARTEMIS-5530 Some handling of compressed messages can throw NegativeArraySizeException [activemq-artemis]
Posted by "clebertsuconic (via GitHub)" <gi...@apache.org>.
clebertsuconic commented on code in PR #5867:
URL: https://github.com/apache/activemq-artemis/pull/5867#discussion_r2269924061
##########
artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientProducerImpl.java:
##########
@@ -411,6 +411,8 @@ private void largeMessageSendStreamed(final boolean sendBlocking,
DeflaterReader deflaterReader = null;
if (session.isCompressLargeMessages()) {
+ // We need to change properties the compressed message as we send it
+ msgI = msgI.copy();
Review Comment:
@AntonRoskvist this is basically the fix for your negative positioning on the buffer. The body of the message is changed during send... and subsequent sends are getting lost.
With this property the changes are now made on a copy.
--
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: gitbox-unsubscribe@activemq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org
For additional commands, e-mail: gitbox-help@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact
Re: [PR] ARTEMIS-5530 Some handling of compressed messages can throw NegativeArraySizeException [activemq-artemis]
Posted by "clebertsuconic (via GitHub)" <gi...@apache.org>.
clebertsuconic commented on PR #5867:
URL: https://github.com/apache/activemq-artemis/pull/5867#issuecomment-3179474171
@AntonRoskvist sure.. I will keep this PR open.
--
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: gitbox-unsubscribe@activemq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org
For additional commands, e-mail: gitbox-help@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact
Re: [PR] ARTEMIS-5530 Some handling of compressed messages can throw NegativeArraySizeException [activemq-artemis]
Posted by "AntonRoskvist (via GitHub)" <gi...@apache.org>.
AntonRoskvist commented on PR #5867:
URL: https://github.com/apache/activemq-artemis/pull/5867#issuecomment-3188212684
@clebertsuconic The tests I've run have all looked good, so if you still agree then I think this is done. Thanks again!
--
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: gitbox-unsubscribe@activemq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org
For additional commands, e-mail: gitbox-help@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact
Re: [PR] ARTEMIS-5530 Some handling of compressed messages can throw NegativeArraySizeException [activemq-artemis]
Posted by "clebertsuconic (via GitHub)" <gi...@apache.org>.
clebertsuconic merged PR #5867:
URL: https://github.com/apache/activemq-artemis/pull/5867
--
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: gitbox-unsubscribe@activemq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org
For additional commands, e-mail: gitbox-help@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact
Re: [PR] ARTEMIS-5530 Some handling of compressed messages can throw NegativeArraySizeException [activemq-artemis]
Posted by "clebertsuconic (via GitHub)" <gi...@apache.org>.
clebertsuconic commented on PR #5867:
URL: https://github.com/apache/activemq-artemis/pull/5867#issuecomment-3184054134
@AntonRoskvist I would like to run some tests myself with your test and our changes
--
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: gitbox-unsubscribe@activemq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org
For additional commands, e-mail: gitbox-help@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact