gemmellr commented on code in PR #4418:
URL: https://github.com/apache/activemq-artemis/pull/4418#discussion_r1152099042
##########
artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/RefCountMessage.java:
##########
@@ -49,6 +93,28 @@ public int getDurableCount() {
return DURABLE_REF_COUNT_UPDATER.get(this);
}
+ /** Sub classes may mark fired=true when they were explicitly called.
+ * E.g large message removed the file upon cancellation */
+ protected void markFired() {
+ fired = true;
Review Comment:
So is the idea that during the 'normal' countDown it marks the 'outer fired'
variable, reaches out somewhere else in firing releaseComplete(), then that
other places [maybe] reaches back in here eventually and calls 'markFired()'
and doubly-sets the 'outer fired' variable and ALSO sets the separate
'debugStatus fired' variable to _really_ mark the message as cleaned up? The
cleaner only seems to look at the latter variable when deciding whether the
message was cleaned up or not, but only the markFired() 'direct call' is
setting that. I looked at/thought about this code for 30mins earlier and am
asking questions as I still dont understand what its expected to do normally.
Its pretty impenetrable as-is. If I wasnt seeing the diff I probably wouldnt
even have noticed the 2 different 'fired' variables, with one being used in 2
different ways by the two routes through the code.
--
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]