Skip to content
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-4576 ServerSessionImpl#updateProducerMetrics access large messages after being routed #4749

Closed
wants to merge 1 commit into from

Conversation

gaohoward
Copy link
Contributor

ServerSessionImpl#updateProducerMetrics method is being called after a message is routed. If the message is a large message, it can be acked quickly and it's backing file will be closed before the method is being called.
This bug causes random failure in test org.apache.activemq.artemis.tests.integration.paging.MessagesExpiredPagingTest#testSendReceiveCORELarge

@@ -2520,10 +2524,10 @@ public String toManagementString() {
return "ServerSession [id=" + getConnectionID() + ":" + getName() + "]";
}

private void updateProducerMetrics(Message msg, String senderName) {
private void updateProducerMetrics(Message msg, String senderName, int lmSize) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lmSize still needs updated here

@gemmellr
Copy link
Member

Once the variable is renamed I think this looks good.

Though I think someone more familiar with the routing and large message stuff should also give it a once over. @clebertsuconic @jbertram

@clebertsuconic
Copy link
Contributor

@howardgao I don't actually understand what's being fixed.. it seems the same semantic.. replacing 6 by half dozen?

Perhaps you meant to check this for AMQP, in which case you would have to also check for AMQPLargeServerMessage... or maybe add another method to an upper level?

if you actually create a test to validate what's wrong, it would be check the right fix.

@clebertsuconic
Copy link
Contributor

Ohhh.. I see now...

@clebertsuconic
Copy link
Contributor

I pushed this directly... hence I'm closing this PR as I already "merged it"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants