[jira] [Work logged] (ARTEMIS-4576) ServerSessionImpl#updateProducerMetrics access large messages after being routed

2024-01-22 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-4576?focusedWorklogId=901034=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-901034
 ]

ASF GitHub Bot logged work on ARTEMIS-4576:
---

Author: ASF GitHub Bot
Created on: 22/Jan/24 20:09
Start Date: 22/Jan/24 20:09
Worklog Time Spent: 10m 
  Work Description: clebertsuconic commented on PR #4749:
URL: 
https://github.com/apache/activemq-artemis/pull/4749#issuecomment-1904726062

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




Issue Time Tracking
---

Worklog Id: (was: 901034)
Time Spent: 1h 50m  (was: 1h 40m)

> 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: 1h 50m
>  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)


[jira] [Work logged] (ARTEMIS-4576) ServerSessionImpl#updateProducerMetrics access large messages after being routed

2024-01-22 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-4576?focusedWorklogId=901033=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-901033
 ]

ASF GitHub Bot logged work on ARTEMIS-4576:
---

Author: ASF GitHub Bot
Created on: 22/Jan/24 20:09
Start Date: 22/Jan/24 20:09
Worklog Time Spent: 10m 
  Work Description: clebertsuconic closed pull request #4749: ARTEMIS-4576 
ServerSessionImpl#updateProducerMetrics access large messages after being routed
URL: https://github.com/apache/activemq-artemis/pull/4749




Issue Time Tracking
---

Worklog Id: (was: 901033)
Time Spent: 1h 40m  (was: 1.5h)

> 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: 1h 40m
>  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)


[jira] [Work logged] (ARTEMIS-4576) ServerSessionImpl#updateProducerMetrics access large messages after being routed

2024-01-22 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-4576?focusedWorklogId=901032=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-901032
 ]

ASF GitHub Bot logged work on ARTEMIS-4576:
---

Author: ASF GitHub Bot
Created on: 22/Jan/24 20:05
Start Date: 22/Jan/24 20:05
Worklog Time Spent: 10m 
  Work Description: clebertsuconic commented on PR #4749:
URL: 
https://github.com/apache/activemq-artemis/pull/4749#issuecomment-1904720169

   Ohhh.. I see now... 




Issue Time Tracking
---

Worklog Id: (was: 901032)
Time Spent: 1.5h  (was: 1h 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: 1.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)


[jira] [Work logged] (ARTEMIS-4576) ServerSessionImpl#updateProducerMetrics access large messages after being routed

2024-01-22 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-4576?focusedWorklogId=901030=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-901030
 ]

ASF GitHub Bot logged work on ARTEMIS-4576:
---

Author: ASF GitHub Bot
Created on: 22/Jan/24 20:00
Start Date: 22/Jan/24 20:00
Worklog Time Spent: 10m 
  Work Description: clebertsuconic commented on PR #4749:
URL: 
https://github.com/apache/activemq-artemis/pull/4749#issuecomment-1904713729

   @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.




Issue Time Tracking
---

Worklog Id: (was: 901030)
Time Spent: 1h 20m  (was: 1h 10m)

> 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: 1h 20m
>  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)


[jira] [Work logged] (ARTEMIS-4576) ServerSessionImpl#updateProducerMetrics access large messages after being routed

2024-01-19 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-4576?focusedWorklogId=900660=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-900660
 ]

ASF GitHub Bot logged work on ARTEMIS-4576:
---

Author: ASF GitHub Bot
Created on: 19/Jan/24 09:56
Start Date: 19/Jan/24 09:56
Worklog Time Spent: 10m 
  Work Description: gemmellr commented on PR #4749:
URL: 
https://github.com/apache/activemq-artemis/pull/4749#issuecomment-1900093547

   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 




Issue Time Tracking
---

Worklog Id: (was: 900660)
Time Spent: 1h 10m  (was: 1h)

> 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: 1h 10m
>  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)


[jira] [Work logged] (ARTEMIS-4576) ServerSessionImpl#updateProducerMetrics access large messages after being routed

2024-01-19 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-4576?focusedWorklogId=900659=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-900659
 ]

ASF GitHub Bot logged work on ARTEMIS-4576:
---

Author: ASF GitHub Bot
Created on: 19/Jan/24 09:51
Start Date: 19/Jan/24 09:51
Worklog Time Spent: 10m 
  Work Description: gemmellr commented on code in PR #4749:
URL: https://github.com/apache/activemq-artemis/pull/4749#discussion_r1458686392


##
artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerSessionImpl.java:
##
@@ -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) {

Review Comment:
   lmSize still needs updated here





Issue Time Tracking
---

Worklog Id: (was: 900659)
Time Spent: 1h  (was: 50m)

> 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: 1h
>  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)


[jira] [Work logged] (ARTEMIS-4576) ServerSessionImpl#updateProducerMetrics access large messages after being routed

2024-01-18 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-4576?focusedWorklogId=900560=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-900560
 ]

ASF GitHub Bot logged work on ARTEMIS-4576:
---

Author: ASF GitHub Bot
Created on: 19/Jan/24 03:00
Start Date: 19/Jan/24 03:00
Worklog Time Spent: 10m 
  Work Description: gaohoward commented on code in PR #4749:
URL: https://github.com/apache/activemq-artemis/pull/4749#discussion_r1458230273


##
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:
   Done!





Issue Time Tracking
---

Worklog Id: (was: 900560)
Time Spent: 50m  (was: 40m)

> 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: 50m
>  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)


[jira] [Work logged] (ARTEMIS-4576) ServerSessionImpl#updateProducerMetrics access large messages after being routed

2024-01-18 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-4576?focusedWorklogId=900554=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-900554
 ]

ASF GitHub Bot logged work on ARTEMIS-4576:
---

Author: ASF GitHub Bot
Created on: 19/Jan/24 02:28
Start Date: 19/Jan/24 02:28
Worklog Time Spent: 10m 
  Work Description: gaohoward commented on code in PR #4749:
URL: https://github.com/apache/activemq-artemis/pull/4749#discussion_r1458204075


##
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:
   ha, yes. Thanks Robbie. I think I can also use ?: form to combine the 
statements into one line.
   





Issue Time Tracking
---

Worklog Id: (was: 900554)
Time Spent: 40m  (was: 0.5h)

> 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: 40m
>  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)


[jira] [Work logged] (ARTEMIS-4576) ServerSessionImpl#updateProducerMetrics access large messages after being routed

2024-01-18 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-4576?focusedWorklogId=900431=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)


[jira] [Work logged] (ARTEMIS-4576) ServerSessionImpl#updateProducerMetrics access large messages after being routed

2024-01-18 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-4576?focusedWorklogId=900397=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-900397
 ]

ASF GitHub Bot logged work on ARTEMIS-4576:
---

Author: ASF GitHub Bot
Created on: 18/Jan/24 10:35
Start Date: 18/Jan/24 10:35
Worklog Time Spent: 10m 
  Work Description: gemmellr commented on code in PR #4749:
URL: https://github.com/apache/activemq-artemis/pull/4749#discussion_r1457248264


##
artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerSessionImpl.java:
##
@@ -2357,11 +2357,20 @@ public synchronized RoutingStatus doSend(final 
Transaction tx,
  routingContext.setAddress(art.getName());
  routingContext.setRoutingType(art.getRoutingType());
 
+ int lmSize = 0;
+ if (msg instanceof LargeServerMessageImpl) {
+// before routing large messages,
+// prefetch its body size for updating
+// producer metrics after message being routed
+// because after route the large messages backing file
+// may be closed quickly with acks from clients
+lmSize = ((LargeServerMessageImpl)msg).getBodyBufferSize();
+ }

Review Comment:
   Rather than only passing the size for large messages, seems like it would be 
nicer if it assessed the size for either type here and then always pass it to 
the update. That way the existing check that was previously done later can just 
be moved here (i.e do same work, just in different place) rather than needing 
to repeat the check.
   
   The comment can then perhaps also just be summarised a bit, e.g "Retrieve 
message size for metrics update before routing, since large message backing 
files may be closed once routing completes"





Issue Time Tracking
---

Worklog Id: (was: 900397)
Time Spent: 20m  (was: 10m)

> 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: 20m
>  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)


[jira] [Work logged] (ARTEMIS-4576) ServerSessionImpl#updateProducerMetrics access large messages after being routed

2024-01-18 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-4576?focusedWorklogId=900383=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-900383
 ]

ASF GitHub Bot logged work on ARTEMIS-4576:
---

Author: ASF GitHub Bot
Created on: 18/Jan/24 10:12
Start Date: 18/Jan/24 10:12
Worklog Time Spent: 10m 
  Work Description: gaohoward opened a new pull request, #4749:
URL: https://github.com/apache/activemq-artemis/pull/4749

   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




Issue Time Tracking
---

Worklog Id: (was: 900383)
Remaining Estimate: 0h
Time Spent: 10m

> 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: 10m
>  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)