[
https://issues.apache.org/jira/browse/ARTEMIS-3501?focusedWorklogId=656310&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-656310
]
ASF GitHub Bot logged work on ARTEMIS-3501:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 28/Sep/21 18:14
Start Date: 28/Sep/21 18:14
Worklog Time Spent: 10m
Work Description: AntonRoskvist commented on a change in pull request
#3776:
URL: https://github.com/apache/activemq-artemis/pull/3776#discussion_r717845556
##########
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:
This is preceded by a massive dump about everything related to the
message, so it seemed a bit excessive. An example of that can be seen in the
attached log in the ticket, but it includes messageID, why it failed and the
entire message bytebuffer (pretty printed)
--
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: 656310)
Time Spent: 20m (was: 10m)
> 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
> Attachments: artemis.log
>
> Time Spent: 20m
> 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)