-
Notifications
You must be signed in to change notification settings - Fork 925
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ARTEMIS-4206 Dealing with Large Message Issues / duplicate deliveries / messages hanging on folder #4418
Conversation
cf4ffc1
to
c96dfeb
Compare
artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/RefCountMessage.java
Outdated
Show resolved
Hide resolved
artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/RefCountMessage.java
Outdated
Show resolved
Hide resolved
...leak-tests/src/test/java/org/apache/activemq/artemis/tests/leak/RefCountMessageLeakTest.java
Outdated
Show resolved
Hide resolved
artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/Test.java
Outdated
Show resolved
Hide resolved
artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/RefCountMessage.java
Show resolved
Hide resolved
5c4729d
to
3be6515
Compare
artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/RefCountMessage.java
Outdated
Show resolved
Hide resolved
artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/RefCountMessage.java
Outdated
Show resolved
Hide resolved
8d9bcf7
to
314ed08
Compare
I have been debugging with these messages, and I am making a few adjustments (Missed debug statements... etc)... this is being useful in a scenario where the Cpu Is overloaded and everything is failing on the delivering, leaving messages behind. it is working as I expected to tell me what is happening, but I'm making a few adjustments. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know its still draft but as its been a couple days and you keep updating it..some WIP comments.
artemis-commons/src/main/java/org/apache/activemq/artemis/utils/ObjectCleaner.java
Outdated
Show resolved
Hide resolved
artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/RefCountMessage.java
Show resolved
Hide resolved
...leak-tests/src/test/java/org/apache/activemq/artemis/tests/leak/RefCountMessageLeakTest.java
Outdated
Show resolved
Hide resolved
...-core-client/src/main/java/org/apache/activemq/artemis/core/client/ActiveMQClientLogger.java
Outdated
Show resolved
Hide resolved
artemis-server/src/main/java/org/apache/activemq/artemis/core/server/LargeServerMessage.java
Outdated
Show resolved
Hide resolved
artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/RefCountMessage.java
Outdated
Show resolved
Hide resolved
cd29075
to
ea17d56
Compare
artemis-commons/src/main/java/org/apache/activemq/artemis/utils/ObjectCleaner.java
Show resolved
Hide resolved
dfdb9d8
to
575c1f6
Compare
9242598
to
371af19
Compare
...src/test/java/org/apache/activemq/artemis/tests/soak/interruptlm/LargeMessageFrozenTest.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You were right, I didnt like that there were two sets of changes in here, intertwined no less :)
I'm not a huge fan of using the log levels to decide to randomly start changing behaviour and stashing stacktraces, even if the intent is sometimes log them...or of using that mechanism throughout the codebase rather than just inside the message classes as it was originally.
|
||
DebugState(String description) { | ||
this.description = description; | ||
debugCrumbs.add(new Exception("registered")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All the others have timestamps, seems weird this doesnt.
artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/RefCountMessage.java
Outdated
Show resolved
Hide resolved
...src/test/java/org/apache/activemq/artemis/tests/soak/interruptlm/LargeMessageFrozenTest.java
Show resolved
Hide resolved
artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/RefCountMessage.java
Outdated
Show resolved
Hide resolved
artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/RefCountMessage.java
Outdated
Show resolved
Hide resolved
artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/RefCountMessage.java
Outdated
Show resolved
Hide resolved
artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/RefCountMessage.java
Outdated
Show resolved
Hide resolved
artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/RefCountMessage.java
Outdated
Show resolved
Hide resolved
artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java
Outdated
Show resolved
Hide resolved
...s-unit-test-support/src/main/java/org/apache/activemq/artemis/utils/ThreadLeakCheckRule.java
Outdated
Show resolved
Hide resolved
I can squash 2 commits in one for two different and related issues. I thought it was better to keep separated. Regarding the trace. I think it's better this way. Say an user starts having issues if we just set the logger we would get what we need. |
This mechanism is how I found these issues. I would like to keep this door open for future issues. |
The idea of this feature is to be a hidden feature... So, I am going to use the following logger to enable this type of debugging: private static final Logger refLogger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass().getName() + ".REF_DEBUG"); |
43307bc
to
36f98e6
Compare
No, lets not squash 'different changes' into one commit (yes I saw, its too late), lets keep different changes separate. In that spirit, the original comment was around lets also try not to make different changes entirely reliant on each other anyway by intertwining and overlapping their multiple commits, such that you cant very simply pick or see the effect of one of the different changes in isolation because the commits were mixed together rather than sequential while adding. Aside, on the squashed commit log message, it starts telling you how to enable the ref counting debug, and then also ends telling you how to enable the ref counting debug but in a less clear way. Seems like one of them could go. |
It will certainly be hidden, people will enable it without knowing they are since it is a descendent in the regular class name logger hierarchy. Anyone simply enabling debug logging for the class (or more likely, many classes / further up the hierarchy) will get the change in actual system behaviour of the ref counting debug and saving lots of stacktraces. They would have to know about the change in behaviour and reconfigure the specific ref count logger back off in order to restore the prior behaviour and only add debug output for the normal system behaviour. |
Hmmm this worries me, I think any feature should be something we're open about have the capability documented etc. We shouldn't be hiding things so only select few know about it. This is ethos of open source Apache in my mind. Fair enough if it's something a general user may not need to know, call it like advanced troubleshooting or something but do not add something hidden |
artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/RefCountMessage.java
Outdated
Show resolved
Hide resolved
artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/RefCountMessage.java
Outdated
Show resolved
Hide resolved
artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/RefCountMessage.java
Outdated
Show resolved
Hide resolved
artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/RefCountMessage.java
Outdated
Show resolved
Hide resolved
artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQServerLogger.java
Outdated
Show resolved
Hide resolved
artemis-server/src/main/java/org/apache/activemq/artemis/core/server/Consumer.java
Outdated
Show resolved
Hide resolved
...server/src/main/java/org/apache/activemq/artemis/core/server/cluster/impl/Redistributor.java
Outdated
Show resolved
Hide resolved
artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java
Outdated
Show resolved
Hide resolved
artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java
Outdated
Show resolved
Hide resolved
...is-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerConsumerImpl.java
Outdated
Show resolved
Hide resolved
Yeah, its not a 'feature-feature' in any way, and not something I think a user would normally care about so I dont think I'd ever document it personally. Its 'additional broker developer leak debug/trace details via saved stacktraces'. |
@gemmellr I will keep the squash.. they are all related anyways. |
@michaelandrepearce I didn't mean as an actual hidden property. I will have a JIRA open for this that will be part of the release notes. Just that I won't add it to the documentation... as most users won't care about it.. and hopefully won't need to. Over the years I have been uncommenting code when I needed to debug things... I think it's time to make that thing as part of the codebase now. |
c77bf85
to
4c20d08
Compare
- interrupted message breaking reference counting After the server writing to the client is interrupted in AMQP, the reference counting was broken what would require the server restarted in order to cleanup the files of any interrupted sends. - Removed consumer during large message delivery damaging large messages If the consumer failed to deliver messages for any reason, the message on the queue would be duplicated. what would wipe out the body of the message and other journal errors would happen because of this. extra debug capabilities added into RefCountMessage as part of ARTEMIS-4206 in order to identify these issues
you add the property -DARTEMIS_DEBUG_REF=true in your java arguments, And you should see Debug output when the messages are not being removed.