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

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

                Author: ASF GitHub Bot
            Created on: 30/Sep/21 00:22
            Start Date: 30/Sep/21 00:22
    Worklog Time Spent: 10m 
      Work Description: jbertram commented on a change in pull request #3776:
URL: https://github.com/apache/activemq-artemis/pull/3776#discussion_r718759120



##########
File path: 
artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/PostOfficeJournalLoader.java
##########
@@ -221,23 +221,27 @@ public void handleAddMessage(Map<Long, Map<Long, 
AddMessageRecord>> queueMap) th
          long currentTime = System.currentTimeMillis();
 
          for (AddMessageRecord record : valueRecords) {
-            long scheduledDeliveryTime = record.getScheduledDeliveryTime();
+            try {
+               long scheduledDeliveryTime = record.getScheduledDeliveryTime();
 
-            if (scheduledDeliveryTime != 0 && scheduledDeliveryTime <= 
currentTime) {
-               scheduledDeliveryTime = 0;
-               record.getMessage().setScheduledDeliveryTime(0L);
-            }
+               if (scheduledDeliveryTime != 0 && scheduledDeliveryTime <= 
currentTime) {
+                  scheduledDeliveryTime = 0;
+                  record.getMessage().setScheduledDeliveryTime(0L);
+               }
 
-            if (scheduledDeliveryTime != 0) {
-               
record.getMessage().setScheduledDeliveryTime(scheduledDeliveryTime);
-            }
+               if (scheduledDeliveryTime != 0) {
+                  
record.getMessage().setScheduledDeliveryTime(scheduledDeliveryTime);
+               }
 
-            MessageReference ref = postOffice.reload(record.getMessage(), 
queue, null);
+               MessageReference ref = postOffice.reload(record.getMessage(), 
queue, null);
 
-            ref.setDeliveryCount(record.getDeliveryCount());
+               ref.setDeliveryCount(record.getDeliveryCount());
 
-            if (scheduledDeliveryTime != 0) {
-               record.getMessage().setScheduledDeliveryTime(0L);
+               if (scheduledDeliveryTime != 0) {
+                  record.getMessage().setScheduledDeliveryTime(0L);
+               }
+            } catch (Throwable e) {

Review comment:
       Details about the failure are logged in this specific case, but there's 
no guarantee that will be the case for _every_ type of failure. These details 
still need to be logged. I'll amend the commit before I merge it with the 
requisite logging.




-- 
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]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 657754)
    Time Spent: 2.5h  (was: 2h 20m)

> Corrupted message in journal can inhibit broker from starting
> -------------------------------------------------------------
>
>                 Key: ARTEMIS-3501
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-3501
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>            Reporter: Anton Roskvist
>            Priority: Major
>             Fix For: 2.19.0
>
>         Attachments: artemis.log
>
>          Time Spent: 2.5h
>  Remaining Estimate: 0h
>
> In my case this was caused by a single bad message that seems to have come 
> from a broker restart i.e the broker was working, then it was stopped, and 
> upon starting back up it was unable to do so and instead threw some troubling 
> exceptions in the log (attached)



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to