[ https://issues.apache.org/jira/browse/ARTEMIS-4576?focusedWorklogId=900431&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-900431 ]
ASF GitHub Bot logged work on ARTEMIS-4576: ------------------------------------------- Author: ASF GitHub Bot Created on: 18/Jan/24 13:25 Start Date: 18/Jan/24 13:25 Worklog Time Spent: 10m Work Description: gemmellr commented on code in PR #4749: URL: https://github.com/apache/activemq-artemis/pull/4749#discussion_r1457437316 ########## artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerSessionImpl.java: ########## @@ -2357,11 +2357,19 @@ public synchronized RoutingStatus doSend(final Transaction tx, routingContext.setAddress(art.getName()); routingContext.setRoutingType(art.getRoutingType()); + // Retrieve message size for metrics update before routing, + // since large message backing files may be closed once routing completes + int lmSize = 0; Review Comment: variable name needs updated (here and in updateProducerMetrics), lmSize doesnt make sense now ########## artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerSessionImpl.java: ########## @@ -2357,11 +2357,19 @@ public synchronized RoutingStatus doSend(final Transaction tx, routingContext.setAddress(art.getName()); routingContext.setRoutingType(art.getRoutingType()); + // Retrieve message size for metrics update before routing, + // since large message backing files may be closed once routing completes + int lmSize = 0; Review Comment: variable name needs updated (here and in updateProducerMetrics), _lmSize_ doesnt make sense now Issue Time Tracking ------------------- Worklog Id: (was: 900431) Time Spent: 0.5h (was: 20m) > ServerSessionImpl#updateProducerMetrics access large messages after being > routed > -------------------------------------------------------------------------------- > > Key: ARTEMIS-4576 > URL: https://issues.apache.org/jira/browse/ARTEMIS-4576 > Project: ActiveMQ Artemis > Issue Type: Bug > Reporter: Howard Gao > Assignee: Howard Gao > Priority: Major > Time Spent: 0.5h > Remaining Estimate: 0h > > 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 -- This message was sent by Atlassian Jira (v8.20.10#820010)